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

save last target, use it for livecoding UChainGUI feature #10

Closed miguel-negrao closed 11 years ago

miguel-negrao commented 11 years ago

How about this for saving the last used target.

test code:

(
Udef(\test, {
    UOut.ar(0, WhiteNoise.ar() )
})
)

(
Udef(\test, {
    UOut.ar(0, SinOsc.ar(1000) )
})
)

(
t = Group();
"using group % for target".format(t).postln;
x = UChain(\test, \stereoOutput).ugroup_(\test).prepareAndStart(t);
UChain(\sine, \stereoOutput).ugroup_(\test).prepareAndStart(t);
y = x.gui;
y.autoRestart_(true);
)
woutersnoei commented 11 years ago

Yes, seems useful for other purposes as well.