[PD] feedback detection

matthew jones mj at isvr.soton.ac.uk
Mon Aug 21 15:52:03 CEST 2006


Hi,

>> There is an cross-correlation class [cc~] in the flib library,
>> which you can use to do auto-correlation. It has both a time domain
>> and a frequency domain CC function. I found the output of the time
>> domain implementation to be easier to interpret.

>I've forgotten all my DSP math, could you enlighten me as to how I
>might use this?

In short:
cross-correlation or autocorrelation looks at how 'similar' signals are at 
various 'lags' (relative delays between signals).  For example, in the case 
of cross-correlation, you have two different signals, and you compare how 
well they match up when there is no delay between signals.  This gives you 
one number, for lag=zero.  Then you shift one of the signals by a sample and 
do the same again (the comparison is just dot product of all samples in the 
two signal vectors), etc, so you have values for all lags.  Then you will 
have a new vector with peaks where the two signals are similar.  So this is 
often used for finding the delay between two similar signals.  For 
autocorrelation, the same signal is used for the comparison, there is no 
second signal.  Then clearly there will be a big peak at lag=zero because 
the signals are identical with no relative delay.  The next biggest peak is 
often used for pitch detection because if the signal contains a large tonal 
component then at a lag equal to the wavelength of this frequency the 
signals will again look quite similar (positive values mostly line up, 
negative mostly line up, etc).  This is all time domain stuff.  As Jamie 
says, freq domain can be harder to interpret.

enjoy.

Matt

-=-=-=-=-=-=-=-=-=-=-=-
http://www.loopit.org
-=-=-=-=-=-=-=-=-=-=-=- 







More information about the Pd-list mailing list