Some DAWs (Cubase as an example) can't export multiple audio files depending on their channelcount. So we can export multiple tracks as mono or multiple tracks as stereo, but not mono outputs as mono tracks and stereo outputs as stereo tracks. We need to manually check which tracks have mono output (and it is of course time consuming, distracting and potentially generates mistakes).
SoX might be an excellent tool to help with this problem. It should scan through the stereo audio file and check if it really is stereo file or is it Left channel=Right channel file. If both channels share the same audio data, SoX drops one channel and leaves just the mono file. Doing it in batch mode on whole folder would be the fastest and effective method.
You can check if a stero file actually has two identical channels using the command
sox file.wav -n remix 1,2i stat
and looking at the "Maximum amplitude" figure it prints.Thanks, your remix/stat idea works great!
I did a small script for windows (cmd) that's taking care of the dual mono files. Of course use at your own risk, as nothing guaranteed :)
http://kamilbaranski.com/pliki/art/finddualmono.bat
Nice script Kamil, though comparing MaxAmp = 0 can be fooled with a crafted file with enough DC negative offset to just peak at 0, and will skip not perfect mono files (ie: dithered) . If first 4 chars of RMS amplitude = "0.00" will detect "almost" mono files whose L-R amplitude is less than -40 dB.
Your batched slightly inspired me to "solve" this: https://sourceforge.net/p/sox/feature-requests/228/#0887
Here's an improved batch with that idea, which can optionally take FLACs:
Last edit: isidroco 2022-09-14