Welcome to %s forums

BrainModular Users Forum

Login Register

Cross-correlation / phase meter

I need help on a Patch
Post Reply
susceptor
New member
Posts: 6
Contact:

Unread post by susceptor » 21 Nov 2012, 21:17

I'm trying to create a correlation / phase meter that will show the relationship between L channel and R channel. Basically, it outputs 1 if channels are identical, 0 if there's no correlation and -1 if the channels are completely out of phase. From what I looked on DSP forums, the cross-correlation is either IFFT ( FFT(x_padded) * conj(FFT(y_padded) ) or IFFT ( FFT(x_padded) * (FFT(y_padded_reversed) ); x_padded and y_padded are the input signals padded at the end with 0s (for at least the same as their initial size) and y_padded_reverse is y_padded , but time reversed.

Anyway... the idea is that I tried using this, but to no avail. Any help here, or ideas on how I could implement a cross-correlation meter?

susceptor
New member
Posts: 6
Contact:

Unread post by susceptor » 03 Dec 2012, 08:59

Solved! Found the answer HERE.
Apparently it's easier than I thought – I don't even need to use FFT: it's E{L*R} / sqrt( E{L^2} * E{R^2} ), where E{..} is the averaged (mean), and can be implemented using a low pass filter. I used the Linkwitz-Riley module from usine and works like a charm.

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 03 Dec 2012, 09:08

good news ! ;)

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests