[sci.electronics] Extracting Mono from Stereo

todd@ivucsb.UUCP (Todd Day) (10/21/88)

I have a very interesting signal processing problem for those signal
processing gurus.

I want to use a DSP chip to extract mono from stereo.  Does anybody
know of any algorithms to accomplish this or can anyone direct me to
any literature that might describe this?

I've looked into the math behind this.  It is not a simple as it first
appears!  Now, it's very, very easy to get rid of mono from stereo...
just subtract left from right, and the mono disappears.  However, you
can't just subtract this (R-L) from (R+L) to get only mono.  What
you always end up with is some combination of the mono plus one of
the other channels (2M - 2R, etc.)

I've even thought about using "correlation math", but this only tells
me HOW MUCH mono is there, instead of telling me what the actual
mono is.

The only solution that I can think of is to mimic the human ear.
That is, break up the frequency spectrum into sections, and compare
relative levels of the frequencies.  When they are approximately
the same, call that mono, and send the signal in that band through.
This would be computationally expensive, though, and I'd rather
not do it because it would not be entirely accurate.  I am not
concerned about the way the ear checks phase differences for
directionality... I am assuming that the mono will be in phase.

Your help would be greatly appreciated.  I'll summarize replies.


 
   /| Todd Day (805)968-9352 |\            "Hurt me, punish me.
+-+ | The Audio Club at UCSB | +-+      Make me listen to mid-fi!"
+-+ | 926 B   Camino Del Sur | +-+   {}!pyramid!comdesign!ivucsb!todd
   \| Isla Vista, CA   93117 |/              todd@ivucsb.UUCP

dhesi@bsu-cs.UUCP (Rahul Dhesi) (10/21/88)

In article <341@ivucsb.UUCP> todd@ivucsb.UUCP (Todd Day) writes:
>Now, it's very, very easy to get rid of mono from stereo...
>just subtract left from right, and the mono disappears.  However, you
>can't just subtract this (R-L) from (R+L) to get only mono.

Just use (R+L) and call it mono.
-- 
Rahul Dhesi         UUCP:  <backbones>!{iuvax,pur-ee}!bsu-cs!dhesi

todd@ivucsb.UUCP (Todd Day) (10/21/88)

In article <341@ivucsb.UUCP> I (Todd Day) write:
_I have a very interesting signal processing problem for those signal
_processing gurus.
_
_I want to use a DSP chip to extract mono from stereo.  Does anybody
_know of any algorithms to accomplish this or can anyone direct me to
_any literature that might describe this?
_
_I've looked into the math behind this.  It is not a simple as it first
_appears!  Now, it's very, very easy to get rid of mono from stereo...
_just subtract left from right, and the mono disappears.  However, you
_can't just subtract this (R-L) from (R+L) to get only mono.  What
_you always end up with is some combination of the mono plus one of
_the other channels (2M - 2R, etc.)
_
_I've even thought about using "correlation math", but this only tells
_me HOW MUCH mono is there, instead of telling me what the actual
_mono is.
_
_The only solution that I can think of is to mimic the human ear.
_That is, break up the frequency spectrum into sections, and compare
_relative levels of the frequencies.  When they are approximately
_the same, call that mono, and send the signal in that band through.
_This would be computationally expensive, though, and I'd rather
_not do it because it would not be entirely accurate.  I am not
_concerned about the way the ear checks phase differences for
_directionality... I am assuming that the mono will be in phase.

OK, guys, how about reading past the second paragraph?  Since I only
just posted this yesterday and got a couple of smart-aleck responses
already, maybe I should clarify...

I guess I confused everyone out there when I said "mono".  What I mean
by mono is not the same as the mono switch on an FM radio.  What I am
after is just the stuff in stereo that you hear in the center of the
speakers.  In other words, that means in that most of today's music,
I am trying to extract only the singer's voice (and anything else that
might be in the center).  This is NOT R+L!!!!  

Let's say the stuff in the left channel is L+0.5M (stuff that is not in
the center + half of the stuff that is in the center (mono)).  Right
channel is R+0.5M.  Now, I want just M.  If you add both channels together,
you get R+L+M.  I want just M.  Subtracting the two channels gives you
R-L.  Subtracting the difference from the summation gives 2L+M.  I want
just M.

I need this to provide "centering" when listening to video tapes.  I want
to remove the mono from the stereo and put that through a speaker sitting
on the TV.  This way, no matter where you sit, you will always hear
conversation between on-screen people from the center.

_Your help would be greatly appreciated.  I'll summarize replies.

Your smart-aleck answers are not appreciated.  I won't summarize these. :-)

 
   /| Todd Day (805)968-9352 |\            "Hurt me, punish me.
+-+ | The Audio Club at UCSB | +-+      Make me listen to mid-fi!"
+-+ | 926 B   Camino Del Sur | +-+   {}!pyramid!comdesign!ivucsb!todd
   \| Isla Vista, CA   93117 |/              todd@ivucsb.UUCP

phillip@bartal.CRLABS.COM (Phillip Vogel) (10/22/88)

 > From: dhesi@bsu-cs.UUCP (Rahul Dhesi)
 > Message-ID: <4436@bsu-cs.UUCP>
 >
 > In article <341@ivucsb.UUCP> todd@ivucsb.UUCP (Todd Day) writes:
 > >Now, it's very, very easy to get rid of mono from stereo...
 > >just subtract left from right, and the mono disappears.  However, you
 > >can't just subtract this (R-L) from (R+L) to get only mono.
 >
 > Just use (R+L) and call it mono.
 > --
 > Rahul Dhesi         UUCP:  <backbones>!{iuvax,pur-ee}!bsu-cs!dhesi
 
