Closed miguel-negrao closed 10 years ago
As each UEnvGen adds 128 control inputs (32 nodes of 4 values each) , I suppose some maximum of control inputs is exceeded here.
\expPulses.asUdef.synthDef.controls.size; // -> 1157
I would guess the maximum is 1024 or something around that. Why do you hard-code all envs into the def? You could easily use \envelope UMaps in this case, which would be much more flexible, and probably run without problems.
It wasn't my code (I got other people to start using Unit Lib in SARC in order to use ImmLib, my phd library :-) ), but yeah you're right I can suggest to switch to UMaps. In any case I don't think the server should go into 100%cpu, it should give an error (already reported on list). Also, if it's really just because of the synthdef and the number of control inputs, isn't it strange that that
(
x = UChain(0, 0, 30, [ 'expPulses']);
x.prepareAndStart
)
doesn't hang the server ? It seems it only happens with values set to those controls...
Number of controls per se doesn't seem to be issue here. This Udef with 2561 controls doesn't hang the server. It's really a combination of the number of controls and the actual values you pass to it...
(
Udef(\test,{
20.collect{ |i| UEnvGen.kr(("a"++i).asSymbol,[50,17000,\exp]) };
});
)
Udef.
\test.asUdef.synthDef.controls.size
(
UChain([\test,
20.collect{ |i| [("a"++i).asSymbol,EnvM([100,100],[1]) ] }.flatten
]);
)
It was a nasty (and stupid !) bug in the class library !!! This commit will fixit once it's merged into supercollider's main git repo https://github.com/miguel-negrao/supercollider/commit/282967196fd047ce62c3f5524c656534df7d9709
After a couple of hours trying to debug this I'm still clueless why, but this hangs the server every time: