Hi, and welcome back.
Mid / side matrix sounds quite complicated and advanced, right?
It's a good phrase to drop into a sentence when you want to impress someone with your
technical knowledge.
It's not so complicated really though.
Let's write some code to do it, using Reaper's JS programming environment:
I'll create a variable called 'mid', then 'equals', and now I want the left channel
added to the right channel.
So I'll type 'spl' short for sample, then zero, because computers count from zero, and
that gives us the first channel input; 'plus', spl1 gives us the second channel input; then
a semicolon to end the line.
Ok, now a variable called 'side', which needs to equal the left channel minus the right
channel, so spl0 - spl1.
Great, now let's write those mid and side values back to the first two audio channels
to replace the original signals:
spl0 equals mid, semicolon.
spl1 equals side, semicolon.
That should be it, right?
Ok, let's write the corresponding decoder:
This time I'll create a variable called 'left' which needs to equal mid plus side, so spl0
+ spl1.
Don't forget the semicolon!
And a variable called 'right' which needs to equal mid minus side, so spl0 - spl1.
And we'll write those values back to the input pins for the next plugin in the chain:
spl0 = left; spl1 = right;
Notice anything about those two bits of code?
They're the same!
Apart from the variable names of course, which doesn't matter.
We're adding and subtracting the two input channels either way.
There's a problem however: when I run this code on my audio…
everything gets much louder.
What have we done wrong?
Let's look back at the encoder: we've derived the mid channel by adding left and right together,
because it's just the mono sum, right?
But what people often forget about the mono sum is, you also need to divide the result
by two, otherwise your mix bus would clip as soon as you pressed the mono button.
And we need to do the same for the sides, so the relative levels don't change.
Now I can toggle both these plugins on and off, and nothing changes…
except of course anything in between will be processing mid and side instead of left
and right.
However, there was something curiously satisfying about the encoder and decoder being identical.
We could still do that actually: if I divide by the square root of two instead…
then I can do the same again for the decoder stage, and overall we’ll still be applying
the same amount of gain.
So I could have just one single mid side plugin which I would run two copies of, either side
of the plug-in in question.
As intellectually satisfying as this is however, its not ideal: as the mid channel is only
attenuated by 3dB in between the plugins, it leaves the possibility that it will clip
even if the left and right channels didn’t, which might matter in some situations.
So I prefer to abandon the elegance of the single unified encoder / decoder, and solve
a different problem instead.
I want to talk about ‘normal’ stereo width.
I don’t know if there’s an official definition of this, but in my experience, from recording
stereo pairs of microphones, and analysing mixes and references, a normal stereo width
will have the side channel roughly 6dB lower than the mid channel.
That doesn’t have to mean it sounds narrow: if the low frequencies are mono but everything
else is nice and wide, that can easily create that much difference.
Now lets imagine you’re using a stereo saturation or distortion plugin, without any option to
run it mid side instead of left and right.
Why would it offer that option you ask?
I'll demonstrate with FabFilter Saturn, which does provide that option.
Let's start in left right stereo mode: the input signal is a sine wave panned hard left,
plus another sine wave tuned a semitone higher and panned hard right.
When I push these sine waves hard into the Heavy Saturation algorithm they start to turn
into square waves, and they each get a full set of odd harmonics.
Ok, now let's switch to mid side mode: now those two sine waves are being distorted together
and intermodulating to create sum and difference partials as well.
Switch back to normal stereo; it's just two square waves again.
It's not the same is it?
Let's try with a full mix… definitely sounds different in mid side mode, right?
So perhaps the question should be: why would any stereo distortion or saturation plugin
not offer this option?
No problem then, just put it inside a mid side matrix.
But if I use the stock one, or something like MSED from Voxengo, the side channel is going
to end up significantly cleaner then the mid, being lower in level.
So here's an alternative approach: in my encoder plugin I'm going to gain compensate the mid
channel by dividing by two, but not the side channel.
And in the decoder plugin I'll divide the side channel by two but not the mid channel.
And now, in effect, the side channel in between the two is boosted 6dB in level.
I find this approach works very well for saturation and distortion effects, and can also be handy
for mid side compression, although most of the time I prefer to have separate controls
in that case, so I'll probably use two instances of the compressor rather than just one with
unlinked gain reduction.
It's a tiny little difference.
But I mention it for a couple of reasons: many people aren't aware that mid side saturation
sounds so different, and I want to encourage people to try it, and developers to add the
option to their distortion plugins.
But also, many people aren't aware that mid side matrixing is so simple and pleasingly
elegant.
And if you're a Reaper user and you'd like to have my MS matrix code, and you're too
lazy to type it out yourself, you'll find it in the description ready to copy and paste
into a text file like your other JS plugins.
That's all, thanks for watching.