On 04.11.2010 16:14, Mathieu Bouchard wrote:
On Thu, 4 Nov 2010, Martin Schied wrote:
Hi everyone,
i wondered if someone made a patch measuring the PHASE of
a reference signal compared to measured signal
you could one of the cross-correlation externals to measure the
time delay between 2 signals. (there's one external in iem_tab
from pd-extended I remember and there are possibly more). If
that's useful for you I created a similar, fft based patch using
vanilla objects I can post here. However correlation doesn't
directly measure phase differences of separate frequency bands
but the delay of the signal over all frequencies.
What do you mean ? If you get the imaginary part of the logarithm
of the cross correlation, it gives you a list of phase differences
corresponding to each frequency bin, right ?
if your's still in the frequency domain you can do such things, but
the iem_tab external output is already time domain - also I'm no
math guru so you definitely answer this better...
I took the math from
http://www.engr.udayton.edu/faculty/jloomis/ece561/notes/xcorr/xcorr.html
which is offline now unfortunately, but the explanation was very
good. hope it comes back. ;)
(that's equal to the atan2 between the real and imaginary parts of
the cross-correlation)
attached a correlation and a "phase difference" patch. it's very
basic and may contain errors ;)
Martin