
Untitled
By: a guest on
May 4th, 2012 | syntax:
None | size: 1.21 KB | hits: 11 | expires: Never
(
SynthDef("SimpleSine", { | pitch, decay = 2 , vol = 0.5|
var sound = SinOsc.ar(pitch.midicps) * EnvGen.ar(Env.perc(0.001, decay, vol), doneAction: 2);
Out.ar(0, 0.5*sound!2);
}).memStore;
SynthDef("Bass", { | pitch |
var env = EnvGen.ar(Env.perc(0, 0.5, 1), doneAction: 2);
var saw = RLPF.ar(Saw.ar(pitch.midicps), 700);
var sine = SinOsc.ar(pitch.midicps);
var sound = 0.5*Mix([0.3*sine, 0.6*saw]) * env;
Out.ar(0, sound!2);
}).memStore;
)
a = Synth.new('SimpleSine', [\pitch, 60]);
b = Synth.new('Bass', [\pitch, 36]);
(
t = TempoClock.new(80/60, 0, Main.elapsedTime.ceil);
p = Pbind(\instrument, \SimpleSine,
\pitch, Pseq([60, 63, 60, Prand([67, 70], 1), 65, Prand([67, 70]), 69, Prand([65, 58], 1)], inf),
\dur, Prand([1, 0.5], inf),
\vol, 0.2
).play(t, quant: 1)
)
(
q = Pbind(\instrument, \SimpleSine,
\pitch, 12 + Pseq([60, 63, 74, Prand([67, 75], 1), 65, Prand([67, 70]), 69, Prand([65, 58], 1)], inf),
\dur, Prand([1, 0.5], inf)*2/3,
\vol, 0.2
).play(t, quant: 1)
)
(
r = Pbind(\instrument, \Bass,
\pitch, Pstutter(5, Pseq([60, 58, 53, 56], inf))-24,
\dur, 0.5
).play(t, quant: 1)
)
t.tempo_(200/60)
t.tempo_(120/60)
t.tempo_(80/60)
p.stop
q.stop
r.stop