by Adam Tindale and Ge Wang
Say you want to record the output of the following:
%>chuck foo.ck bar.ck
All you have to do is ChucK a shred that writes to file:
%>chuck foo.ck bar.ck rec.ck
No changes to existing files are necessary. An example rec.ck can be found in examples/basic/, this guy/gal writes to “foo.wav”. Edit the file to change the output file. If you don’t want to worry about overwriting the same file everytime, you can substitute rec.ck for rec-auto.ck:
%>chuck foo.ck bar.ck rec-auto.ck
rec-auto.ck will generate a file name using the current time. You can change the prefix of the filename by modifying
"data/session" => w.autoPrefix;
w is the WvOut in the patch.
Oh yeah, you can of course chuck rec.ck on-the-fly.
From terminal 1
%>chuck --loop
From terminal 2
%>⁞chuck + rec.ck
%>chuck foo.ck bar.ck rec2.ck -s
This will not synchronize to the audio card, and will generate samples as fast as it can.
1 => w.record; // start 0 => w.record; // stop
As with all things ChucKian, this can be done sample-synchronously.
ChucK STK module keeps track of open file handles and closes them even upon abnormal termination, like Ctrl-C. Actually for many, Ctrl-C is the natural way to end your ChucK session. At any rate, this is quite ghetto, but it works. As for seg-faults and other catastrophic events, like computer catching on fire from ChucK exploding, the file probably is toast.
hmmmm, toast...
dac => Gain g => WvOut w => blackhole;
The WvOut writes to file, and also pass through the incoming samples.
There has been error in communication with Booktype server. Not sure right now where is the problem.
You should refresh this page.