[chuck-users] WAV playback gets louder with each iteration
Brian Robison
brobison at gmail.com
Sun Jan 5 00:07:14 EST 2020
Hi, ChucK users! I'm having a problem that seems like it should have a
simple solution, but I can't figure it out.
Here's a program which plays a WAV (which is about 1.5 seconds long) every
two seconds, several times:
SndBuf buf;
"d3-fa.wav" => buf.read;
0.2 => buf.gain;
2000 => int notelen;
for (0 => int i; i < 20; i++) {
0 => buf.pos;
buf => dac;
notelen::ms => now;
}
Each time (using ChucK 1.4), it gets louder, and I can't figure out why.
What am I getting wrong?
Thanks!
Brian
PS. you can find my d3-fa.wav here:
https://drive.google.com/file/d/1B0ZNnGNcF5BKGzmYpdMYdZOO5SbC_4FQ/view
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20200104/8e5717c2/attachment.html>
More information about the chuck-users
mailing list