enkitec@gmail.com wrote: > On 30-Mar-10 10:51, Dave Tweed wrote: > > I would also point out that in a tone-detection application, in which you > > only care about magnitude and not about phase, the low-pass filtering > > doesn't need to be a separate step. Instead of an IIR low-pass filter at > > the output, you can create an implicit FIR low-pass filter by applying a > > "window" function directly to the sine/cosine coefficients. Essentially, > > what you then have is a pair of narrow quadrature-phase bandpass filters > > for each frequency, and you're measuring the magnitude of their combined > > outputs (sum of squares). > > Isn't Goertzel algorithm like that? No, not really. The Goertzel algorithm converts a one-bin nonrecursive DFT calculation into an equivalent recursive form (requiring much less data storage and very few CPU cycles per sample) that comes up with the same answer. As a result, it cannot be implemented as a sliding-window version. -- Dave Tweed -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist