[chuck-users] Kassen's Phasor

Kassen signal.automatique at gmail.com
Wed Jul 15 17:09:41 EDT 2009

In case there are still people who aren't yet tired of my explorations
around Std.srand();

Below is a short study that plays 8 notes on Flute. As Flute uses a random
excitation signal that is based on the central random number generator we
can affect the sound of Flute by calling Std.srand to reset the seed. In
this case it is reset quite rapidly, making every note identical with a
distinct synthetic character. After the first 4 notes we start adding extra
Flutes that play silently yet still tick the random generator, resulting in
a timbral change in the first flute which we hear in the following 4 notes.

For your enjoyment;

Flute f[8];
f[0]=> dac;

//avoid distracting modulation
0 => f[0].vibratoGain;

for(int i; i<8; i++)
    if(i > 3) //after the first 4 notes
        //note the use of silent flutes affects the sound of f[0]
        //by still ticking the pseudo random number generator
        f[i] => dac;
        0 => f[i].gain;
        1 => f[i].noteOn;
    .5 =>f[0].noteOn;

    now + .5::second => time later;
    while (now < later) //the actual modulation
        0 => Std.srand;
        2::ms => now;

    0 => f[0].noteOn;
    .5::second => now;

During a walk, this afternoon, I contemplated constrasting a Flute that was
prepared in this way against a normal one, thinking the distinct timbre
might contrast nicely against the more natural sound of the plain Flute,
this -of course- won't work as they would use the same random generator.
What we also can't have is random melodies to play sounds that are using
this technique, at least not unless we implement our own random number
generator as a public class. Sadly we can't have our cake and put it in the
blender, at least not at the same time.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20090715/65acbd21/attachment.html>

More information about the chuck-users mailing list