0

I would like recode wav files from stereo to 4 channels - front channels with low frequencies and back channels with high frequencies only; to store wav files on DLNA server and play on receiver in bi-amp mode - stereo channels on front and high frequencies on back. Speakers stand side by side. Receivers have option split subwoofer frequency. So, I think there is command split audio frequencies in ffmpeg, sox or other command line.

In short, I would like create 4 channels wav audio. Front stereo sound channels with low frequency and back channels with high frequency of sound. So, left channel splited on 3kHz to front and back. And right channel splited to front and back too.

Can and how I do split wav stereo, for example on 3,000 Hz, to 4 channels wav?

2022-02-06:

Microsoft Windows [Version 10.0.19044.1466]
(c) Microsoft Corporation. All rights reserved.

C:\Users\Public\Downloads\ffmpeg\bin>ffmpeg -i in.wav -af "lowpass=f=3200" out-.wav

C:\Users\Public\Downloads\ffmpeg\bin>ffmpeg -i in.wav -af "highpass=f=3200" out+.wav

Strange, output file size equal to input file size,

And one more option,

C:\Users\Public\Downloads\ffmpeg\bin>ffmpeg -i in.wav -filter_complex 'acrossover=split=1500:order=8th[LOW][HIGH]' -map '[LOW]' low.wav -map '[HIGH]' high.wav
ffmpeg version n5.0-4-g911d7f167c-20220206 Copyright (c) 2000-2022 the FFmpeg developers
... skiped ...
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from 'in.wav':
  Duration: 00:01:42.23, bitrate: 1411 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
[AVFilterGraph @ 000001c5bc017300] No such filter: 
'acrossover=split=1500:order=8th[LOW][HIGH]'
Error initializing complex filters.
Invalid argument

Then will use amerge to join the result to 4 channels. Then DAC outputs analog audio to 4 channels. Low to one amp and high frequencies to other amp.

SOLUTION

HZ="2700"
sox inp.wav "$HZ"-.wav lowpass $HZ
sox inp.wav "$HZ"+.wav highpass $HZ
sox -M "$HZ"-.wav "$HZ"+.wav out.wav
3
  • 1
    bi-amping doesn't use four channels, it uses two. Either a) each speaker unit receives identical signals. The crossover [& optionally pair of amps] is inside each speaker unit. or b) the amp has the crossover & pre-shaped signal is sent to each of the speaker's discrete drivers. There are variants of both of these but that's the essential difference. You'd need a quad-channel amp [& sound source] to do the way you want. Splitting your frequencies arbitrarily between four discrete speaker units placed at random positions near each other is a really good way to mess up your phase timing.
    – Tetsujin
    Jan 8 at 15:45
  • 3
    This sounds like a solution to a problem that hasn't been explained. What exactly is it you are trying to achieve? Don't outline a technical solution - outline the end result that you are looking for.
    – Mark
    Jan 12 at 9:47
  • btw: 10sec of silence and 10sec white noise has both the same file size ...it just makes no difference if you are using the wav format. And I don't get the point of this task, but to me it sounds like: please don't try this, except you like phasing and interferences. Mar 28 at 23:59

1 Answer 1

0

With Reaper (free evaluation licence, low cost - $60 - usage licence), you can :

Use a 4-band crossover splitter, assign each band to one of 2 outputs (and use the crossover as a 2-band crossover splitter). (2x2 outputs since you have right and left channels).

But Reaper is not a simple software as Audacity. (You need to use the Route button of the master track and your song track to add 2 channels, you need to insert an effect - the 4-band crossover splitter - then, in the routing matrix of the effect, assign each of 8 channels to one of the 4 channels you want...). You have to insert your file on your song track, render the project with 4 channels.

Then you have what you want : a 4 channels WAV file.

3
  • Can I convert 1,000 files at once in command line or so? Jan 13 at 14:42
  • No, but when all is prepared, processing a new file is not long : suppress the old sound, insert the new one, file render to export the processed file. Reaper has scripting functions, then you can automate things… with a bit of programming. (Reaper specific language, Lua or Python 2.7) Jan 13 at 15:34
  • The Reaper API is here reaper.fm/sdk/reascript/reascripthelp.html … it is quite complex ! Jan 13 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.