[chuck-users] More buffer record and samplelooping

Hans Leeuw h.j.leeuw at chello.nl
Wed May 31 14:58:26 EDT 2006

Hi list,

I tried a few things with the array solution mentioned. It works but it
takes a lot of the processor. I got about 10 sporks going (plain playing),
but I'd like to use some of the flexibility of 'sndbuf'
So I'd like to try writing to disk and using a sndbuf as well. But with the
following lines of code it does not work. The sound is not properly written
to disk.

//sucking samples;
adc => WvOut w => blackhole;
// this is the output file name
"/Users/hansleeuw/miniaudiclefolder/examples/data/trumpet.wav" =>

1 => w.record;             //start recording
2::second => now;         //a soundfile of 2 seconds
0 => w.record;             //stop recording

w.closeFile;                 //to do it properly (also tried without)

// Now loading the soundfile in and here the program crashes
// (miniaudicle and terminal)
sndbuf buf => dac;
"/Users/hansleeuw/miniaudiclefolder/examples/data/trumpet.wav" => buf.read;

while( true ) 1::second => now;

In terminal I get the messages:
ugen_xxx.cpp:1986: failed assertion `d->fd == NULL'
Abort trap

What can be the problem?
It seems the soundfile is not written properly. Quicktime gives "incorrect
duration" (-1024).
I don't have a problem loading 'proper' soundfiles with sndbuf.

Thanks for your time.

Best, Hans.

More information about the chuck-users mailing list