[chuck-users] Urgent shot in the dark -- Audible clicks when spawning shreds when SndBuf reads from disk

Szilveszter Tóth silvestre.toth at gmail.com
Sun Nov 8 10:28:56 EST 2009

Hi Kassen,

I'm sure it was me who misunderstood something...

This is what I thought:
When Mike's script sporks a new playFile() shred, this tells Chuck to 
read in two SndBufs and connect them to dac _before_ the next sample is 

I may be wrong, though
Szilveszter (Hillaby)

Kassen escribió:
> Silvester;
>     do you hear the click in the resulting tmp.wav? If not, then the
>     problem is with reading a file between samples. If yes, then the
>     abrupt sample change may play a role, too.
> I should clarify that ChucK doesn't need to calculate one sample per 
> samp. If that were the case then I think any non-trivial file-loading 
> would cause issues, which is of course untrue.
> ChucK doesn't hand values to the soundcard one by one, instead it does 
> so in blocks of tens, hundreds or thousands of samples (always a power 
> of 2). The thing that needs to be done is calculate -say- 512 samples 
> in a duration of 512::samp so assuming there is no heavy processing 
> going on we can deal with any peaks in cpu usage by increasing the 
> block size by enough.
> Timing-wise the loading still occurs "in between samples" but then 
> again; so does all our other code.
> I hope that clarifies things a bit. Shout if I misunderstood you.
> Yours,
> Kas.
> ------------------------------------------------------------------------
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users

More information about the chuck-users mailing list