[chuck-users] Heartbeat

Nelson Ferraz nferraz at gmail.com
Wed Oct 19 12:27:18 EDT 2005


I was wondering if it would be possible to use ChucK to script wave
files, and I found the answer in one of the "towers of annoy" example
-- yes, it's possible.

Here's my first ChucK program, which I called "hello_wav.ck":

// the sound samples
sndbuf my_sample;

// load files
"wav/Heartbeat Bass.wav" => my_sample.read;

// set gain
.5 => my_sample.gain;

// play
my_sample => dac;
3::second => now;


It worked just fine.

Now, I'd like to play the heartbeat sound "ad infinitum"... I tried
this, but it doesn't work:

while (1) {
        my_sample => dac;
        3::second => now;
}

Any ideas?


More information about the chuck-users mailing list