Re: Library for simple audio programming

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Not if you're unsure about which channel to read from:

(call-with-output-file "test.ascii" (lambda (p)
  (let ((r0 (make-readin "filename.wav" 0))
        (r1 (make-readin "filename.wav" 1)))
    (while (and (< (mus-location r0) (mus-length r0))
                (< (mus-location r1) (mus-length r1)))
      (format p "~A~%" (if (= 0 (random 1)) (r0) (r1)))))))

On 17.01.2013 16:33, Paul Davis wrote:
 i note that the sox command for this is still the winner if we're
just counting brevity.

On Thu, Jan 17, 2013 at 10:24 AM, Kjetil Matheussen  wrote:

Bill Schottstaedt:

(call-with-output-file "test.ascii" (lambda (p)
 (let ((r (make-readin "filename.wav")))
   (do () ((= (mus-location r) (mus-length r)))
     (format p "~A~%" (r))))))

Can't get my head around 'do'. Prefer this:

(call-with-output-file "test.ascii" (lambda (p)
  (let ((r (make-readin "filename.wav")))
    (while (< (mus-location r) (mus-length r))
      (format p "~A~%" (r))))))

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx [1]
http://lists.linuxaudio.org/listinfo/linux-audio-user [2]



Links:
------
[1] mailto:Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
[2] http://lists.linuxaudio.org/listinfo/linux-audio-user
[3] mailto:k.s.matheussen@xxxxxxxxxx

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
http://lists.linuxaudio.org/listinfo/linux-audio-user



[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux