Thanks to a tip from Tom Lieber (who pointed out that WvOut doesn&#39;t actually handle stereo files), here&#39;s a snippet of ChucK code people might find useful:<br><br>if (me.args() &gt; 1) {<br>    dac.chan(0) =&gt; Gain g0 =&gt; WvOut w0 =&gt; blackhole;<br>
    dac.chan(1) =&gt; Gain g1 =&gt; WvOut w1 =&gt; blackhole;<br>    0.5 =&gt; g0.gain;<br>    0.5 =&gt; g1.gain;<br>    me.arg(0) =&gt; w0.wavFilename;<br>    me.arg(1) =&gt; w1.wavFilename;<br>    &lt;&lt;&lt; &quot;writing stereo output to files&quot;, me.arg(0), me.arg(1) &gt;&gt;&gt;;<br>
} else if (me.args() &gt; 0) {<br>    dac =&gt; Gain g =&gt; WvOut w =&gt; blackhole;<br>    0.5 =&gt; g.gain;<br>    me.arg(0) =&gt; w.wavFilename;<br>    &lt;&lt;&lt; &quot;writing mono output to file&quot;, me.arg(0) &gt;&gt;&gt;;<br>
}<br><br>Since it attaches to the dac, you can put it just about anywhere in your ChucK program.  When you invoke chuck as in :<br><br>% chuck mytest.ck:bleeep.wav<br><br>it will write everything your program sends to the dac to a mono &quot;bleeep.wav&quot; file.  If you invoke it as in:<br>
<br>% chuck mytest.ck:bleep_0.wav:bleep_1.wav<br><br>it will write everything you program sends to the dac to two mono files: bleep_0.wav (left channel) andn bleep_1.wav (right channel).  It&#39;s up to you to weave the two files together into a stereo sound file.  There are several ways to do it -- I tend to use Audacity.<br>
<br>- Rob<br><br>