Re: implementing loudspeaker crossovers using Sox + LADSPA plugins

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

 



Greetings Eric,

I'm part of a small group that is interested in DSP using ARMhf boards like
RPi and BBB.  Sox has been a great tool for simpler tasks, but now I would
like to try the objective of the original poster, Charlie.  I'm using SoX to
process a stream from a 2-channel ALSA 'recording' source and send filtered
output to a different 2-channel ALSA plug.  ...it works great like this: 

sox --buffer 1024 -r 48000 -c 2 -t alsa hw:1,0 -t alsa plug:filter1 gain -h
fir /usr/filter/fir2peak48mild.txt

This also works with LADSPA filters like this:

sox --buffer 1024 -r 48000 -c 2 -t alsa hw:1,0 -t alsa plug:filter1 ladspa
ACDf 21 1 0 240 0.707 0 0 ladspa ACDf 21 1 0 240 0.707 0 0

However, I'm stuck when I try to split clone the streaming source using the
syntax in your message:
Eric Wong wrote
> 	sox -M \
> 	    "|sox i.wav -p remix 1v1 highpass $XO highpass $XO $HI_FX1" \
> 	    "|sox i.wav -p remix 1v1 lowpass $XO lowpass $XO $LO_FX1" \
> 	    "|sox i.wav -p remix 2v1 highpass $XO highpass $XO $HI_FX2" \
> 	    "|sox i.wav -p remix 2v1 lowpass $XO lowpass $XO $LO_FX2" \
> 	    output.wav \
> 	    remix -m 1,2 3,4

Inserted into the above, this:
“|sox -t alsa hw:1,0 -p remix 1v1 ladspa ACDf 21 1 0 240 0.707 0 0 ladspa
ACDf 21 1 0 240 0.707 0 0”  \

produces three of these alerts:
"sox FAIL formats: can't open input  `hw:1,0': snd_pcm_open error: Device or
resource busy"

Other attempts to specify and clone the inputs all failed as well:
"sox FAIL sox: Not enough input filenames specified"

If you have any advice on getting SoX to clone an ALSA streaming source
(e.g., a stereo signal from 'hw:1,0') for input into multiple effect chains,
it would be much appreciated.  As well, any additional advice in correctly
defining each sub-stream for ALSA output would undoubtedly help.  Output
could go via hardware (hw:0,0), or via user space into an ALSA plug.  Either
way, SoX offers advantages in the ability to combine a multitude of useful
effects.  [Think: a digital-level "miniDSP" using a RPi...]  We just need to
better understand channel creation and management for continuous streaming.

Many thanks in advance!

Frank




--
View this message in context: http://sox.10957.n7.nabble.com/implementing-loudspeaker-crossovers-using-Sox-LADSPA-plugins-tp5464p5712.html
Sent from the SoX mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Sox-users mailing list
Sox-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sox-users




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

  Powered by Linux