kosme / arduinoFFT

Fast Fourier Transform for Arduino
GNU General Public License v3.0
530 stars 153 forks source link

Hann window incorrectly defined #61

Open hugke729 opened 3 years ago

hugke729 commented 3 years ago

The Hann window in arduinoFFT.cpp is defined as 0.54 * (1.0 - cos(twoPi * ratio)). The 0.54 should be 0.5 (e.g., Hann function on Wikipedia). Looks like the incorrect 0.54 perhaps originates from the Hamming window, where 0.54 is the correct value

Not sure if this alters the respective value in the window compensation table in #40.

/cc @pvutukur