Actually, (R+L)/2 would be more like it (unless I'm missing something
important here).--  
Phillip M. Vogel - Bartal Design Group, Inc. - Englewood, NJ
DOMAIN: phillip@bartal.CRLABS.COM   UUCP: killer!crlabs!bartal!phillip
DISCLAIMER: Hell, I OWN the company !

marty@homxc.UUCP (M.B.BRILLIANT) (10/23/88)

In article <343@ivucsb.UUCP> Todd Day explains his previous query:
> ....
> Let's say the stuff in the left channel is L+0.5M (stuff that is not in
> the center + half of the stuff that is in the center (mono)).  Right
> channel is R+0.5M.  Now, I want just M....

The man wants to solve two equations for 3 unknowns:
	L + M/2 = known
	R + M/2 = also_known
L, R, and M unknown, solve for M.  Can't in general be done.

In the original acoustic space you have more than two sources of sound.
You have wavefronts coming from many directions, and you can tell the
difference between a tone coming from point A and a tone of the same
pitch from point B.

But now you have only two channels, not a three-dimensional wave
medium.  Let's fantasize.  Put two stereo speakers in an anechoic
chamber, and when there is an M sound they create a synthetic wavefront
coming from the space between them.  Now set up a directional mike so
that it only picks up sound from the space between the speakers, not
from either speaker alone.

If that works, then you could probably synthesize it in a digital
signal processor without actually using the anechoic chamber.  But I
don't think it would work.  You don't really have a single wave coming
from the middle, you have two separate waves, one from each speaker,
and the directional mike will reject both.

Two equations in three unknowns, then.  Can't do it.  But I've been
made to eat my words before in this newsgroup, so come on, help this
guy out, prove me wrong!

						Marty
M. B. Brilliant		houdi!marty1, homxc!marty

Disclaimer: Opinions stated herein are mine unless and until my employer
	    explicitly claims them; then I lose all rights to them.

> you get R+L+M.  I want just M.  Subtracting the two channels gives you
> R-L.  Subtracting the difference from the summation gives 2L+M.  I want
> just M.
> 
> I need this to provide "centering" when listening to video tapes.  I want
> to remove the mono from the stereo and put that through a speaker sitting
> on the TV.  This way, no matter where you sit, you will always hear
> conversation between on-screen people from the center.
> 
> _Your help would be greatly appreciated.  I'll summarize replies.
> 
> Your smart-aleck answers are not appreciated.  I won't summarize these. :-)
> 
>  
>    /| Todd Day (805)968-9352 |\            "Hurt me, punish me.
> +-+ | The Audio Club at UCSB | +-+      Make me listen to mid-fi!"
> +-+ | 926 B   Camino Del Sur | +-+   {}!pyramid!comdesign!ivucsb!todd
>    \| Isla Vista, CA   93117 |/              todd@ivucsb.UUCP

wte@ncrcae.Columbia.NCR.COM (Bill Eason) (10/24/88)

In article <343@ivucsb.UUCP> todd@ivucsb.UUCP (Todd Day <todd>) writes:
>In article <341@ivucsb.UUCP> I (Todd Day) write:
>_I have a very interesting signal processing problem for those signal
>_processing gurus.

>_I want to use a DSP chip to extract mono from stereo.  Does anybody
>_know of any algorithms to accomplish this or can anyone direct me to
>_any literature that might describe this?

>_I've looked into the math behind this.  It is not a simple as it first
>_appears!  Now, it's very, very easy to get rid of mono from stereo...
>_just subtract left from right, and the mono disappears.  However, you
>_can't just subtract this (R-L) from (R+L) to get only mono.  What
>_you always end up with is some combination of the mono plus one of
>_the other channels (2M - 2R, etc.)

<...stuff deleted...>

Could you not take this (2M - 2R) and subtract 2R?  I built a little
five op amp circuit not long ago to try to increase stereo separation 
by taking k*(R-L) and -k*(R-L)==k*(L-R) and adding these back into R 
and L, respectively.  The resulting output is then:

		R' = R + kR - kL  =  (1+k)R - kL
		L' = L + kL - kR  =  (1+k)L - kR

	 (R' - L') = (1+2k)R - (1+2k)L
		   = (1+2k) (R - L)

	 (L' - R') = (1+2k) (L - R)

I realize this doesn't solve the phase delay problems between R and L,
but my idea was to first get (R-L), the difference between the right and
left channels, and magnify this, just to see if it would work.  It requires:
	1) an inverting op amp circuit on L
	2) a "summer" op amp to add R and -L with variable gain, k, determined
	     by variable feedback resistor value
	3) an inverting op amp on (R-L)
	4) a summer for R + (R-L)
	5) a summer for L + (L-R)
I used cheap LM324 op amps and had one wiring problem that I never fixed, but
it seemed to work to some extent anyway.  Maybe I'll go home tonight and try
fixing it....  

Finally, don't overlook the obvious: you can get (2M - 2R), but you still 
have R, don't you?  I admit I'm no DSP guru and that my little project 
was entirely analog, but would the same principle not hold in the Z-transform 
world?  Hope this helps.

>_Your help would be greatly appreciated.  I'll summarize replies.
>Your smart-aleck answers are not appreciated.  I won't summarize these. :-)
 
  
>   /| Todd Day (805)968-9352 |\            "Hurt me, punish me.
>+-+ | The Audio Club at UCSB | +-+      Make me listen to mid-fi!"
>+-+ | 926 B   Camino Del Sur | +-+   {}!pyramid!comdesign!ivucsb!todd
>   \| Isla Vista, CA   93117 |/              todd@ivucsb.UUCP

Bill Eason   NCR Corporation   
-- 

Bill Eason   (803) 791-6419    ...!ucbvax!sdcsvax!ncr-sd!ncrcae!sauron!wte
NCR Corporation		  ...!rutgers!mcnc!ece-csc!ncrcae!sauron!wte
E & M Columbia   3325 Platt Springs Rd.   West Columbia, SC  29169

wte@ncrcae.Columbia.NCR.COM (Bill Eason) (10/25/88)

NOTE: SORRY IF THIS IS A DUPLICATE; SYSTEM WAS SHUT DOWN DURING MAIL PROCESS
AND I WASN'T SURE THIS EVER GOT OUT OF THE PLANT.  - WTE

In article <343@ivucsb.UUCP> todd@ivucsb.UUCP (Todd Day <todd>) writes:
>In article <341@ivucsb.UUCP> I (Todd Day) write:
>_I have a very interesting signal processing problem for those signal
>_processing gurus.

>_I want to use a DSP chip to extract mono from stereo.  Does anybody
>_know of any algorithms to accomplish this or can anyone direct me to
>_any literature that might describe this?

>_I've looked into the math behind this.  It is not a simple as it first
>_appears!  Now, it's very, very easy to get rid of mono from stereo...
>_just subtract left from right, and the mono disappears.  However, you
>_can't just subtract this (R-L) from (R+L) to get only mono.  What
>_you always end up with is some combination of the mono plus one of
>_the other channels (2M - 2R, etc.)

<...stuff deleted...>

Could you not take this (2M - 2R) and add 2R?  I built a little
five op amp circuit not long ago to try to increase stereo separation 
by taking k*(R-L) and -k*(R-L)==k*(L-R) and adding these back into R 
and L, respectively.  The resulting output is then:

		R' = R + kR - kL  =  (1+k)R - kL
		L' = L + kL - kR  =  (1+k)L - kR

	 (R' - L') = (1+2k)R - (1+2k)L
		   = (1+2k) (R - L)

	 (L' - R') = (1+2k) (L - R)

It seems that approximate volume is maintained in each channel if R and L
are of about the same magnitude, since kR is subtracted when kL is added,
and vice versa.

I realize this doesn't solve the phase delay problems between R and L,
but my idea was to first get (R-L), the difference between the right and
left channels, and magnify this, just to see if it would work.  It requires:
	1) an inverting op amp circuit on L
	2) a "summer" op amp to add R and -L with variable gain, k, determined
	     by variable feedback resistor value
	3) an inverting op amp on (R-L)
	4) a summer for R + (R-L)
	5) a summer for L + (L-R)
I used cheap LM324 op amps and had one wiring problem that I never fixed, but
it seemed to work to some extent anyway.  Maybe I'll go home tonight and try
fixing it....  

Finally, don't overlook the obvious: you can get (2M - 2R), but you still 
have R, don't you?  I admit I'm no DSP guru and that my little project 
was entirely analog, but would the same principle not hold in the Z-transform 
world?  Hope this helps.

>_Your help would be greatly appreciated.  I'll summarize replies.
>Your smart-aleck answers are not appreciated.  I won't summarize these. :-)
 
  
>   /| Todd Day (805)968-9352 |\            "Hurt me, punish me.
>+-+ | The Audio Club at UCSB | +-+      Make me listen to mid-fi!"
>+-+ | 926 B   Camino Del Sur | +-+   {}!pyramid!comdesign!ivucsb!todd
>   \| Isla Vista, CA   93117 |/              todd@ivucsb.UUCP

Bill Eason   NCR Corporation   
-- 

Bill Eason   (803) 791-6419    ...!ucbvax!sdcsvax!ncr-sd!ncrcae!sauron!wte
NCR Corporation		  ...!rutgers!mcnc!ece-csc!ncrcae!sauron!wte
E & M Columbia   3325 Platt Springs Rd.   West Columbia, SC  29169

cdl@mplvax.nosc.MIL (Carl Lowenstein) (10/25/88)

>>In article <341@ivucsb.UUCP> I (Todd Day) write:
>>_I have a very interesting signal processing problem for those signal
>>_processing gurus.

>>_I want to use a DSP chip to extract mono from stereo.  Does anybody
>>_know of any algorithms to accomplish this or can anyone direct me to
>>_any literature that might describe this?

>>Your smart-aleck answers are not appreciated.  I won't summarize these. :-)

If you want to assert that the 'left' signal is  L + M/2 and
the 'right' signal is R + M/2, then you will have to devise a way to
solve two linear equations in three unknowns before you can get any further.

Otherwise, as has been pointed out repeatedly,the best you can do with a linear
circuit is the original compatibility designed into FM stereo broadcasts and
stereo LP records, namely, mono = (L + R)  (/2 for purists).

