( SynthDef(\bufPlayer, {|out = 0, bufnum = 0 | Out.ar(out, PlayBuf.ar(1, bufnum, BufRateScale.kr(bufnum), loop: 1.0) ) }).add; ); ( SynthDef(\smplr, {|out = 0, revBus, bufnum = 0, gate = 1, amp = 1, pan = 0, rate = 1, revWet = 0 | var snd, env; snd = PlayBuf.ar(1, bufnum, BufRateScale.kr(bufnum) * rate, loop: 0); env = EnvGen.kr(envelope: Env.cutoff(0.001,1), gate: gate, doneAction:Done.freeSelf); snd = snd * env * amp; snd = Pan2.ar(snd, pan); Out.ar(out, snd); //Out.ar(revBus * revWet, snd); }).add; );