.add fails with SynthDefs containing > 255 controls #256
Closed
Description
[Issue migrated from SourceForge | ID: 3498640 | Submitted by 'nobody']
[http://sourceforge.net/support/tracker.php?aid=3498640]
SynthDefs with > 255 Controls fail to be created when the .add method is used, due to the max number of vars in a function. Example code:
f = {|numChannels|
var name, def;
name = (\Mixer ++ numChannels).asSymbol;
name.postln;
SynthDef(name) { |out=0|
var ins;
ins = numChannels.collect { |i|
MidEQ.ar(
In.ar(NamedControl.kr((\in ++ i).asSymbol), 1),
NamedControl.kr((\freq ++ i).asSymbol, 440.0),
NamedControl.kr((\rq ++ i).asSymbol, 1.0),
NamedControl.kr((\db ++ i).asSymbol, 0.0),
NamedControl.kr((\mul ++ i).asSymbol, 1)
);
};
Out.ar(0, ins);
}.add;
};
f.(52); // fails
f.(51); // works