NodeProxy accepts an array as 4th argument of its default constructor and will initialize the sources array to this, e.g.
~fa = [{ 0.5 * SinOsc.ar(777) !2}, {0.5 * SinOsc.ar(333) !2}]
x = NodeProxy(s, \audio, 2, ~fa).play
x[1] = nil // turn off just one
But Ndef
seems to have an odd behavior when passed an array like that:
Ndef(\ah, ~fa).play
hangs the sever with 100% one-core CPU utilization. The server still can be manually force stopped though, i.e. crashed.
Why is that last line causing that live-lock behavior?
I did figure out that that is calling into the equivalent of NodeProxy.source (not the plural sources
) and the singular method of NodeProxy goes haywire as well if passed an array:
~fa = [{ 0.5 * SinOsc.ar(777) !2}, {0.5 * SinOsc.ar(333) !2}]
NodeProxy(s, \audio, 2).source_(~fa) // server hang
But I haven’t traced the code paths any further. I’m not sure if this normal behavior or not.