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