-- 
	carl lowenstein		marine physical lab	u.c. san diego
	{decvax|ucbvax}	!ucsd!mplvax!cdl
	cdl@mplvax.ucsd.edu	cdl@mplvax.nosc.mil

heller@steinmetz.ge.com (aaron j heller) (10/25/88)

In article <343@ivucsb.UUCP> todd@ivucsb.UUCP (Todd Day <todd>) writes:
>In article <341@ivucsb.UUCP> I (Todd Day) write:
>_I want to use a DSP chip to extract mono from stereo.  Does anybody
>_know of any algorithms to accomplish this or can anyone direct me to
>_any literature that might describe this?
>_
>OK, guys, how about reading past the second paragraph?  Since I only
>just posted this yesterday and got a couple of smart-aleck responses
>already, maybe I should clarify...
>
>Let's say the stuff in the left channel is L+0.5M (stuff that is not in
>the center + half of the stuff that is in the center (mono)).  Right
>channel is R+0.5M.  Now, I want just M.  If you add both channels together,
>you get R+L+M.  I want just M.  Subtracting the two channels gives you
>R-L.  Subtracting the difference from the summation gives 2L+M.  I want
>just M.
>
>
>Your smart-aleck answers are not appreciated.  I won't summarize these. :-)

I hope you don't consider this a ``smart-aleck'' answer, but have
you taken a linear algebra or information theory course recently?

Your problem, in a slightly different form, is that you want to take
three channels of information, namely L, R and M; transmit them on
two channels as L+M and R+M, and then completely separate them back into
L, R and M.  

This reminds me alot of the SQ matrix system for quad and the DSP
stuff you are thinking about whould be very much like the logic
steering circuitry that was in these decoders. 

If you have any success at this, there are many people who would
be very interested in it.

Aaron Heller (heller@ge-crd.arpa  uunet!steinmetz!heller)

wte@ncrcae.Columbia.NCR.COM (Bill Eason) (10/25/88)

In article <3837@ncrcae.Columbia.NCR.COM> wte@ncrcae.Columbia.NCR.COM (Bill Eason) writes:
>Could you not take this (2M - 2R) and add 2R?

Oh, dopey me....  The others are right: two equations & three unknowns.
I made the mistake of thinking that your R was really R and not (R + M/2)
or (R + M).  Sorry.

-wte
-- 

Bill Eason   (803) 791-6419    ...!ucbvax!sdcsvax!ncr-sd!ncrcae!sauron!wte
NCR Corporation		  ...!rutgers!mcnc!ece-csc!ncrcae!sauron!wte
E & M Columbia   3325 Platt Springs Rd.   West Columbia, SC  29169

todd@ivucsb.UUCP (Todd Day) (10/26/88)

In article <3902@homxc.UUCP> marty@homxc.UUCP (M.B.BRILLIANT) writes:
_
_In article <343@ivucsb.UUCP> Todd Day explains his previous query:
_> ....
_> Let's say the stuff in the left channel is L+0.5M (stuff that is not in
_> the center + half of the stuff that is in the center (mono)).  Right
_> channel is R+0.5M.  Now, I want just M....
_
_The man wants to solve two equations for 3 unknowns:
_	L + M/2 = known
_	R + M/2 = also_known
_L, R, and M unknown, solve for M.  Can't in general be done.

Well, then, how come your ears solve that equation everytime you listen
to stereo?

_In the original acoustic space you have more than two sources of sound.
_You have wavefronts coming from many directions, and you can tell the
_difference between a tone coming from point A and a tone of the same
_pitch from point B.

Is this generally true?  If I put a tone in the left channel at
value 3 and the SAME tone in the right channel at value 5, and
the tones are in phase, where does it sound like it's coming
from?  I think it will sound like it is coming from right of
center, as the two tones are in phase.  This is what I assume
for my "center channel extractor", i.e., that you have the same
tone at the same phase and amplitude coming from both speakers
and this tone will fool your ears into thinking that there is
sound coming from a center channel.

_But now you have only two channels, not a three-dimensional wave
_medium.  Let's fantasize.  Put two stereo speakers in an anechoic
_chamber, and when there is an M sound they create a synthetic wavefront
_coming from the space between them.  Now set up a directional mike so
_that it only picks up sound from the space between the speakers, not
_from either speaker alone.

There is not really any sound coming from the center.  Your ears
*think* there is.  Stereo is just a charade to fool your ears into
thinking there is a full soundstage between your speakers, when in
reality, sound is just coming from two sets of discrete speakers
on either end of the sound stage.

_Two equations in three unknowns, then.  Can't do it.  But I've been
_made to eat my words before in this newsgroup, so come on, help this
_guy out, prove me wrong!

I think it can be done.  After all, your ears do it for you everyday.
Remember, after the "center channel" gets mixed with the stereo, it
does not really get lost... your ears can pick it out and localize it
as coming from the center of the stereo stage.  I just want to find
some mathematical easy way of mimicking the ears.  I haven't found
an "easy way" yet!

 
   /| Todd Day (805)968-9352 |\              "I go to school, but
+-+ | The Audio Club at UCSB | +-+    I never learn what I want to know."
+-+ | 926 B   Camino Del Sur | +-+     ..!pyramid!comdesign!ivucsb!todd
   \| Isla Vista, CA   93117 |/                todd@ivucsb.UUCP

todd@ivucsb.UUCP (Todd Day) (10/26/88)

