2 // (thor magnusson) (2006)
4 // An instrumentalist inside a synthdef.
7 SynthDef(\drummer, { arg out=0, tempo=4;
8 var snare, base, hihat;
9 tempo = Impulse.ar(tempo); // for a drunk drummer replace Impulse with Dust !!!
11 snare = WhiteNoise.ar(Decay2.ar(PulseDivider.ar(tempo, 4, 2), 0.005, 0.5));
12 base = SinOsc.ar(Line.ar(120,60, 1), 0, Decay2.ar(PulseDivider.ar(tempo, 4, 0), 0.005, 0.5));
13 hihat = HPF.ar(WhiteNoise.ar(1), 10000) * Decay2.ar(tempo, 0.005, 0.5);
15 Out.ar(out,(snare + base + hihat) * 0.4 ! 2)
22 a.set(\tempo, 180); // check the CPU! no increase.