[CM] LADSPA implementation
e deleflie
edeleflie at gmail.com
Tue Jun 19 07:28:28 PDT 2007
Hi Bill,
Yes, now the output of the LADSPA plugin is being properly written out
to the outsound.
However, the content of the insound is in there with it ...
Actually, if I perceive correctly, the content of the insound has
always been in the result since I started using the readers as the
input (to get rid of the files getting written to /tmp/snd_*.snd). Is
it possible that using the reader somehow results in the contents of
the reader to be included in the outsound ?
Etienne
On 6/19/07, Bill Schottstaedt <bil at ccrma.stanford.edu> wrote:
> Your code looks right to me. I think this select-sound kludge doesn't
> do quite what I thought. I added two optional arguments to
> apply-ladspa to set the output sound index and channel number, so I
> think your code can be:
>
>
> #!/usr/local/bin/snd -b
> !#
> (use-modules (ice-9 format))
> ; set some global variables
> (set! (ladspa-dir) "/usr/lib/ladspa")
>
> (let* ((outsound (new-sound "out.wav" :channels 2))
> (insound (open-sound "in.wav")))
>
> (let ((readers
> (list (make-sample-reader 0 insound 0)
> (make-sample-reader 0 insound 1) )))
>
> ; execute the ladspa plugin
> (apply-ladspa readers
> (list "amp.so" "amp_stereo" 0.5)
> (mus-sound-frames "in.wav")
> "applying amp_stereo"
> outsound 0)
>
> ; free up the reader buffers
> (for-each (lambda (r) (if r (free-sample-reader r))) readers))
>
> ; write outsound to disk
> (save-sound-as "out.wav" :sound outsound)
>
> (close-sound insound)
> (close-sound outsound)
> )
> (exit)
>
>
> I updated the CVS and snapshot versions of snd-ladspa.c, but
> I don't have any easy way to test this change, so please let me know
> if it's broken.
>
>
>
More information about the Cmdist
mailing list