// title: smooth arpeggio, updated envelope // author: hems.inlet // description: // code: ( s.boot; ) ( SynthDef(\bass, { |freq = 440, sustain = 1, amp = 0.5| var sig; sig = SinOsc.ar(freq, 0, amp) * EnvGen.kr(Env.perc(0.2), doneAction: 2); Out.ar(0, sig ! 2) }).add; ); ( ( p = Pbind( // the name of the SynthDef to use for each note \instrument, \smooth, // MIDI note numbers -- converted automatically to Hz \midinote, Pseq([36 + 0, 36 + 7, 36 + 12], inf), // rhythmic values \dur, Pseq([0.5, 0.5, 0.5], inf) ).play; ); ( p = Pbind( // the name of the SynthDef to use for each note \instrument, \smooth, // MIDI note numbers -- converted automatically to Hz \midinote, Pseq([60+0, 60+5, 60+7, 60+8, 60+7, 60+5], inf), // rhythmic values \dur, Pseq([0.5, 0.5, 0.5, 0.5, 0.5, 0.5], inf) ).play; ) )