I think you need to set the starting position where to read the buffer from inside the while-loop.
something like:
while (1) {
0 =>my_sample.pos;
my_sample => dac;
3::second => now;
}
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?
_______________________________________________
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users