[CM] out

James Hearon j_hearon at hotmail.com
Thu Jun 16 10:54:03 PDT 2022


Hi,
I think I've had a basic misunderstanding re: re stereo and using out such as outa, outb, outc, outd. It seems to sum rather than provide discrete outs?  I'm just checking I'm not going bonkers looking at the fft of the output signal.  I know locsig works differently

ex.1 results in 880 hz on a and b, but would expect 440 on a and 440 on b.
(with-sound (:play #f :channels 2)
  (let ((gen (make-oscil 440.0)))
    (do ((i 0 (+ i 1)))
        ((= i 48000))
      (outa i (* 0.5 (oscil gen)))
      (outb i (* 0.5 (oscil gen)))
      )))

ex.2 but to have have the same signal on both channels I need to use 2 gens?
(with-sound (:play #f :channels 2)
  (let ((gen (make-oscil 440.0))
          (gen2 (make-oscil 440.0)))
    (do ((i 0 (+ i 1)))
        ((= i 48000))
      (outa i (* 0.5 (oscil gen)))
      (outb i (* 0.5 (oscil gen2)))
      )))

Or how do you best do stereo using out?
This seems to sum as well.

(with-sound (:play #f :channels 2)
  (let* ((gen (make-oscil 440.0))
             (gen2 gen))
    (do ((i 0 (+ i 1)))
        ((= i 48000))
      (outa i (* 0.5 (oscil gen)))
      (outb i (* 0.5 (oscil gen2)))
      )))


Regards,
Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20220616/ddd9b75d/attachment.html>


More information about the Cmdist mailing list