In article <3836@ncrcae.Columbia.NCR.COM> wte@ncrcae.Columbia.NCR.COM (Bill Eason) writes:
_In article <343@ivucsb.UUCP> todd@ivucsb.UUCP (Todd Day <todd>) writes:
_>In article <341@ivucsb.UUCP> I (Todd Day) write:
_>_I have a very interesting signal processing problem for those signal
_>_processing gurus.
_
_>_I've looked into the math behind this.  It is not a simple as it first
_>_appears!  Now, it's very, very easy to get rid of mono from stereo...
_>_just subtract left from right, and the mono disappears.  However, you
_>_can't just subtract this (R-L) from (R+L) to get only mono.  What
_>_you always end up with is some combination of the mono plus one of
_>_the other channels (2M - 2R, etc.)
_
_<...stuff deleted...>
_
_Could you not take this (2M - 2R) and subtract 2R?
[stuff zapped]
The only problem is that I don't have 2R, I have R+0.5M.

I see all the confusion I've caused by calling the "center channel" mono,
so I'm going to repost one last request with a little less vagueness
than my original two postings...

 
   /| Todd Day (805)968-9352 |\              "I go to school, but
+-+ | The Audio Club at UCSB | +-+    I never learn what I want to know."
+-+ | 926 B   Camino Del Sur | +-+     ..!pyramid!comdesign!ivucsb!todd
   \| Isla Vista, CA   93117 |/                todd@ivucsb.UUCP

jimc@iscuva.ISCS.COM (Jim Cathey) (10/26/88)

In article <785@mplvax.nosc.MIL> cdl@mplvax.ucsd.edu.UUCP (Carl Lowenstein) writes:
>If you want to assert that the 'left' signal is  L + M/2 and
>the 'right' signal is R + M/2, then you will have to devise a way to
>solve two linear equations in three unknowns before you can get any further.

OK, somebody tell me why you can't take the output from one of those 'vocals
removers' and subtract that from the original source (presumably yielding what
was subtracted by the vocals remover)?  I'm sure that in practice there will
be some difficulty, but this sounds plausible, especially if working in the
DSP world for the whole process.

+----------------+
! II      CCCCCC !  Jim Cathey
! II  SSSSCC     !  ISC Systems Corp.
! II      CC     !  TAF-C8;  Spokane, WA  99220
! IISSSS  CC     !  UUCP: uunet!iscuva!jimc
! II      CCCCCC !  (509) 927-5757
+----------------+
			"With excitement like this, who is needing enemas?"

tomr@teklds.TEK.COM (Tom Rudwick) (10/27/88)

I think what you want is not L + R. That would include signals which
exist only in the right or left channels. The center channel should
include only the signal that is common to both L + R. (If your definition
of "center" means that the signal strength is equal in the right
and left channels. So what you want is a common mode signal extractor.
I don't know the right circuit for that, but what do I know I'm
a software person :^) ...

Tom Rudwick
tektronix!teklds!tomr

-- 
Splunge!
Mail Address: teklds!twr@tektronix
If anything in this message made any sense, it is not the opinion of Tektronix.

pavelz@tekigm2.TEK.COM (Pavel R. Zivny) (10/28/88)

In article <3902@homxc.UUCP> marty@homxc.UUCP (M.B.BRILLIANT) writes:
:
:In article <343@ivucsb.UUCP> Todd Day explains his previous query:
: ....
:> Let's say the stuff in the left channel is L+0.5M (stuff that is not in
:> the center + half of the stuff that is in the center (mono)).  Right
:> channel is R+0.5M.  Now, I want just M....
:
:The man wants to solve two equations for 3 unknowns:
:	L + M/2 = known
:	R + M/2 = also_known
:L, R, and M unknown, solve for M.  Can't in general be done.

	 I guess I may have an idea, but I am not so sure if it's 
what you want; so let me ask you a question:

	What exactly is the M signal you are after ? Is it a signal similar 
to what would a mike with sphere characteristic placed on a vertical axis of
the scene pick ?  Or is it electrically added signal from R and L mike ?
(note-these two do differ a bit...) 	
	Or finally, is it more like what would a directional mike with a 
rather narrow characteristic laying on the axis of the sceen pick ? Not much
sounds from left nor right (music & effects), but everything from the middle
(the main dialog ) ?

	From the description of your problem, I assume it's actually the
last you are after. I believe you do have enough knowns for that last case,
at least under certain conditions; I'll elaborate on that if you confirm
that's what you want ....

(Tell us what exacatly do you want, and we'll tell you why we can't do it :-)

: ...
 deleted some stuff
: ...
:> you get R+L+M.  I want just M.  Subtracting the two channels gives you
:> R-L.  Subtracting the difference from the summation gives 2L+M.  I want
:> just M.
:> 
:> I need this to provide "centering" when listening to video tapes.  I want
:> to remove the mono from the stereo and put that through a speaker sitting
:> on the TV.  This way, no matter where you sit, you will always hear
:> conversation between on-screen people from the center.
:>  
:>    /| Todd Day (805)968-9352 |\            ....

	By the way, you can solve your problem by switching to silent
movies, too. :-)

|----- Pavel 
:-The opinions above are mine for the part found correct. Any errors )
 :- are due to malicious scrambling originated by Russian embassies.)

rm@cisunx.UUCP (Mingo) (10/28/88)

