[chuck-users] sndbuf glitch
Scott Smallwood
scott.smallwood at ualberta.ca
Tue Mar 9 08:37:21 EST 2010
Hey ChucKians,
So, I've talked to some of you about this problem before, and have
been given various solutions, including playing with chunking, but so
far, nothing has been able to resolve this basic issue. It's really
kept me from doing any significant work with sound buffers ChucK.
Here's the issue:
When you read a file into a sound buffer - doesn't matter how large
the file is, the audio "clicks". Doesn't matter what else is
currently "playing", whether it's an oscillator, another sndbuff, etc
- it just invariably clicks.
Case and point:
----
SndBuf s1 => dac;
SndBuf s2 => dac;
0 => s2.gain; //turn down the gain of 2 so you can hear the click
"file1.aif" => s1.read;
2::second => now;
"file2.aif" => s2.read;
2::second => now;
----
So, this script starts playing the first file, then in 2 seconds when
it loads "file2.aif" into the other SndBuf (who's gain is turned town)
- CLICK!
I know - this can be resolved by loading all needed soundbufs at the
top of the code, but this is very restrictive. I want to be able to
load in new audio on-the-fly - but currently, Chuck simply doesn't
seem to support this basic feature.
Anybody have any clues here?
--ss
[ - ] - [ - ] - [ - ] - [ - ] - [ - ] - [ - ] - [ - ] - [ - ] - [ - ]
S c o t t S m a l l w o o d
composer, sound artist
faculty of arts, u of alberta
scott.smallwood at ualberta.ca
http://www.scott-smallwood.com
http://www.ecnedive.com
More information about the chuck-users
mailing list