Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
23
Task/Record-sound/ChucK/record-sound.chuck
Normal file
23
Task/Record-sound/ChucK/record-sound.chuck
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
// chuck this with other shreds to record to file
|
||||
// example> chuck foo.ck bar.ck rec
|
||||
|
||||
// arguments: rec:<filename>
|
||||
|
||||
// get name
|
||||
me.arg(0) => string filename;
|
||||
if( filename.length() == 0 ) "foo.wav" => filename;
|
||||
|
||||
// pull samples from the dac
|
||||
dac => Gain g => WvOut w => blackhole;
|
||||
// this is the output file name
|
||||
filename => w.wavFilename;
|
||||
<<<"writing to file:", "'" + w.filename() + "'">>>;
|
||||
// any gain you want for the output
|
||||
.5 => g.gain;
|
||||
|
||||
// temporary workaround to automatically close file on remove-shred
|
||||
null @=> w;
|
||||
|
||||
// infinite time loop...
|
||||
// ctrl-c will stop it, or modify to desired duration
|
||||
while( true ) 1::second => now;
|
||||
Loading…
Add table
Add a link
Reference in a new issue