hey, i would like to implement a conditional flop for my ugen wrappers, so if you multichannel expand those via a multichannel phase you can still access the different outputs via their key from the dictionary. Would someone know how to do that properly? (the next_a / next_k with internal interpolaton implementations are still on my list so im forcing alot of params currently to be audio rate, i hope i can do better pretty soon).
One example from my UnitUSR Ugen. If you drive that with a multichannel phase you cant access the multichannel outputs via register[\bit3] or register[\bit8]:
UnitUSRUgen : MultiOutUGen {
*ar { |phase, chance, length, rotate, interp = 0, reset = 0|
if(phase.rate != 'audio') { phase = K2A.ar(phase) };
if(chance.rate != 'audio') { chance = K2A.ar(chance) };
if(length.rate != 'audio') { length = K2A.ar(length) };
if(rotate.rate != 'audio') { rotate = K2A.ar(rotate) };
^this.multiNew('audio', phase, chance, length, rotate, interp, reset);
}
init { arg ... theInputs;
inputs = theInputs;
^this.initOutputs(2, rate);
}
checkInputs {
^this.checkValidInputs;
}
}
UnitUSR {
*ar { |phase, chance, length, rotate, interp = 0, reset = 0|
var register = UnitUSRUgen.ar(phase, chance, length, rotate, interp, reset);
^(
bit3: register[0],
bit8: register[1]
);
}
}