Professional Documents
Culture Documents
SCAssignment 2
SCAssignment 2
(
SynthDef(\wigsaw, { | out, gate = 0, lowRand = 300 highRand = 3000 pulseRate = 10
mul = 0.5 stereo = 0 mix = 0.5 room = 0.5|
var z;
z = Pan2.ar(
EnvGen.kr(Env.adsr(2), gate) * Saw.ar(TRand.kr(lowRand, highRand,
Pulse.kr(pulseRate)), mul), stereo, 0.3);
Out.ar(out, FreeVerb.ar(z, mix, room));
}).send(s);
)
a = Synth(\sin_syn);
b = Synth(\wigsaw);
c = Synth(\wigsaw);
d = Synth(\sin_syn);
a.free;
b.set(\gate, 1);
a.set(\gate, 1); b.set(\gate, 0);
a.set(\gate, 0); b.set(\gate, 1);
a.set(\gate, 0); b.set(\gate, 0);
a.set(\gate, 1, \stereo, -1); b.set(\gate, 1, \stereo, 1);
a.set(\gate, 1, \stereo, 0); b.set(\gate, 1, \stereo, 0);
a.set(\gate, 1, \stereo, 1); b.set(\gate, 1, \stereo, -1);
a.free; b,free;