I have the following synth which basically plays a buffer, with some modulations in rate etc.
In the Pan2 part I would like to send each new trigger of the PlayBuf to a random loudspeaker, so each time the playbuf jumps back to the start position. How could I achieve this?
(
SynthDef(\play, {
arg buf=0;
var snd;
var trig = LFNoise0.ar(10);
snd = PlayBuf.ar(
buf.numChannels,
2,
trigger: trig,
rate: BufRateScale.kr(buf) * LFNoise0.kr(10).range(-4, 4.0),
);
snd = BPF.ar(snd, LFNoise0.kr(10).range(100, 2000), rq: 0.1);
snd = FreeVerb.ar(snd, mix: LFNoise0.kr(10).range(0, 0.7), room: LFNoise0.kr(1).range(0, 0.9));
Out.ar(0, Pan2.ar(snd, pos: trig))
}).add
)