Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: classical piano music in SC
name
code content
//////////////// Chopin Prelude in Em OP.28,No.4 ///////////////// ( SynthDef(\mdapiano, { |out=0, freq=440, gate=1, vel= 100, decay= 0.8, release= 0.8, hard= 0.8, velhard= 0.8, muffle= 0.8, velmuff= 0.8, velcurve= 0.8, stereo= 0.5, tune= 0.5, random= 0.1, stret= 0.1, sus= 0| var son = MdaPiano.ar(freq, gate, vel, decay, release, hard, velhard, muffle, velmuff, velcurve, stereo, tune, random, stret, sus); FreeSelf(1-gate); Out.ar(out, son ); }).add; ) ( // 1 2 3 4 5 6 7 8 var tNotes = [ 59,71, 71,72, 71,72, 71,72, 71,70, 69,71, 69,71, 69,71,69, 69,68, // 9 10 11 12 67,69,71,74,72,64,69, 66,69, 66,71,69, 67,66,60,59,63,66,74,72,71, // 13 14 15 16 17 71,72, 71,72, 71,72, 71,70,70,71,70,69,70,79,78,76, 76,75,84,75,75,76,79,71, // 18 19 20 21 22 23 74,72,76,64,69,66,69, 66,71,69, 66,64, 64,66, 64,66, 64,\r, // 24 25 [52,54,59,64],[51,54,59,63], [52,55,59,64], ]; // 1 2 3 4 5 6 7 8 var tDur = [ 3/4,1/4, 3,1, 3,1, 3,1, 3,1, 3,1, 3,1, 3,3/4,1/4, 3,1, // 9 10 11 12 1,1/2,1/2,1/2,1/2,1/2,1/2, 3,1, 3,1/2,1/2, 1/2,1/2,1/2,1/2,1/2,1/2,1/3,1/3,1/3, // 13 14 15 16 17 3,1, 3,1, 3,1, 3/4,1/4,1/2,1/8,1/8,1/8,1/8,1,3/4,1/4, 1/2,1/2,1/2,1/2,1/2,1/2,1/2,1/2, // 18 19 20 21 22 23 1/2,1/2,1/3,1/3,1/3,3/2,1/2, 3,1/2,1/2, 15/4,1/4, 3,1, 3,1, 2,2, // 24 25 2,2, 4, ]; // 1 2 var bNotes = [ \r, Pseq([[55,59,64]],8), Pseq([[54,57,64]],4),Pseq([[54,57,63]],4), // 3 Pseq([[53,57,63]],4),Pseq([[53,57,62]],2),Pseq([[53,56,62]],2), // 4 Pseq([[52,56,62]],4),Pseq([[52,55,62]],2),Pseq([[52,55,61]],2), // 5 6 Pseq([[52,55,60]],4),Pseq([[52,54,60]],4), Pseq([[52,54,60]],4),Pseq([[51,54,60]],4), // 7 8 Pseq([[50,54,60]],8), Pseq([[50,53,60]],4),Pseq([[50,53,59]],4), // bar 7,8 // 9 10 Pseq([[48,52,59]],2),Pseq([[48,52,57]],6), Pseq([[47,52,57]],2),Pseq([[47,51,57]],2),Pseq([[48,52,57]],4), // 11 12 Pseq([[47,51,57]],4),Pseq([[48,52,57]],4), Pseq([[47,51,57]],2),Pseq( [\r], 6), // 13 14 Pseq([[55,59,64]],8), Pseq([[54,57,64]],4),Pseq([[53,57,63]],4), // bar 13, 14 // 15 Pseq([[53,56,63]],2),Pseq([[53,56,62]],2),Pseq([[52,56,62]],4), // 16 Pseq([[52,55,62]],2),Pseq([[52,55,61]],2),Pseq([[49,52,58]],2),Pseq([[48,52,57]],2), // 17 [23,47],Pseq([[57,60,66,69]],3),[55,59,63,66],Pseq([[55,59,64]],3), // 18 Pseq([[57,60,64]],2),45,[52,54,60],Pseq([[47,52,59]],2),Pseq([[48,52,57]],2), // 19 Pseq([[47,52,59]],4),Pseq([[48,52,57]],4), // 20 Pseq([[47,52,59]],4),Pseq([[47,51,59]],2),Pseq([[47,51,57]],2), // 21 Pseq([[48,55]],4), Pseq([[48,58]],2),Pseq([[48, 52, 57]],2), // 22 Pseq([[47,52,57]],2), Pseq([[47,52,56]],2),Pseq([[47,52,55]],4), // 23 24 25 [46,48,55],\r, [35,47],[35,42,47], [30,42] ]; // 1-22 23 24 25 var bDur = [1, Pseq([1/2], 22*8), 2,2, 2,2, 4]; var instr = \mdapiano; var bA = Pbind(\instrument, instr ,\midinote, Pseq(bNotes), \dur, Pseq(bDur), \legato, 0.8, \vel, 60, \random, 0.0, \stret, 0.0); var tA = Pbind(\instrument, instr ,\midinote, Pseq(tNotes), \dur, Pseq(tDur), \legato, 0.8, \vel, 90, \random, 0.0, \stret, 0.0); ~score = Ppar([bA,tA]); ~score.play(TempoClock(50/60)); ) ////////////////////////// Here is my problem. In piano music, a chord is held down simultaneously. But then some voices can move while other notes are still held down. i.e the chord notes have different durations? Does anyone know an elegant way to deal with this? thanks, Stewart
code description
Hello Everyone. This is my first post. I'm trying to transcribe classical piano music to SuperCollider. Here is my problem. In piano music, a chord is held down simultaneously. But then some voices can move while other notes are still held down. i.e the chord notes have different durations? Does anyone know an elegant way to deal with this? thanks, Stewart
use markdown for formating
category tags
comma separated, i.g. "wild, siren" (do not enter default SC class names, please)
ancestor(s)
comma separated identificators, i.g. "1-C,1-1,1-4M,1-x"
Private?
the code will be accessible by direct url and not visible in public activity
signup to submit public code without captcha
comment of change