[chuck-users] Playing with fire

Stiefel, Van VStiefel at wcupa.edu
Fri Aug 21 11:15:03 EDT 2009


the animals in the neighborhood salute you ; )

***********
Van Stiefel
Assistant Professor
Department of Music Theory and Composition
Swope Music Building
College of Visual and Performing Arts
West Chester University
West Chester, PA 19383
Tel.: 610-436-2757



-----Original Message-----
From: chuck-users-bounces at lists.cs.princeton.edu on behalf of Kassen
Sent: Fri 8/21/2009 10:40 AM
To: ChucK Users Mailing List
Subject: [chuck-users] Playing with fire
 
Fellow ChucKists,

Yesterday I posted this to the forum and I thought people here might be
amused as well. I suppose it's "code art" but working from the idea that
some art can be ugly. It might also be a bit like a toddler who discovers he
*can* stuff beads up his nose and doesn't stop to pause whether he *should*
do so...

I'm sorry,
Kas.

UGen top;

fun UGen foo(int n)
    {
    if (n <= 0)
        {
        return dac;
        }

    else
        {
        ([new SinOsc, new TriOsc, new SawOsc, new SqrOsc])[ Std.rand2(0, 3)]
@=> UGen bar;

        1.0 / n => (bar $ Phasor).phase;
        (n%3) + 1 => (bar $ PulseOsc).sync;
        (75 * (n-1)) + 1 => bar.gain;
        (5 * n) => (bar $ Shakers).freq;

        if (n == 1) bar @=> top;
        bar => foo(n - 1);
        return bar;
        }
    }

Step stp => Envelope e;
true => stp.next;
6::second => dur loop => e.duration;

while (1)
    {
    top =< dac;
    !(e.value() $ int ) * 10000 => e.target;
    e => foo(([1, 4, 7, 10, 13])[Std.rand2(0,4)]);
    loop => now;
    }

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 3544 bytes
Desc: not available
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20090821/fb1f39b5/attachment.bin>


More information about the chuck-users mailing list