<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#666666" bgcolor="#ffffff">
    On 04.11.2010 16:14, Mathieu Bouchard wrote:
    <blockquote
      cite="mid:alpine.DEB.2.00.1011041109210.6119@paik.artengine.ca"
      type="cite">On Thu, 4 Nov 2010, Martin Schied wrote:
      <br>
      <br>
      <blockquote type="cite">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Hi everyone,
        <br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i wondered if someone made a patch measuring the PHASE of
        a reference signal compared to measured signal
        <br>
        <br>
        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.
        <br>
      </blockquote>
      <br>
      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 ?
      <br>
    </blockquote>
    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...<br>
    I took the math from
    <a class="moz-txt-link-freetext" href="http://www.engr.udayton.edu/faculty/jloomis/ece561/notes/xcorr/xcorr.html">http://www.engr.udayton.edu/faculty/jloomis/ece561/notes/xcorr/xcorr.html</a>
    which is offline now unfortunately, but the explanation was very
    good. hope it comes back. ;)<br>
    <blockquote
      cite="mid:alpine.DEB.2.00.1011041109210.6119@paik.artengine.ca"
      type="cite">
      <br>
      (that's equal to the atan2 between the real and imaginary parts of
      the cross-correlation)<br>
    </blockquote>
    attached a correlation and a "phase difference" patch. it's very
    basic and may contain errors ;)<br>
    <br>
    Martin<br>
    <br>
    <br>
    <br>
    <br>
  </body>
</html>