I Can't compile a PlayBuf based SynthDef with the numChannels parameter, I get "ERROR: Non Boolean in test".
SynthDef("play", {arg buffer, numChan = 2;
Out.ar(0, PlayBuf.ar(numChan, buffer));
}).add
I have tried informing the number of channels with BufChannels Ugen, but It doesn't work too. I get the same error.
SynthDef("play", {arg buffer;
Out.ar(0, PlayBuf.ar(BufChannels(buffer), buffer));
}).add
I only can do it informing this parameter literaly, but I want to use the same SynthDef with buffers of different number of channels, is it possible?
SynthDef("play", {arg buffer;
Out.ar(0, PlayBuf.ar(2, buffer));
}).add