On the back of one of Brian Eno's "Ambient" albums, he described his
"ambient" speaker setup, which was achieved by adding a third speaker
in back of the listener, which was connected to one terminal of the
right speaker and one terminal of the left speaker.  Wouldn't the third
channel have only the part of the signal that was common to right and
left?

Rudy 'Mingo' Maceyko


-- 
Rudy 'Mingo' Maceyko                                         ...!pitt!cisunx!rm
Computer Science                       rm%unix.cis.pittsburgh.edu@vb.cc.cmu.edu
University of Pittsburgh                RM%VMS.CIS.PITTSBURGH.EDU@VB.CC.CMU.EDU
Pittsburgh PA                                                 RM@PITTVMS.BITNET

dan@rna.UUCP (Dan Ts'o) (10/28/88)

)In article <343@ivucsb.UUCP> todd@ivucsb.UUCP (Todd Day <todd>) writes:
)I have a very interesting signal processing problem for those signal
)processing gurus.
)I want to use a DSP chip to extract mono from stereo.  Does anybody
)know of any algorithms to accomplish this or can anyone direct me to
)any literature that might describe this?
)I've looked into the math behind this.  It is not a simple as it first
)appears!  Now, it's very, very easy to get rid of mono from stereo...
)just subtract left from right, and the mono disappears.  However, you
)can't just subtract this (R-L) from (R+L) to get only mono.  What
)you always end up with is some combination of the mono plus one of
)the other channels (2M - 2R, etc.)

	Yes, an interesting problem -- one that I thought about a little
about a year ago, and I came to the same conclusions you did. As someone
else pointed out, you are trying to solve for three variables with two
equations.
	The auditory system can detect delays of onset in the 100us
range (it has "cute" neural circuits that compare the onset times
between sounds arriving at each of the two ears and fires with specific
delay times in the 100us resolution range). This type of processing,
combined with bandpass-like frequency response properties would allow
the auditory system to compare arrival times over a wide range of the
auditory spectrum.
	I should go ask some DSP friends, but perhaps some form of
cross-correlation processing would work. The output of the cross-correlation
should reflect the similarity between the R and L. Of course you would want
to restrict the time scale looked at to avoid including repeated passages in
the music. Unfortunately, you then must work backwards to somehow relate
the correlation to the signals responsible...hmmm... This problem seems
analogous to the frequency domain idea of sampling the spectrum with
bandpass filters or FFT's, determining the similarities, but then needing to
work back to the actual common mode portions of the music...

todd@ivucsb.UUCP (Todd Day) (10/28/88)

In article <2125@iscuva.ISCS.COM> jimc@iscuva.ISCS.COM (Jim Cathey) writes:
_In article <785@mplvax.nosc.MIL> cdl@mplvax.ucsd.edu.UUCP (Carl Lowenstein) writes:
_>If you want to assert that the 'left' signal is  L + M/2 and
_>the 'right' signal is R + M/2, then you will have to devise a way to
_>solve two linear equations in three unknowns before you can get any further.
_
_OK, somebody tell me why you can't take the output from one of those 'vocals
_removers' and subtract that from the original source (presumably yielding what
_was subtracted by the vocals remover)?  I'm sure that in practice there will
_be some difficulty, but this sounds plausible, especially if working in the
_DSP world for the whole process.

Those 'vocals removers' typically subtract the right from the left channel
(or vice versa).  That gives us:
(L+M/2)-(R+M/2) = L + M/2 - R - M/2 = L - R

Now, you want to subtract this from the original source (L+M+R):
(L+M+R) - (L-R) = L + M + R - L + R = M+2R
which is not what you intended...


 
   /| Todd Day (805)968-9352 |\              "I go to school, but
+-+ | The Audio Club at UCSB | +-+    I never learn what I want to know."
+-+ | 926 B   Camino Del Sur | +-+     ..!pyramid!comdesign!ivucsb!todd
   \| Isla Vista, CA   93117 |/                todd@ivucsb.UUCP

dplatt@coherent.com (Dave Platt) (10/29/88)

In article <13393@cisunx.UUCP> rm@unix.cis.pittsburgh.edu (Mingo) writes:
> On the back of one of Brian Eno's "Ambient" albums, he described his
> "ambient" speaker setup, which was achieved by adding a third speaker
> in back of the listener, which was connected to one terminal of the
> right speaker and one terminal of the left speaker.  Wouldn't the third
> channel have only the part of the signal that was common to right and
> left?

Actually, it will have the portion of the signal that's different...
the ambient speaker is usually connected between the "hot" terminals of
the two front-channel speakers.  The ambient speaker will produce L-R,
or R-L, depending on whether you've hooked the "hot" side of the
ambient speaker to the left or right main speaker.

This system was popularized some years ago by Dave Hafler, I
believe...  he was the originator of the Dynaco component line, and
referred to this ambient-extraction system as "Dynaquad".  A full
Dynaquad system consisted of the two front speakers (connected
normally), and one or two smaller rear-channel speakers connected
between the "hot" terminals of the front-channel terminals of the
amplifier.  A single rear-channel speaker can be connected with either
polarity.  If two rear-channel speakers are used, they are connected in
series with their "-" terminals wired together;  each one's "+"
terminal is connected to the corresponding "+" terminal of the front
channel.  So, the left-rear ambient speaker produces L-R, and the
right-rear produces R-L.

