## Mid Side processor in Max MSP

Aug 10 2011 | 1:54 pm
Hi :)
Did you know how to extract mid and side from stereo signal?
Thanks!

• Aug 10 2011 | 3:01 pm
Mid = L+R Side = L-R
:)
• Aug 10 2011 | 3:46 pm
Mid = L+R Sides = L-R & R-L
• Aug 10 2011 | 6:19 pm
On a side note, by what factor should I scale the side audio by to account for the perceived difference in gain?
• Aug 10 2011 | 7:10 pm
check the patch for scaling...
LR to MS patch:
• Aug 10 2011 | 8:26 pm
Much appreciated.
• Aug 11 2011 | 8:04 am
"Side = L-R"
yeah, you wish. :)
• Aug 11 2011 | 9:58 am
"yeah, you wish. :)"
if you don't believe that side=L-R, download this http://www.brainworx-music.de/en/plugins/bx_solo free plugin from Brainworks and compare the results. or if you use Live, you can do LR to MS transformation with two utilities and an effect rack. set the stereo width (maybe it's called otherwise) parameter of one utility to 0% (Mid or mono) and the other to 200% (sides)...
• Aug 11 2011 | 10:02 am
Well it does Roman ... unless you have a better way? If you do, please do tell us :)
• Aug 11 2011 | 11:33 am
somebody posted one here for me about two years ago ... but i cant find it now. mid/side means mono and not-mono ... this can only be done by phase, -~ will do nothing. :)
start with the "mid" and you will see what i mean. how would you get the mid channel?
• Aug 11 2011 | 11:46 am
to be pedantic: by definition: L=M+S; R=M-S;
therefore M=(L+R)/2 and S=(L-R)/2
• Aug 11 2011 | 11:47 am
morgan is closer:
"Mid = L+R Sides = L-R & R-L"
he at least knows that "side" is two channels. ^^
• Aug 11 2011 | 11:50 am
Subtracting L from R is the same as adding L to a polarity-inverted R. Yes, it is to do with phase, but only regarding a 180degree shift for all frequencies, which is the same as a polarity inversion, which is the same as multiplying an audio stream by -1, hence just subtracting them does work ... no?
The only similar kind of matrix that I know of is the Gerzon 2-3 matrix, which attempts to separate stereo l/r into 3-channel mid/left/right. It uses ms encoding/decoding, but it isn't the same.
"Side" is only two channels when it is mixed with the mid signal (even though that still doesn't make sense :p ) ... have you ever use an m/s mic array? It's the exact same concept, the "side" signal comes from a bidirectional microphone because the two lobes of the polar pattern are mechanically 180degrees out of phase with each other (opposite polarity).
• Aug 11 2011 | 11:52 am
side is _not_ two channels-- side is single signal coming from a figure of 8 directionality pattern -- people can confuse the two lobes as being two separate signals; it is not
• Aug 11 2011 | 11:55 am
Yes, Terry's first post is exactly it and what I should have posted in the first place.
• Aug 11 2011 | 12:47 pm
"Subtracting L from R is the same as adding L to a polarity-inverted R"
might be, but S- is M-R and and S+ is M-L, and you dont know M yet. :)
and even if S- and S+ is only one channel in some application, the side can never be R-L ... because both sides would be (R-L)+(R-L) from what you say ... hehehe :D
and mid is not the same as mono, mid is _not L+R.
• Aug 11 2011 | 1:04 pm
"might be, but S- is M-R and and S+ is M-L, and you dont know M yet. :)"
You don't need to know M to find S ... as Terry posted:
M=(L+R)/2 S=(L-R)/2
... you can disagree all you like, but it does work :)
Post a patch that proves the above doesn't work if you like.
• Aug 11 2011 | 2:06 pm
i dont see how L+R=M.
the sum of L and R still contain everything what is different between L and R, except parts which are 100% out of phase (which almost never happens in a piece of music.)
ok when you say it work, show me your patch and i will see if it works :D (pls keep in mind that i am a max4 idiot, i need a max5 attachement or picture for aminimum of "compatibilty")
• Aug 11 2011 | 3:06 pm
aha.
i have now checked that old patch i had made and in fact i was wrong and i now also know why.
what i once was building is a custom 3 channel format which is able to split LR into "LMR" which gave more control of how to distiguish between mono and stereo material in the mix. it is built completely different from that M/S industry standard, which i am a bit suprised about now that is seems to be nothing special - mine is so much better. :D
but still show me the "working" patch pls.
• Aug 12 2011 | 8:42 am
Thank you for all your answer :) I also would like to see working patch, and I've got some more questions:
Do you know some sound processing techniques especially dedicated for M/S which are more complicated than playing with loudness and Eq? For example mentioned brainworx M/S plugin is really awesome. Do you know what it does with side signal?
Thanks! wo
• Aug 12 2011 | 11:44 am
I have no idea what they do with their MS algorithms-- maybe as a total guess they make the mid bassier or something. I'm not at all familiar with their plugins.
to quote brainworx own marketing:
"bx_meter is not the tool that will automatically make your mixes sound better, of course, but it will give you some insight in what you are doing when you are mixing or mastering, and understanding the correlation of dynamics, M/S, phase and levels by listening to your music will help you mix / master better."
In other words all ms processing really allows you to do is change the stereo spread as implemented in this patch: (of course you can do anything you like with the M and S signals before re-encoding into stereo, but that's up to you)
• Aug 12 2011 | 12:43 pm
so it seems that not only my confusion had to be sorted (so that i can stop beeing a dickhead), there was another suprise for me.
i have a set of abstractions called "space" ... encoder, decoder, utilities ... which seem to do what this "normal" LR to M/S also does. quite shocking that i had to discover that it is such a simple thing.
about compressor plug-ins: i dont think they do anythign special. just have a dynamic effect on M and S. there is one thing what is important: if you do anything with lookup or delay or things like that, always have the effect enabled on both channels, just with different settings. dependign on the effect you are biulding, you might othewise run into a trap where M is delayed and S is not - with the result that decoding back L and R will fail.
the attached picture shows how my basic imager effect works (i often use this in effects or generators), and (as it seems) it is basically MS encoding, balancing and panning, and MS decoding.
-110
• Aug 12 2011 | 12:47 pm
"Do you know some sound processing techniques especially dedicated for M/S which are more complicated than playing with loudness and Eq? For example mentioned brainworx M/S plugin is really awesome. Do you know what it does with side signal?"
definetly a limiter or gate are just as cool as compressors, but it can be fun with reverb, too.
• Aug 12 2011 | 12:54 pm
... or a classic: lower the sub bass volume of the sides and raise it likewise for the center.
• Aug 20 2011 | 3:49 pm
I've made a simple external for Middle/Side Processing according to this post. Maybe it could be usefull for someone.