On February 1, 2016 at 7:41:49 pm +01:00, Evan Balster <e...@imitone.com> wrote:
> > > 1. Apply a first-difference filter to input signal A, yielding signal B. > 2. Square signal A, yielding signal AA; square signal B, yielding signal > BB. > 3. Apply a low-pass filter of your choice to AA, yielding PA, and BB, > yielding PB. > 4. Divide PB by PA, then multiply the result by the input signal's > sampling rate divided by pi. > > The low-pass filter used in step 3 determines the time-domain weighting for > the frequency average. (I recommend a rectangular or triangular average.) > You don't see that formula as often as the one involving spectral bins, but it can be found in a few places such as the DAFX book by Zölzer. It's a nice trick when you want to track fast changes in the centroid without having to do lots of overlapped windows. Another simple way if you do an FFT would be to accumulate the amplitude of successive bins, counting from 0 Hz upwards as well as from f_s/2 downwards, stopping at the bin where the summed amplitudes match. And welcome to the list! Risto Holopainen
_______________________________________________ dupswapdrop: music-dsp mailing list music-dsp@music.columbia.edu https://lists.columbia.edu/mailman/listinfo/music-dsp