[chuck-dev] hotswapping UGens

Kassen signal.automatique at gmail.com
Wed Jan 21 10:52:32 EST 2009


It doesn't seem like the melody should keep playing on the Shakers
> since the noteOn is being called assuming the instrument is a Sitar.
> :D
I feared a crash at that point as well, yes, but apparently only the name of
the function needs to match. To put it bluntly;

//warning; very perverse code ahead
new SinOsc @=> UGen u => dac;
second => now;

500 => (u $ LPF).freq;
second => now;

I'm quite excited by this, It's like a huge new feature without the need for
a actual update.

If you'd like to do it cleanly you could instantiate StkInstrument instead
of UGen and probably cast to that for the noteOn() as well. This should lead
to less chance of crashing and more protection by the parser.

It's not as exciting though.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-dev/attachments/20090121/dc75ad92/attachment.htm>

More information about the chuck-dev mailing list