[LAU] Library for simple audio programming

Kjetil Matheussen k.s.matheussen at notam02.no
Thu Jan 17 16:12:31 UTC 2013


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 at lists.linuxaudio.org [1]
>> http://lists.linuxaudio.org/listinfo/linux-audio-user [2]
>
>
>
> Links:
> ------
> [1] mailto:Linux-audio-user at lists.linuxaudio.org
> [2] http://lists.linuxaudio.org/listinfo/linux-audio-user
> [3] mailto:k.s.matheussen at notam02.no



More information about the Linux-audio-user mailing list