[music-dsp] Extract the center information from a stereo signal
Dave Gamble
signalzerodb at yahoo.co.uk
Tue Jun 29 18:41:43 EDT 2004
Hi,
On 29 Jun 2004, at 21:32, Christofer Bustad wrote:
> Hi! I've thought a lot about how to enhance/widen the stereo image of a
> stereo signal. (I plan to use this in my plug-in Energize which can be
> found
> at www.bustad.com.)
Cool.
> I thought that if I could separate the center
> information from a stereo signal I could work with just the stereo
> information without affecting the center information. Is there an easy
> way
> of doing this?
Well... to be quite, quite, technically precise, I can hold up
information theory,
and say that information cannot be created nor destroyed, just
converted; so if you have
to signals, representing left and right, the data available to you is
the
in-phase component and the out-of-phase component.
You get L+R, which is the 'mono sum' of the two; and L-R (or R-L; it's
the same information, but *-1).
I can argue that L+R is the 'center information' thus:
If I place a microphone equidistant between two speakers pointing
directly toward the mic,
the mic will measure the signal from L, and the signal from R.
Out-of-phase signals will cancel, and in-phase components will add;
this is L+R.
From some quick information theory, I can say that if I know L+R, but I
want to
retrieve L or R, the only piece of information I need is (L-R).
L=((L+R)+(L-R))*0.5;
R=((L+R)-(L-R))*0.5;
You could consider L-R as your 'stereo phase' information, if you will.
> Do I have to do an FFT and look at all the frequencies?
No. Whilst you might be able to extracy some interesting information
from this, the 'center information'
is (in all commercial applications I have ever seen, both digital and
analogue) L+R.
> I thought that if I would look at the difference x(n)-x(n-1), I could
> assign
> the common change to the center information, but I haven't tried that
> yet.
It's always a good idea to step back for a second and think of your
digital filter
as the 'equivalent' (or perhaps analogous) analogue component.
x(n)-x(n-1) = (x(n)-x(n-1))/1 = (x(n)-x(n-t))/t = dx/dn, with a
granularity of t=1
So, the difference is the differential. Alas, this is often meaningless
for audio; since it's
basically a high pass filter... however, this might be precisely what
you want.
> Is there any math that can be applied to stereo enhancement that
> doesn't
> involve the frequency domain (except for L-R and similar things)?
>
If by 'frequency domain' you mean 'running FFTs', then yes; I wouldn't
expect to see an FFT
implementation in a context like this unless it was part of a clever
implementation of something
that turns out to be rather cycle-intensive without.
If by 'frequency domain' you mean literally, any algorithm which has
memory, you're basically
left with L-R, and perhaps some static waveshaping of it; although I'm
not sure what results you'd
get from this; I'd be interested to hear about it. (and without some
memory, it'll alias...)
Otherwise, you have a world to play with.
Perhaps a filter (a parametric eq set to cut, with a slightly lower
midrange cutoff, perhaps 600Hz, with
some gain, to give a hifi smile) applied to L-R, would give an
'excited' stereo image sound.
Perhaps some compression, or some expansion on L-R would be interesting.
Perhaps (rather equivalently mathematically, but not for the user) some
compression or expansion of L+R,
but not L-R would be interesting...?
> It would be very interesting to hear if anyone have any thoughts about
> this!
>
Any of the above of any interest?
Take care,
Dave.
More information about the music-dsp
mailing list