Op-amp circuit for left-right to mid-side audio convertor - Page 1
Forum section: electronics / beginners

author: obiwanjacobi
author_rank: Super Contributor
timestamp: March 25, 2015, 09:35:04 am
content: I want to try to build a op-amp circuit to split a left-right stereo audio line signal into a common component (mid: common between L+R) and a signal that contains the difference between L+R (side).I think I could easily accomplish this with some op-amps. The side (difference) is easy I think because op-amps can do this naturally (inverting and non-inverting inputs). However I can't seem to figure out how to get the signal that is common to both L+R (mid). I first thought a summing/mixing circuit would do it, but that would simply mix in both differences of L+R...Can someone point me in the right direction please?I am not necessarily looking for a complete answer.Thanx,Marc

author: techricky
author_rank: Contributor
timestamp: March 25, 2015, 09:54:05 am
content: Mid in M-S audio is indeed just the sum of left and right signals

author: obiwanjacobi
author_rank: Super Contributor
timestamp: March 25, 2015, 10:02:24 am
content: it is...ah, and the differences cancel each other out... of course.Thanx!

author: Rerouter
author_rank: Super Contributor
timestamp: March 25, 2015, 10:40:18 am
content: i had a good attempt at it, but couldn't think up anything, i was trying to subtract the difference from the original source, but somehow that failed and instead removed one channels influence for unknown reasons,

author: obiwanjacobi
author_rank: Super Contributor
timestamp: March 25, 2015, 10:42:03 am
content: This is what I got so far - very basic just to get the picture.On the left are the L+R inputs of 100mV (100Hz/1000Hz). On the right are the outputs (the lines that go nowhere). The top one is the mid (non-inverting summing amp) and the bottom one is the side (differential amp)...If this is correct it is easier than I thought...

author: Rerouter
author_rank: Super Contributor
timestamp: March 25, 2015, 11:07:38 am
content: Just tried it in my simulator, and it looks like no, I'm summing in a triangle wave to both channels to act as the common bit to amplify out, and no matter my attempt, I'm not succeeding tonight,as far as the difference circuit goes, a single op amp in a differential configuration works well,

author: obiwanjacobi
author_rank: Super Contributor
timestamp: March 25, 2015, 11:13:40 am
content: Odd? I can see the common signal (mid) fine with two sines of he same frequency. The diff (side) also seems to work as expected.The only case that is not correct is when one L/R input is 0v. Then the summer simply passes the other channel's signal.I would think that that is not common to both L+R...So perhaps I need to subtract the side from the sum output to get the real common part between L+R...?EDIT: attached my LTSpice file.

author: rs20
author_rank: Super Contributor
timestamp: March 25, 2015, 12:14:50 pm
content: Quote from: obiwanjacobi on March 25, 2015, 11:13:40 amOnly your expectations are wrong, the circuit is working fine. You're just getting confused by the word "common". If you feed a signal into L, and nothing into R, you should see the signal at half strength in both the mid and side outputs. Why? Because the mid and side outputs are defined as two signals with which you can reconstruct the original as follows:L = mid + sideR = mid - side (note, which one is negative is arbitrary, so don't be too fussed if L seems to be mixed up with R)So, I just claimed that a half-strength signal in both mid and side will lead to a signal in the left channel, and zero in the right channel.L = x/2 + x/2 = x <--- signal reconstructed perfectly in left channelR = x/2 - x/2 = 0 <--- absence of signal reconstructed perfectly in right channelSo, your circuit's output is correct, and is the only correct output. Put it another way: you seem to be suggesting that the common/mid output should be zero, and the side output should show the signal in the one channel. But then how on earth can you tell the difference between the left and right channel being zeroed?

author: obiwanjacobi
author_rank: Super Contributor
timestamp: March 25, 2015, 02:32:41 pm
content: Quote from: rs20 on March 25, 2015, 12:14:50 pmIs that important? I did not tune the gain in any way (just used 10k everywhere). Because I used a non-inverting summing opamp the gain is always 1+the ratio between R's... Currently my gain is 2.

author: rs20
author_rank: Super Contributor
timestamp: March 25, 2015, 10:00:39 pm
content: Quote from: obiwanjacobi on March 25, 2015, 02:32:41 pmFirstly, your overall gain is 1: R1 and R2 find the average, not the sum, of the two inputs. So that's a gain of 0.5 at that point, then you've followed up with a gain of 2 stage, so overall gain is 1.OK, so the gain is 1, when sorta ideally the gain "should be" 0.5. Is that important? I don't know, you tell me. I don't know what you're trying to achieve here. If you feed the exact same signal into both channels now, the "mid" output will be doubled, which isn't the common output you might expect, and might cause the output to clip if you're dealing with strong signals.Incidentally, if you just delete R8, you get the overall gain of 0.5 -- if you want that.

author: obiwanjacobi
author_rank: Super Contributor
timestamp: March 26, 2015, 08:04:41 am
content: I seem to remember that I saw a 200mV output...?I was planning on adding volume pots for Mid and Side anyway. Have to experiment with what is useful in practice.I want to make a 'stompbox' for a guitar rig... but it should also be usable in a normal studio setting - typically for processing the side signal differently than the mid signal.Thanx!