GameOfLife / Unit-Lib

The Unit Library is a system that provides high level abstractions on top of the SuperCollider language.
25 stars 6 forks source link

LocalUdef doesn't work #8

Closed woutersnoei closed 11 years ago

woutersnoei commented 11 years ago

Not sure since when, but it appears that LocalUdef inside a UChain doesn't fire the prepare action. Example:

x = UChain(LocalUdef('sine', { |freq = 440, amp = 0.1, lag = 0| UMixOut.ar( 0, SinOsc.ar( freq.lag(lag)+1, 0, amp.lag(lag) ), 0, true ) }), 'stereoOutput');

x.prepareAndStart; // never starts x.prepare( action: { "done".postln }); // never posts x[0].prepare( action: { "done".postln }); // does post..

Also, when using an UMap on one of the args it does work. Must be something with the MultiActionFunc stuff..

woutersnoei commented 11 years ago

Got it, fixed in commit. It was caused by the change of syntax in Udef:prepare, needed for UMapDef.