One additional tweak to this setup is to have a small "center-channel"
speaker, whose "-" terminal is connected to the amplifier "-", and
whose "+" terminal is connected to _both_ L and R "+" terminals via a
pair of resistors.  This speaker thus receives an L+R mix signal at a
low volume level, and helps "stabilize" the soundstage and gives better
positioning clues for voices and instruments located at the center of
the soundstage.

Dynaquad isn't a particularly sophisticated system;  it doesn't do the
sophisticated sound-stage processing that today's digital processors
are capable of.  However, it works surprisingly well on well-recorded
live material.  It's inexpensive, too... all you need is two small
speakers for the rear channel, some wire, and an L-pad to control the
ambient-speaker volume level.

Note for those who are thinking of trying DynaQuad: make sure that your
amplifier/receiver uses a "common ground" system, in which the "+"
outputs are driven with the same polarity and the "-" outputs are
held at the same (ground) potential.  Bridged amps, amps that swing both
"+" and "-" outputs, and similar setups may not work with this
system... check your owner's manual to see if there are any warnings
about doing this sort of thing.

dmt@ptsfa.PacBell.COM (Dave Turner) (10/29/88)

In article <357@ivucsb.UUCP> todd@ivucsb.UUCP (Todd Day) writes:
>
>Those 'vocals removers' typically subtract the right from the left channel
>(or vice versa).  That gives us:
>(L+M/2)-(R+M/2) = L + M/2 - R - M/2 = L - R
>
>Now, you want to subtract this from the original source (L+M+R):
>(L+M+R) - (L-R) = L + M + R - L + R = M+2R
>which is not what you intended...

You stopped too soon. Now subtract R twice:

	M+2R - 2R = M

This seems too simple. What did I miss?



-- 
Dave Turner	415/542-1299	{att,bellcore,sun,ames,pyramid}!pacbell!dmt

henry@utzoo.uucp (Henry Spencer) (10/30/88)

In article <353@ivucsb.UUCP> todd@ivucsb.UUCP (Todd Day) writes:
>_The man wants to solve two equations for 3 unknowns:
>...  Can't in general be done.
>
>Well, then, how come your ears solve that equation everytime you listen
>to stereo?

Note the words "in general".  Your brain (not your ears) applies quite a
bit of processing power to make sense out of what it's hearing.  Once it
has done so, it has enough extra information to solve the problem.  It
couldn't do this for random input; the extra information is available
only because the input "makes sense".  Duplicating this process with
electronics doesn't sound easy to me.
-- 
The dream *IS* alive...         |    Henry Spencer at U of Toronto Zoology
but not at NASA.                |uunet!attcan!utzoo!henry henry@zoo.toronto.edu

R_Tim_Coslet@cup.portal.com (10/31/88)

In artical <1988Oct29.234044.15343@utzoo.uucp>
		henry@utzoo.uucp (Henry Spencer) Writes:
>In article <353@ivucsb.UUCP> todd@ivucsb.UUCP (Todd Day) writes:
>>_The man wants to solve two equations for 3 unknowns:
>>...  Can't in general be done.
>>
>>Well, then, how come your ears solve that equation everytime you listen
>>to stereo?
>
>Note the words "in general".  Your brain (not your ears) applies quite a
>bit of processing power to make sense out of what it's hearing.  Once it
>has done so, it has enough extra information to solve the problem.  It
>couldn't do this for random input; the extra information is available
>only because the input "makes sense".  Duplicating this process with
>electronics doesn't sound easy to me.

Add to this the fact that even the brain ocasionally fails to correctly
solve this problem, and locate the sound source. This is particularly
true for sounds generated on the plane of points equidistant to both ears...

...you can't tell whether the sound is comming from infront, behind, above
or below you, in this case (unless you turn you head to get it off that
plane, or you see the source of the sound). Your electronic circuit won't
be able to "turn its head" to get this additional info.

                                        R. Tim Coslet

Usenet: R_Tim_Coslet@cup.portal.com
BIX:    r.tim_coslet

todd@ivucsb.UUCP (Todd Day) (10/31/88)

In article <4571@ptsfa.PacBell.COM> dmt@ptsfa.PacBell.COM (Dave Turner) writes:
_In article <357@ivucsb.UUCP> todd@ivucsb.UUCP (Todd Day) writes:
_>
_>Those 'vocals removers' typically subtract the right from the left channel
_>(or vice versa).  That gives us:
_>(L+M/2)-(R+M/2) = L + M/2 - R - M/2 = L - R
_>
_>Now, you want to subtract this from the original source (L+M+R):
_>(L+M+R) - (L-R) = L + M + R - L + R = M+2R
_>which is not what you intended...
_
_You stopped too soon. Now subtract R twice:
_
_	M+2R - 2R = M
_
_This seems too simple. What did I miss?

Where did you get just R?  By my definitions, you don't have R, but the
right channel has R+0.5M.  No matter what you do, it is ?impossible? to
manipulate M out of the system algebraically.


 
   /| Todd Day (805)968-9352 |\              "I go to school, but
+-+ | The Audio Club at UCSB | +-+    I never learn what I want to know."
+-+ | 926 B   Camino Del Sur | +-+     ..!pyramid!comdesign!ivucsb!todd
   \| Isla Vista, CA   93117 |/                todd@ivucsb.UUCP

R_Tim_Coslet@cup.portal.com (11/01/88)

