[chuck-users] Heartbeat

Aylon Eduard eduard.aylon at gmail.com
Wed Oct 19 12:33:53 EDT 2005


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;
}



On 10/19/05, Nelson Ferraz <nferraz at gmail.com> wrote:
>
> 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 at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20051019/6f1ba9b7/attachment.htm


More information about the chuck-users mailing list