IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
Center Channel from Stereo, Upmixing technique required!
Realtime
post Jan 7 2004, 12:42
Post #1





Group: Members
Posts: 12
Joined: 7-January 04
Member No.: 11020



Hi folks, I'm new on this forum. Nice to be here! biggrin.gif

I've a question:

I wish to produce "center channel" from a simple stereo audio.

My idea was to extract all the audio content that are COMMON between the left and right channels.
Doing this I will obtain three signal L (without mono contents), C (The mono content) and R (without mono contents).

Do you think it's possible to do this? I think that would be something near to the output of a Dolby Prologic2 that put in the center channel the signal common between Lt and Rt.

That will be useful from me because I'm doing an Upmix of a stereo soundtrack and I wish to put the voice in the center channel without having them in the frontal left and right!

In the surround channel I'm putting the [L-R] signal, decorrelating it a bit with a surround reverb, it works nice, but the problem for me is still the "front image". crying.gif

Suggenstions and tricks are welcome!
Thanx!
Go to the top of the page
+Quote Post
DonP
post Jan 7 2004, 14:05
Post #2





Group: Members (Donating)
Posts: 1471
Joined: 11-February 03
From: Vermont
Member No.: 4955



I find that if I'm centered between the front speakers, I can't tell whether the center channel is on. Sitting significantly off center is a different story, and why there are center speakers in the first place.

Do you have problems with plain stereo? Maybe one of your speakers is reverse polarity?

Anyhow, as you said, the effect you are looking for is Dolby Pro-logic, so that is the way to go. Or are you lookin to implement ProLogic in software?
Go to the top of the page
+Quote Post
2Bdecided
post Jan 7 2004, 14:34
Post #3


ReplayGain developer


Group: Developer
Posts: 5061
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



QUOTE (Realtime @ Jan 7 2004, 11:42 AM)
Doing this I will obtain three signal L (without mono contents), C (The mono content) and R (without mono contents).

You can't quite do that.

Let's call the new channels Ln, Cn, and Rn (n=new!)

If you do the obvious...

Ln=L-R
Cn=L+R
Rn=R-L

Then you have two channels playing the same thing but out of phase (left and right), and a combined channel in the middle.

If you do Mono=L+R

Cn=Mono
Ln=L-Mono
then what you really have is
Ln=L-(L+R)=L-L-R=-R
(not very helpful).

The best passive system is simply
Ln=L
Rn=R
Cn=L+R (-3dB)

But the stereo sound stage width reduces (move the speakers further apart from compensate).

I've read that Michael Gerzon (ambisonics) suggested a better 2>3 conversion, but don't know any more. If you search the archives of the "Sursound" mailing lists, there's a thread on this (Google Sursound).


The Dolby systems work by "steering" the content - reducing the loudness of the quieter channels in favour of the louder channel - so if it detects the content is all in L+R and there's nothing in L-R, it mutes L and R, leaving only C. ProLogic 2 is supposedly more subtle and smart, and so works better for music.

Cheers,
David.
Go to the top of the page
+Quote Post
KpeX
post Jan 9 2004, 15:49
Post #4





Group: Members
Posts: 25
Joined: 5-December 03
Member No.: 10214



If you're interested in stereo to 5.1 upmixing, take a look at this (slightly more complicated ambisonic method) or this (more automated, quite close to what you're trying to do).
Go to the top of the page
+Quote Post
M
post Jan 9 2004, 22:20
Post #5





Group: Members
Posts: 964
Joined: 29-December 01
Member No.: 830



From a simple stereo input, if you invert one channel and then combine the channels you will eliminate all audio common to both:

Left + (inverted Right) = "zero" Center

From this, if you go back to the original Left and Right channels, subtract the "zero" Center from each to create the centered audio channels (which are essentially duplicates of each other):

Left - ("zero" Center) = "centered" Left = "true" Center
Right - ("zero" Center) = "centered" Right = "true" Center

Then, the "true" Center can be subtracted from the original Left and Right channels to create the "extreme" Left and Right:

Left - ("true" Center) = "extreme" Left
Right - ("true" Center) = "extreme" Right

Variations on this process form the basis for the standard creation of OOPS (Out-of-phase-stereo) mixes.

- M.
Go to the top of the page
+Quote Post
Moitah
post Jan 9 2004, 23:01
Post #6





Group: Members
Posts: 193
Joined: 5-June 02
From: Virginia Beach, VA
Member No.: 2227



