Is there an M/S encoder with Left & Right sides separate?

Been playing for a while trying to get an M/S encoder which gives me the left sides only & the right sides only, but it’s tricky problem! It seems like M/S encoding doesn’t really work if you have hard panned signals.

I.E. when you have something which is a 1 in the L channel and a 0 in the right channel, you’d kinda of expect mids to be zero, and left side to be 1, and right side to be 0, but I’m struggling to find the right equation to get those results. I was using this for a while which I thought was working, but realizing now not at all :sweat_smile:

mid = left + right / 2
left_side = left_sample - mid
right_right = right_sample - mid

so if L is 1 & R is 1

mid = 1
left_side = 0
right_side = 0

but if left is 1 & right is 0

mid = 0.5
left_side = 0.5
right_side = -0.5 

hmmmmm… happy to share a better M/S encode / decode. it’s kind of important to me conceptually that the left & right sides are able to be considered separately… but perhaps this simply isn’t possible?

even if we use the conventional:

mid = Left - Right
side = Left + Right

Left = 1 , Right = 0
mid = 1
side = 1

how in the world is that supposed to work? 0.o

What you want to do is not possible to do with just an MS-encoder.

1 Like

:sob: thanks Xenakios – I suppose now I can stop wasting my time with it!

I think there is some confusion:

a) Mid = (left + right) / 2 => average of the stereo channels
b) To reconstruct: left = mid + side | right = mid - side

For mono compatibility a hard panned signal must be present in the mid signal, otherwise a stereo record on a mono player would not play.

Mono compatibility is broken for anti phase:

  • if left = -right => mid = 0

It is by design, that if one channel is silent, the other is still heard through the middle.

Well there’s a lot of ways to skin the cat but this doesn’t sit right:

It is by design, that if one channel is silent, the other is still heard through the middle.

I understand perhaps in the use of M/S encoding for sending signals across airwaves or other tactics for non music instrument purposes, but in the context of music application it’s desirable for this bleed to not occur.

I’ve switched back to the deconstruction being the standard way, but it still doesn’t solve the lack of ability to apply different effects to the left sides & right sides:

outMids.setSample(0, i, left_sample + right_sample);
outSides.setSample(0, i, left_sample - right_sample);

outAudioBuffer.setSample(0, i, (mid_sample + side_sample) * minus_six_db);
outAudioBuffer.setSample(1, i, (mid_sample - side_sample) * minus_six_db);

What I’m really keen to figure out is a way which would be as in the original post:

mid = left + right
left_side = left_sample - ?
right_right = right_sample - ?

I’ve tried a lot of variations on the M/S encoder though and it doesn’t seem like there’s a suitable solution for this…

That’s not possible, as what you wish are three channels of independent information, but what you’ve got to work with are only two channels of independent information. With linear math, that’s simply not doable. You would need some methods in the field of source separation or parametric upmixing to create a LCR signal from stereo.
Otherwise, applying effects to L or R will always affect the sources in the center. And there never has been a native center in stereo, but only a perceived one (phantom source).

3 Likes

Ahh I see Daniel, I feel goofy for the idea! that seems obvious now.

Thanks for the reply.

I’ve always disliked calling it “Mid and Side” I prefer “Sum and Diff”. It’s a more accurate representation of what you have.

2 Likes

Agreed! It’s really not the sauce. We need better stereo imagining techniques.

I actually prefer “Omni and Eight” as these are the underlying directivity patterns. L and R will then be Cardioids pointing to the left and right, respectively.

Nerdy fun fact: add an Eight for front-back and another Eight pattern for up-below and you’ll get First order Ambisonics

1 Like

What do you mean by add an eight? I’d like to add gain control for front & back… xP

+= 8 :wink:

Lol… the name to google is Alan Blumlein:

Although the page explains it a bit different than from how I learned it. I guess there are two setups he invented. Normally you use an omni microphone to record the mid signal and a 90 degree to the viewing axis tilted 8 microphone, that captures the side signal.

You could also call it lateral and vertical after the movements the needle does on a vinyl record.
Mono needles will only capture lateral movements.
You find that on some vintage compressors…

1 Like

:sweat_smile: :upside_down_face: