Mid Side processor in Max MSP

Aug 10, 2011 at 1:54pm

Mid Side processor in Max MSP

Hi :)

Did you know how to extract mid and side from stereo signal?

Thanks!

#58406
Aug 10, 2011 at 3:01pm

Mid = L+R
Side = L-R

:)

#209909
Aug 10, 2011 at 3:46pm

Mid = L+R
Sides = L-R & R-L

#209910
Aug 10, 2011 at 6:19pm

On a side note, by what factor should I scale the side audio by to account for the perceived difference in gain?

#209911
Aug 10, 2011 at 7:10pm

check the patch for scaling…

LR to MS patch:

– Pasted Max Patch, click to expand. –
#209912
Aug 10, 2011 at 8:26pm

Much appreciated.

#209913
Aug 11, 2011 at 8:04am

“Side = L-R”

yeah, you wish. :)

#209914
Aug 11, 2011 at 9:58am

“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)…

#209915
Aug 11, 2011 at 10:02am

Well it does Roman … unless you have a better way? If you do, please do tell us :)

#209916
Aug 11, 2011 at 11:33am

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?

#209917
Aug 11, 2011 at 11:46am

to be pedantic:
by definition:
L=M+S;
R=M-S;

therefore M=(L+R)/2
and S=(L-R)/2

#209918
Aug 11, 2011 at 11:47am

morgan is closer:

“Mid = L+R
Sides = L-R & R-L”

he at least knows that “side” is two channels. ^^

#209919
Aug 11, 2011 at 11:50am

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).

#209920
Aug 11, 2011 at 11:52am

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

#209921
Aug 11, 2011 at 11:55am

Yes, Terry’s first post is exactly it and what I should have posted in the first place.

#209922
Aug 11, 2011 at 12:47pm

“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.

#209923
Aug 11, 2011 at 1:04pm

“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.

#209924
Aug 11, 2011 at 2:06pm

 
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”)

#209925
Aug 11, 2011 at 3:06pm

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.

#209926
Aug 12, 2011 at 8:42am

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

#209927
Aug 12, 2011 at 11:44am

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)

– Pasted Max Patch, click to expand. –
#209928
Aug 12, 2011 at 12:43pm

 
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

[attachment=168711,2532]

Attachments:
  1. spacemodimager.jpg
#209929
Aug 12, 2011 at 12:47pm

“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.

#209930
Aug 12, 2011 at 12:54pm

… or a classic: lower the sub bass volume of the sides and raise it likewise for the center.

#209931
Aug 20, 2011 at 3:49pm

I’ve made a simple external for Middle/Side Processing according to this post.
Maybe it could be usefull for someone.

Attachments:
  1. ep.MidSide.zip
#209932

You must be logged in to reply to this topic.