Dear list,
i’m trying to silently change a buffer offset with BufRd, which should be simple but it eludes me.
Two possible solutions come to my mind:
One possibility would be to use Select.ar to only pass triggers on all the non-active channels.
Another would be to Gate.ar the retriggering on active channels so it only works on the muted ones.
Both option would probably need the array that returns all the muted channels.
Any thoughts how that could look like? Or wholly other ideas?
b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
(
{
var n = 8;
var freq=200;
var index1=(LFDNoise3.ar(1).abs*(1..n)).round(1).poll(1); //index for channels to output/hear
var index2 = n-index1; //?create an index with all the non-active channels on index1 to use for bufferoffset?
var env = EnvGen.ar(Env.sine,Impulse.ar(freq),timeScale:1/freq);
var bufferoffset = TIRand.ar(0,BufFrames.kr(b)-1,Impulse.ar(freq/n!n));
var bufoffset1 = Select.ar(index2,bufferoffset);
// var bufoffset2 = Gate.ar(bufferoffset,??); //alternatively, how to gate the active channel retrigger?
var sig = LeakDC.ar(BufRd.ar(1,b,bufoffset1.poll,1,4))*env;
Splay.ar(Select.ar(index1,sig).poll(1))}.play
)