<div>Fantastic! Thanks so much :-)</div><div><br></div><div id="protonmail_signature_block" class="protonmail_signature_block"><div><div>Roosna &amp; Flak - Contemporary Dance &amp; Music<br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br></div><div><a href="https://roosnaflak.com">https://roosnaflak.com</a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<caret></caret> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div></div></div>  <div><br></div><div><br></div>On Wed, Jul 8, 2020 at 00:37, Juan Reyes &lt;<a href="mailto:juanig@ccrma.Stanford.EDU" class="">juanig@ccrma.Stanford.EDU</a>&gt; wrote:<blockquote class="protonmail_quote" type="cite">  <br>&gt; 2. extract mono channel from stereo/multichannel file<br><br><br>Just found code to extract a channel from a soundfile. Hopefully this<br>would give you a start on Snd's interface.<br><br>   --* Juan<br><br>;; instrument or function definition on S7 to be loaded on Snd's<br>;;;listener::<br><br>(definstrument (extract file<br>                      (start 0.0)<br>                      (att 1.0)<br>                      (chan 0))<br>   ;;<br>     (let* ((in-file-sr (mus-sound-srate file))<br>           (in-file-dur  (/ (frames file) in-file-sr))<br>           (out-start-time 0)<br>           (out-duration (- in-file-dur start))<br>           (readA (make-readin :file file :channel chan))<br>           (beg (seconds-&gt;samples out-start-time))<br>           (end (seconds-&gt;samples in-file-dur))<br>           )<br>       (do ((i beg (1+ i)))<br>          ((= i end))<br>        (begin<br>          (let* ((sample (readin readA)))<br>            (outa i (* att sample)))))<br>       ))<br><br>Once this code has been saved, load it on Snd's listener by typing<br>something like:<br><br>;; (load "extractch.cms")<br><br><br>- Function or instrument call on the listener (in order to get the<br>channel extracted):<br><br>;;<br>;; (with-sound () (extract "eight-channels.wav" :chan 2))<br>;;<br>;;  This instrument call will open a new window in Snd.!!<br>;;  and will extract channel 3 from file "eight-channels.wav"<br>;;<br><br><br><br><br>_______________________________________________<br>Cmdist mailing list<br>Cmdist@ccrma.stanford.edu<br>https://cm-mail.stanford.edu/mailman/listinfo/cmdist<br></blockquote><div><br></div><div><br></div>