Take a look at VirtualDub's "Center cut" filter. Here's a description from Avery Lee:
QUOTE
Center cut. The classic "vocal cut" filter, except that the output is stereo instead of mono. This is accomplished through FFT phase analysis; the output will have some warbling in it, but stereo separation is preserved.

It not only produces stereo side output, but a mono center output (depending on which output pin of the filter is used).

It sounds pretty good IMO, here's a clip of the stereo side output: M2M - Smiling Face (23 Sec Clip) (Sorry, I didn't make a clip of the mono center output)

I asked a while back if someone would make this into a Winamp plugin, but got no response... sad.gif
Go to the top of the page
+Quote Post
Moitah
post Jan 12 2004, 07:28
Post #7





Group: Members
Posts: 193
Joined: 5-June 02
From: Virginia Beach, VA
Member No.: 2227



Well, I ended up doing it myself tongue.gif. See this thread.
Go to the top of the page
+Quote Post
tangent
post Jan 12 2004, 19:43
Post #8





Group: Members
Posts: 674
Joined: 29-September 01
Member No.: 63



QUOTE (M @ Jan 10 2004, 05:20 AM)
Left - ("true" Center) = "extreme" Left
  Right - ("true" Center) = "extreme" Right

It doesn't quite work this way, as 2B explained 2 posts before yours
Go to the top of the page
+Quote Post
Realtime
post Jan 13 2004, 02:27
Post #9





Group: Members
Posts: 12
Joined: 7-January 04
Member No.: 11020



QUOTE
Left + (inverted Right) = "zero" Center

From this, if you go back to the original Left and Right channels, subtract the "zero" Center from each to create the centered audio channels (which are essentially duplicates of each other):

Left - ("zero" Center) = "centered" Left = "true" Center


Yes I really think this doesn't work

you talk about "zero" = L-R

"Centered" left = Left - "zero" = L- (L-R) = L - L + R = R

not very useful wink.gif

That's because in "zero" (L-R) both channel are present and the R channel is phase inverted!
Go to the top of the page
+Quote Post
Realtime
post Jan 13 2004, 02:38
Post #10





Group: Members
Posts: 12
Joined: 7-January 04
Member No.: 11020



QUOTE
The best passive system is simply
Ln=L
Rn=R
Cn=L+R (-3dB)

But the stereo sound stage width reduces (move the speakers further apart from compensate).

I've read that Michael Gerzon (ambisonics) suggested a better 2>3 conversion, but don't know any more.


He does something like

Ln= L - K*R
Cn= K * (L+R)
Rn = R - K*L

It works fine with K=0.5
Better than a complete "Side" (L-R) because Ln and Rn are not completely phase inverted, the mono content is reduced and the stereo picture are still good.
It's a compromise.

To do Ln and Rn I've just created a "subtraction channel": another stereo channel in the mix with the original stereo "swapped" in R L and phase inverted.

Playing with fader you can tune K to your own settings.

It sounds good
But the Voice are not full separated in Cn as I wish... sad.gif
Go to the top of the page
+Quote Post
M
post Jan 13 2004, 17:12
Post #11





Group: Members
Posts: 964
Joined: 29-December 01
Member No.: 830



Would it make more sense if I explained it by replacing the minus signs with a combination of plus signs and notation of the phase inversion? I was assuming folks who read this could translate that part for themselves, from the previous description. At any rate, here's a second attempt at explaining the same thing:

Left + (inverted Right) = "zero" Center

From this, if you go back to the original Left and Right channels, subtract (or add as an inversion) "zero" Center from each to create the centered audio channels (which are essentially duplicates of each other):

Left + (inverted "zero" Center) = "centered" Left = "true" Center
Right + (inverted "zero" Center) = "centered" Right = "true" Center

Then, the "true" Center can be subtracted (or added as an inversion) from the original Left and Right channels to create the "extreme" Left and Right:

Left + (inverted "true" Center) = "extreme" Left
Right + (inverted "true" Center) = "extreme" Right

Note that the terms "zero," "centered," "true" and "extreme" are in quotation marks (""), to imply that they are used only for convenience of notation, and to clarify channel order.

Now, all of this still may not quite do what RealTime was wanting to do, but I assure you it is a sound practice. Next time, before you write something off with "It doesn't quite work this way," try going through it step by step to be sure you understand what's been written.

[/semi-irritated rant mode off]

- M.
Go to the top of the page
+Quote Post
Realtime
post Jan 13 2004, 21:51
Post #12





Group: Members
Posts: 12
Joined: 7-January 04
Member No.: 11020



