[chuck-users] Std.srand() abuse

Kassen signal.automatique at gmail.com
Tue Jul 14 14:23:48 EDT 2009


Dear list,

While exploring noise UGens I chanced upon the rather interesting technique
of periodically resetting Std.srand() which sets the seed for noise in
ChucK, thus resetting the output of the noise UGens;

//mind your speakers, ears and neighbours!
SubNoise n => dac;

.2 => n.gain;

while(1)
    {
    ((now/2::second)$int)%8 + 2 => n.rate;
    now%250::ms+ms=>now;
    5 => Std.srand;
    }

Interestingly this type of modulation is system-wide so running two files
that both try to do this at the same time will result in rather complex
sounds.

Have fun,
Kas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20090714/a490e0ed/attachment.html>


More information about the chuck-users mailing list