//record_stereo.ck //ChucK sample file modified by Michael Svolos //for MUSIC 220b final project "glacial sky" // chuck this with other shreds to record to file // example> chuck foo.ck bar.ck rec (see also rec2.ck) // pull samples from the dac // WvOut2 -> stereo operation dac.chan(0) => Gain gL => WvOut wL => blackhole; dac.chan(1) => Gain gR => WvOut wR => blackhole; // set the prefix, which will prepended to the filename // do this if you want the file to appear automatically // in another directory. if this isn't set, the file // should appear in the directory you run chuck from // with only the date and time. "LEFT" => wL.autoPrefix; "RIGHT" => wR.autoPrefix; // this is the output file name "special:auto" => wL.wavFilename; "special:auto" => wR.wavFilename; // print it out <<<"writing to file: ", wL.filename()>>>; <<<"writing to file: ", wR.filename()>>>; // any gain you want for the output .4 => gL.gain => gR.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 7::minute => now; wL.closeFile(); wR.closeFile(); <<< "files closed" >>>;