I'm sorry but what you say has something that doesn't work from an algebric point of view.

You say:
Left + (inverted Right) = "zero" Center

So the thing that you call "zero" Center is (L-R)

Going on, you say:
Left + (inverted "zero" Center) = "centered" Left = "true" Center

if we replace "zero" Center with L-R we have
Left + (inverted "zero" Center) = Left - (L-R)

but this means:
= Left - L + R = R

this is not an opinion as sayed by einstein wink.gif
Go to the top of the page
+Quote Post
[JAZ]
post Jan 13 2004, 22:30
Post #13





Group: Members
Posts: 1764
Joined: 24-June 02
From: Catalunya(Spain)
Member No.: 2383



Center channel is (L+R)/2 (if both are equal, it is mono, and center has this value. If both are opposite, there's no central content, so this is zero)

"pure" left channel would be the left minus this center channel. similar with the right one.
Go to the top of the page
+Quote Post
M
post Jan 14 2004, 02:39
Post #14





Group: Members
Posts: 964
Joined: 29-December 01
Member No.: 830



A few things:

1) I wish to apologize for the tone of my previous post. I was irritated, and it was uncalled for.

2) I also wish to withdraw the explanation I offered, as it is (as several of you already recognized) flawed.

The lesson? Don't ever try to explain things when your wife has just told you she might be pregnant. Even concepts with which you are intimately familiar, and techniques you have used for years, will seem a little garbled and incoherent.

I hesitate to post anything more until my mind settles down (And I hope everyone here will forgive my obvious and egregious errors!).

- M.
Go to the top of the page
+Quote Post
Realtime
post Jan 14 2004, 02:52
Post #15





Group: Members
Posts: 12
Joined: 7-January 04
Member No.: 11020



M don't worry, for me it's ok! tongue.gif

I think you've just created a good "Center Channel" between a great Stereo couple (you and your wife), so don't mind about mistakes! wink.gif

Best wishes!

GIANNI

biggrin.gif
Go to the top of the page
+Quote Post
Realtime
post Jan 14 2004, 02:59
Post #16





Group: Members
Posts: 12
Joined: 7-January 04
Member No.: 11020



QUOTE
"pure" left channel would be the left minus this center channel



JAZ if you subctract L+R sum from the left channel, the only thing you'll get will be the Right channel phase inverted

It's simple:

L - (L+R) = L - L - R = -R

Cheers
Go to the top of the page
+Quote Post
ancl
post Jan 14 2004, 03:12
Post #17





Group: Members (Donating)
Posts: 185
Joined: 29-September 01
Member No.: 54



QUOTE (Realtime @ Jan 14 2004, 02:59 AM)
QUOTE
"pure" left channel would be the left minus this center channel



JAZ if you subctract L+R sum from the left channel, the only thing you'll get will be the Right channel phase inverted

It's simple:

L - (L+R) = L - L - R = -R

Cheers

Yes, but if you do as JAZ suggested you get:

L - (L+R)/2 = (L-R)/2

This post has been edited by ancl: Jan 14 2004, 03:13
Go to the top of the page
+Quote Post
tangent
post Jan 14 2004, 12:50
Post #18





Group: Members
Posts: 674
Joined: 29-September 01
Member No.: 63



The only 'real' way to do this would be to do a spectral band transform, filter to the channels and then reconstruct.
Go to the top of the page
+Quote Post
Realtime
post Jan 15 2004, 00:08
Post #19





Group: Members
Posts: 12
Joined: 7-January 04
Member No.: 11020



Tangent can you explain this process?
Go to the top of the page
+Quote Post
Realtime
post Jan 16 2004, 12:43
Post #20





Group: Members
Posts: 12
Joined: 7-January 04
Member No.: 11020



QUOTE
Yes, but if you do as JAZ suggested you get:

L - (L+R)/2 = (L-R)/2


Yes ancl you're right.

JAZ suggests to do this to obtain the "pure" L, and doing the same on the Right channel to produce the "pure" R.

So we will have (L' and R' are the supposed "pure" versions)

L'= (L-R)/2
R'= (R-L)/2

but this also mean that L' and R' are the same thing with the phase inverted.

This is something like an M/S encoding, whith M containing the mono version (beware: NOT only the mono contents but the mono mix of the two channels) and S containing the "side" LR, in the same way that an M/S microphone captures the spacial information.

To recreate the original stereo picture you have to do:
L=M+S
R=M-S