I was unable to mail the following response to Allen Sullivan's e-mail
response to my posting in this subject. The return path was bad and I was
unable to construct a good one.
-------------------------------------------------------------------------------
You wrote...
>Might be doable in electronics, if variable time delays are available to
>implement a correlator...adjust the delays for best mathcing in the two
>channels, and knowing the delay, the heading is almost [sans ambiguity]
>computalbe...with 3 ears, tis doable. With the digital sampling, and
>digital correlators, should be doable...sample every 10 microseconds so
>that even the high frequencies can be time aligned accurately.
>
>Any replies are appreciated.
>
>ALlen Sullivan

Sure it is doable "with 3 ears"...
However the original poster was asking how to do it with conventional
2 channel "Left/Right" stereo. Which can't be done (as another poster
has already said) because you can't generally solve 2 simultanious
equations of 3 unknowns to unambigious results.

I simply was explaining (to a poster asking "then how do the ears do it?")
how they even frequently fail, except that your head can turn. The 
"electronic head" in conventional stereo can't.

                                        R. Tim Coslet

Usenet: R_Tim_Coslet@cup.portal.com
BIX:    r.tim_coslet

todd@ivucsb.UUCP (Todd Day) (11/02/88)

In article <10682@cup.portal.com> R_Tim_Coslet@cup.portal.com writes:
_In artical <1988Oct29.234044.15343@utzoo.uucp>
_		henry@utzoo.uucp (Henry Spencer) Writes:
_>In article <353@ivucsb.UUCP> todd@ivucsb.UUCP (Todd Day) writes:
_>>_The man wants to solve two equations for 3 unknowns:
_>>...  Can't in general be done.
_>>
_>Well, then, how come your ears solve that equation everytime you listen
_>to stereo?
_>
_>Note the words "in general".  Your brain (not your ears) applies quite a
_>bit of processing power to make sense out of what it's hearing.  Once it
_>has done so, it has enough extra information to solve the problem.  It
_>couldn't do this for random input; the extra information is available
_>only because the input "makes sense".  Duplicating this process with
_>electronics doesn't sound easy to me.

I don't think it'll be easy, either... But, the whole point is to FOOL
the ear-brain system, not duplicate it.  I wasn't offering duplication
of this system as a solution... I just offered it as example; that, yes,
one CAN solve two equations for 3 unknowns.  Note that in this system,
we have to move to the frequency domain to do it (I think this is
where we pick up that _extra_ equation that we need...).
 
_Add to this the fact that even the brain ocasionally fails to correctly
_solve this problem, and locate the sound source. This is particularly
_true for sounds generated on the plane of points equidistant to both ears...
_...you can't tell whether the sound is comming from infront, behind, above
_or below you, in this case (unless you turn you head to get it off that
_plane, or you see the source of the sound). Your electronic circuit won't
_be able to "turn its head" to get this additional info.

Does it need to?  It already "knows" that the sound is supposed to 
appear in between the speakers...

 
   /| Todd Day (805)968-9352 |\              "I go to school, but
+-+ | The Audio Club at UCSB | +-+    I never learn what I want to know."
+-+ | 926 B   Camino Del Sur | +-+     ..!pyramid!comdesign!ivucsb!todd
   \| Isla Vista, CA   93117 |/                todd@ivucsb.UUCP

john@anasaz.UUCP (John Moore) (11/02/88)

In article <10744@cup.portal.com> R_Tim_Coslet@cup.portal.com writes:
]You wrote...
]>Might be doable in electronics, if variable time delays are available to
]>implement a correlator...adjust the delays for best mathcing in the two
]>channels, and knowing the delay, the heading is almost [sans ambiguity]
]>computalbe...with 3 ears, tis doable. With the digital sampling, and
]>digital correlators, should be doable...sample every 10 microseconds so
]>that even the high frequencies can be time aligned accurately.
]>
]>Any replies are appreciated.
]>
]>ALlen Sullivan
]
]Sure it is doable "with 3 ears"...
]However the original poster was asking how to do it with conventional
]2 channel "Left/Right" stereo. Which can't be done (as another poster
]has already said) because you can't generally solve 2 simultanious
]equations of 3 unknowns to unambigious results.
]
]I simply was explaining (to a poster asking "then how do the ears do it?")
]how they even frequently fail, except that your head can turn. The 
]"electronic head" in conventional stereo can't.

Using digital signal processing, implement the following:

(1) Spectrum analyze each channel into small bands
(2) On L, R, and Center speakers, implement a filter such that
the amount of any frequency band that gets through on L & R from
the original L & R sources is inversely proportional to how
balanced that frequency band is. Make the center directly
proportional to how balanced that frequency band is. Thus,
if a frequency band has equal amplitude on L & R, 0% of it
gets through to L & R speakers, while 100% gets through
on C. If a frequency band has 100% amplitude on L, and 0%
amplitude on R, then C=0%, L=100%, and R= anything you want
(x*0 == 0).

Basically, this approach treats a frequency band as a "sound" and
should be a fair approximation of how the ear works. To make
it better, use correlators rather than spectrum analyzers. To
make it simple, just break audio into 3 bands (with analog
filters) and go it all analog from there.

-- 
John Moore (NJ7E)           {decvax, ncar, ihnp4}!noao!nud!anasaz!john
(602) 861-7607 (day or eve) {gatech, ames, rutgers}!ncar!...
The opinions expressed here are obviously not mine, so they must be
someone else's. :-)