<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>cm clm s7<br><br>Hi,<br>I'm getting confused over :channels 2 for with-sound and stereo output. I was thinking to get stereo output I just needed to add the :channels 2 argument to with-sound if out-any is used in the instrument. <br><br>Seems like I can only get one channel (one side) with :channels 2. If I use :channels 1 I get dual mono (two sides).<br><br>If I try Fernando's move-osc with locsig the sound pans and I can see two channels using Snd as editor. But for examp2 below, I just get one channel.<br><br>I'm wondering where I might be getting confused.<br><br>Thanks,<br>Jim<br><br><br> (definstrument (move-osc beg dur freq amp <br> (degree 0.0) (dist 1.0) (reverb 0.03))<br> (let* ((start (seconds->samples beg))<br> (end (seconds->samples (+ beg dur))) <br> (car (make-oscil :frequency freq))<br> (loc (make-locsig :degree degree :distance dist :channels 2))<br> (pan-env (make-env '(0 0 1 90) :duration dur))) <br> <br> (do ((i start (+ i 1)))<br> ((= i end))<br> (let ((ut (* amp (oscil car))))<br> (move-locsig loc (env pan-env) dist)<br> (locsig loc i ut)))))<br><br><br>(with-sound (:output "test.wav" :srate 48000 :channels 2<br> :data-format mus-lshort<br> :header-type mus-riff) <br> (move-osc 0 3 220.0 0.75 0 1.0 0.3))<br><br>;;-------------------------------------------------<br><br>(definstrument (examp2 beg dur frequency amplitude)<br> (let* ((start (seconds->samples beg))<br> (end (seconds->samples (+ beg dur))) <br> (sine-wave (make-oscil :frequency frequency)))<br> (do ((i start (+ i 1)))<br> ((= i end))<br> (outa i (* amplitude (oscil sine-wave))))))<br><br>(with-sound (:output "test2.wav" :srate 48000 :channels 2<br> :data-format mus-lshort<br> :header-type mus-riff) <br> (examp2 0 3 220.0 0.75))<br><br>                                            </div></body>
</html>