So a way to derive the three channels could be the follow:
L=S
C=M
R=-S

If you are sitting EXACTLY in the front of the speaker, you can listen something close to the original stereo picture "expanded" on the three speakers, but this is not a valid way to derive the channels because nobody has the speaker perfectly tuned and centered. Furthermore if you tilt or rotate your head you'll listen very strange Phase effects because L=-R and viceversa.

I use something very close, but a little bit better for the phase:

L'=L-0.5*R
C=(L+R)*.5
R'=R-0.5*R

this reduces the phase inversion and preserve center separation and stereo picture.
It's not perfect but a good compromise IMO.

But I like to obtain MORE.... blink.gif
What I'm searching for it's a way to obtain a COMPLETE (almost) separation of the voices on the center channel...

what's the way?? crying.gif
Go to the top of the page
+Quote Post
Moitah
post Jan 16 2004, 20:14
Post #21





Group: Members
Posts: 193
Joined: 5-June 02
From: Virginia Beach, VA
Member No.: 2227



Realtime: Did you look at what I suggested, or is that not what you want?
Go to the top of the page
+Quote Post
Realtime
post Jan 17 2004, 15:41
Post #22





Group: Members
Posts: 12
Joined: 7-January 04
Member No.: 11020



MOITAH: YES!!!! I'm sorry but I missed your reply!! ohmy.gif

Thanks a lot to sent me that link! rolleyes.gif

It works very very well and it sounds very very good.
Anyway it has little phase distortion and sometimes it produce crack/noise in the waveform (I suppose with very high frequency sounds or fast envelope sounds) blink.gif
I don't know if it's a problem of the technique used or an implementation bug.

Anyway I'd like to know more of the Avery Lee techique used to do that because I wish to do the same in Nuendo Surround Edition on my own stereo files.
I understand something of C/C++ but it's not a simple task for me to understand the algorythm from the source code.. sad.gif

Furthermore, me and a friend of mine would like to produce a Free VST Plugin to do that stuff, it would be very nice for all the people that use Cubase/Nuendo or other VST Hosts. wink.gif

Thanks a lot!!

smile.gif
GIANNI
Go to the top of the page
+Quote Post
Moitah
post Jan 17 2004, 17:47
Post #23





Group: Members
Posts: 193
Joined: 5-June 02
From: Virginia Beach, VA
Member No.: 2227



QUOTE (Realtime @ Jan 17 2004, 09:41 AM)
Thanks a lot!!

No problem smile.gif. I'm glad you asked about it, because I had pretty much given up the idea of having it as a Winamp plugin (the first time I looked at the code in VirtualDub, I thought it would be too hard for me to do... and nobody else seemed interested). I tried more patiently this time and it took me almost 2 whole days, but I'm very happy that I got it done (and Chun-Yu made a foobar2000 plugin based on it as well).
Go to the top of the page
+Quote Post
Moitah
post Jan 21 2004, 21:41
Post #24





Group: Members
Posts: 193
Joined: 5-June 02
From: Virginia Beach, VA
Member No.: 2227



QUOTE (Realtime @ Jan 17 2004, 09:41 AM)
... sometimes it produce crack/noise in the waveform (I suppose with very high frequency sounds or fast envelope sounds)  blink.gif

Try the new version. All the processing is now done with 'double' instead of 'float' variables. I don't know if this fixed it, but when comparing output with the original version I noticed some beeping sounds were gone.
Go to the top of the page
+Quote Post
Realtime
post Jan 22 2004, 20:16
Post #25





Group: Members
Posts: 12
Joined: 7-January 04
Member No.: 11020



I've tried the 1.1.0 release, It think it's the last version, isn't it?

Anyway I hear also large and strange phase distortions, and I'd like to improve the quality of the output.

About that Avery says:

What really improves the quality of the algorithm is
increasing the FHT size to 16384 points or beyond; for smaller FHTs
such as 4096 points, increasing the frequency of the overlapping
transforms to every 1024 or even 512 samples helps somewhat. You have
to adjust the output amplitude to compensate, of course.


I've tried to increase the FHT window size in the source code changing some constants in this way:


ORIGINAL:
enum {
kWindowSize = 4096,
kHalfWindow = 2048,
kQuarterWindow = 1024
};

MODIFIED:
enum {
kWindowSize = 8192,
kHalfWindow = 4096,
kQuarterWindow = 2048
};

But it doesn't work.. it play something and then crashes.. crying.gif
What's wrong?
Go to the top of the page
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 29th July 2014 - 13:15