Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How to do stereo narrowing with SoX? (Read 2697 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to do stereo narrowing with SoX?

I've been battling with this problem on and off for a while now, but SoX's remix option is just too complex for me to understand what I'm really doing.

The sound output on Amiga is hard stereo separated, 2 channels on the left and 2 channels on the right. Using SoX I would like to make a 60% downmix of a WAV recording to lessen the head splitting effect but preserve some stereo field.

SoX's remix effect looks like what I need, but I just don't understand the documentation well enough, and experiments so far have ended in failure.

Any SoX gurus out there can set me on the right path?

Doing this in Audacity with Stereo Butterfly plugin is trivial, but I haven't found a way Audacity can be used as a command line tool, for example in a bash script.

How to do stereo narrowing with SoX?

Reply #1
What do the 2 left and 2 right channels contain? Do you have 4 channels audio?

How to do stereo narrowing with SoX?

Reply #2
The Amiga has 4 8-bit "voices" so 4 samples can be played simultaneously. For some reason Commodore decided to place 2 of these voices on each Stereo channel. So you will always hear 2 instruments on the left and 2 on the right.

Hear an example  : http://www.se2a1.net/soasc/dl.php?d=soamc/...uin_T01_ORG.mp3

How to do stereo narrowing with SoX?

Reply #3
Create each output channel from a list of comma-separated input channel numbers, each followed by v (for volume) and a number between 0 and 1; usually so that the sum of these numbers, for each output channel, is 1.

This is also needed for some early '60s music so e.g.

Code: [Select]
play 01\ -\ I\ Saw\ Her\ Standing\ There.flac remix 1v0.8,2v0.2  2v0.8,1v0.2
play 01\ -\ I\ Saw\ Her\ Standing\ There.flac remix 1v0.7,2v0.3  2v0.7,1v0.3
play 01\ -\ I\ Saw\ Her\ Standing\ There.flac remix 1v0.6,2v0.4  2v0.6,1v0.4

gives decreasing stereo separation. (One more step, with all volume numbers 0.5, would give dual-mono.)

Maybe not in your case, but if have more than 2 input channels, just add them into the output channel lists as required, e.g.

Code: [Select]
sox in.wav out.wav remix 1v0.3,2v0.3,3v0.2,4v0.2  1v0.2,2v0.2,3v0.3,4v0.3

remembering to make the volume numbers sum to 1.

How to do stereo narrowing with SoX?

Reply #4
Create each output channel from a list of comma-separated input channel numbers, each followed by v (for volume) and a number between 0 and 1; usually so that the sum of these numbers, for each output channel, is 1.

This is also needed for some early '60s music so e.g.

Code: [Select]
play 01\ -\ I\ Saw\ Her\ Standing\ There.flac remix 1v0.8,2v0.2  2v0.8,1v0.2
play 01\ -\ I\ Saw\ Her\ Standing\ There.flac remix 1v0.7,2v0.3  2v0.7,1v0.3
play 01\ -\ I\ Saw\ Her\ Standing\ There.flac remix 1v0.6,2v0.4  2v0.6,1v0.4

gives decreasing stereo separation. (One more step, with all volume numbers 0.5, would give dual-mono.)


That works beautifully! I only tried the first line but that seems close to the amount of narrowing I need. The second line should be about spot on.

Huge thank you

How to do stereo narrowing with SoX?

Reply #5
Just tried your file, some stereo reverb helps fill things out a bit, and of course, you can EQ as you see fit, e.g.
Code: [Select]
play mod.harlequin_T01_ORG.mp3 remix 1v.65,2v.35 2v.65,1v.35 bass +3 treble +3 reverb 0


 

How to do stereo narrowing with SoX?

Reply #6
In fact given how those numbers seem to work, a 60% blend (each channel is mixed with the other at a 60% factor) should be your second example line. I could be wrong, but the sound seems to be right for that mix.

0.5,0.5 would be mono
0.6,0.4 would be 80% mix
0.7,0.3 would be 60% mix
0.8,0.2 would be 40% mix
0.9,0.1 would be 20% mix
1.0,0 would be full stereo

I think!

edit: fixed