[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-dev] [jit] BusPlug:ar/kr return array if no numChannels specified



         // always return an array if no channel size is specified
        ^if(numChannels.isNil) { output.asArray } { output }

I'm sorry... I'm sure this was carefully considered, but it's rather annoying in one case which I would suppose to be quite common.

~freq = 100;

~mod.addSpec(\index, #[0.01, 50, \exp], \ratio, SnapControlSpec(1, 8, \lin, 0.5).snap_(0.05));
~mod = { |index = 1, ratio = 1|
    SinOsc.ar(~freq.kr(1) * ratio, 0, index)
};

~car = { |amp = 0.1|
    SinOsc.ar(~freq.kr * (1 + ~mod.ar(1)), 0, amp).dup
};

Only because I forgot the '(1)' after '~freq.kr', I get:

WARNING: Synth output should be a flat array.
[ [ a BinaryOpUGen ], [ a BinaryOpUGen ] ]

The synth appears to have the right structure, so this is a superfluous warning in the case of 'kr' or 'ar' on a mono NodeProxy. (As JITLib is meant for live coding, I'd assume it would err on the side of removing fussy requirements from user input. Here... nope.)

hjh