Inverting and dB conversion

Hi gang,
So I have a rather interesting question regarding inverting two tracks and the peak level which occurs after inverting one of the tracks and changing the gain.
What I’d like to do is use the Stereo Widener plugin to decrease the center mid channel by exactly -3 dB. However, when I type in -3 for the inverted signal volume, this drops the mid channel by a huge amount. What it does is, it inverts the mid channel and adds it to the existing track, so when it is set at 0, only the difference channel will be heard. I also did an experiment by inverting one of two identical tracks and then changing the gain on one of these to see how much the peak is.
So, does anyone know if there is a factor that calculates the peak level with a given gain change as the tracks are inverted? Interestingly as the levels get lower and lower, the peak levels become higher and higher. Like, here is what I discovered:
Two tracks at 0 dB, one inverted, = silence.
-1 dB = -19.3
-2 dB = -13.8
-3 dB = -10.7

So where the heck do these peak levels come from? Does anyone know how they’re calculated?
I guess the simpler way would be to have one track being the middle / center channel and the other track the difference channel and raise either one by the dB amount. But how does Stereo Widener calculate this? All I know is that the difference channel is the same level when you run the command.
Thanks in advance.

Michael

I don’t know how the widener works… If you invert one channel It can give a “spacey - widening” impression because of the way the out-of-phase sound waves bounce-around and combine acoustically.

Two tracks at 0 dB, one inverted, = silence.

I’m not exactly sure what you’re doing… You’ll only get silence if you subtract (mix a file with an inverted copy). Mixing is done by addition and you when you add a negative you are subtracting.

You can only get perfect cancelation electrically or digitally. Because of the waves bounce-around, and normal distance-related phase shifts you can’t get perfect cancelation acoustically (in the air), although you can get pretty-good bass cancelation acoustically.


6dB is double the amplitude and if you subtract left from right you can get up-to a 6dB increase IF there are 0dB peaks that are out-of-phase in both channels. (Subtraction of a negative is addition.) Typically the difference file is quieter than the original, but it’s not that unusual to have some higher-than-original peaks.

  • 1 dB = -19.3
    -2 dB = -13.8
    -3 dB = -10.7

dB = 20log (A/Aref)
A/Afef = 20 x 10 (to the power of dB)

So… -3dB is about 70% and -10dB is about 30%. If subtract (invert and add) a -3dB copy (70%) you have 30% (-10dB) remaining.


P.S.
All “artificial widening effects” can potentially have unwanted side-effects, especially when the altered file is played-back on a mono system. These effects should be used carefully and selectively, and it’s a good idea to check mono playback unless you’re sure it will never be played in mono. You can also get “different” results on headphones so you might want to check the results on speakers and headphones.

This one? Missing features - Audacity Support

Yes, that is the plugin I’m talking about.

Your analysis is close :slight_smile:

It does add “something” to the existing track.
What it adds is a copy of the stereo track that has been manipulated in a rather (overly) complex way.

Let’s call the left channel “L”, the right channel “R”, the “Volume” setting “V” and the “Pan” setting “P”,
where “V” has been converted from dB to a linear scale 0 to 1,
and “P” has been converted from “negative %” to a range of -1 to 0.
I’m using “*” as the multiplication symbol, “+” for addition, and “-” for subtraction:

Original track = L | R

Processed left channel = (-1 * V * L * (P + 1) x 0.5) + (-1 x V x R * (P - 1) * -0.5)
Processed right channel = (-1 * V * R * (P + 1) x 0.5) + (-1 x V x L * (P - 1) * -0.5)

To see what’s happening, we can simplify these calculations as:

Processed left channel = V/2 * (((P - 1) * R) - ((P + 1) * L))
Processed right channel = V/2 * (((P - 1) * L) - ((P + 1) * R))

So, to the Left channel, it adds a bit of the inverted Left channel, and some Right channel.
Similarly, to the Right channel, it adds a bit of the inverted Right channel and some of the Left channel.

Assuming that the “Time offset - ms” is zero (default), adding a bit of “inverted” left channel to the original left channel, is equivalent to reducing the amount of original left channel.

One of the difficulties with many of David Sky’s plug-ins is that he often has controls that are “coupled”. That is, two (or more) controls interact with each other. In this case, the amount of “spread” is controlled by a combination of the “Inverted signal volume - db” and “Pan position” controls, according to the above formulae.

There’s a much easier way to do this.

Download and install the “Channel Mixer” plug-in from here: Missing features - Audacity Support

Normal “stereo” tracks don’t have a physical “center” channel, they just have “left” and “right”. “Center” is just audio that is common to both left and right. However, it is possible to represent stereo as “center” and “side” channels (called “mid-side encoding”), and the “Channel Mixer” plug-in can do that.

An important concept is that mid-side encoding and mid-side decoding, are essentially the same.

When encoding:
Mid = (Left + Right)/2
Side = (Left - Right)/2

When decoding:
Left = (Mid + Side)/2
Right = (Mid - Side)/2

The overall gain from round-trip encoding → decoding is -6.021 dB.

So, the process to reduce the “center” of a stereo track by 3 dB is:

  1. Apply “Channel Mixer” with “Mid-Side Decode” preset (this is actually “encoding” as mid-side stereo)
  2. Split stereo track (Splitting and Joining Stereo Tracks - Audacity Manual)
  3. Amplify the top track by -3 dB (this is the “center” / “mid” channel)
  4. Join the two tracks to create a stereo track
  5. Apply “Channel Mixer” with “Mid-Side Decode” preset (decode back to normal stereo)
  6. Amplify by 6.021 dB (make up for round-trip gain)