|
From: Eric W. <nor...@yh...> - 2015-06-27 12:27:17
|
sox can take other commands (especially sox command) as inputs using "|command" So you would use remix and "--combine merge" as appropriate Probably something like the following for Linkwitz-Riley crossover (which is two Butterworth crossovers in series) # crossover frequency of 1500 Hz XO=1500 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 Note: totally untested. First, we use "-M" (same as --combine merge) since we'll be merging in the main sox process. The next four lines with "|sox ..." sets up the inputs, each of each makes a mono channel from an independently running sox process. The use of "-p" means each of these sub-commands will output in the sox internal data format for the main sox instance to read. Two high-frequency channels, two low-frequency channels. Then you have the output.wav as the destination. HI_FX1 will be the effects you want to affect the high frequencies in the left channel, LO_FX1 are the effects you want on the low frequencies in the left channel. Ditto for *_FX2 placeholders in the right channel. Finally, the "remix" effect (along with the -M as the first arg) combines the first two channels (1=hi1,2=lo1) into the left channel, and 3=hi2,4=lo2. We use -m with remix to avoid power adjustments when recombining two channels (because the crossover makes it unnecessary for the recombining to overload) Hopefully this makes sense. Please be patient with us, most of us are not watching this list 24/7 and only have time for this on weekends (and not much at that). |