Greetings.
I am trying to get this bit of code to output 4 channels, but it seems PlayBuf won’t allow it (at least that’s how I understand it). Any ideas on how to do this?
(
SynthDef(\try3, {
arg out=0, buf=0, rate=1, speed=0.01, pan=0, amp=0.5;
var sig, env, panPos;
env = EnvGen.kr(Env([0, 1, 1, 0], [0.01, BufDur.ir(buf) - 0.02, 0.01]), doneAction:2);
sig = PlayBuf.ar(2, buf, rate: BufRateScale.kr(buf) * rate, trigger: 0, loop:0, doneAction:2);
panPos = LFNoise1.kr(speed).range(-1, 1);
sig = PanAz.ar(4, sig, panPos);
Out.ar(out, sig * amp);
}).add;
)
(
~fieldrecs = Synth(\try3, [
\buf, [~pani1, ~sho1].choose,
\amp, 0.4,
\out, 0,
]);
)