The primary issue in #829, about incorrect frequency calculation has been resolved by bfe496937.
An earlier commit 5e82b63f6 in pre-master-46 conflicts with the proper fix in bfe496937. When the user requests an 1024 point FFT, 5e82b63f6 instead computes an 1023 point FFT.
This has two bad effects:
5e82b63f6 should be reverted. After reverting, we have made some real progress.
This attached netlist demonstrates the bug regarding the last freq bin.
The signal analyzed is a cosine with amplitude 1 at 2048Hz.
Output for Current pre-master-46 :
FFT: Time span: 0.0078125 s, input length: 32
FFT: Frequency resolution: 128 Hz, output length: 17
Freq Value
2048 0.0120527
Output After reverting 5e82b63f6:
FFT: Time span: 0.0078125 s, input length: 32
FFT: Frequency resolution: 128 Hz, output length: 17
Freq Value
2048 0.999997
Removed
Last edit: geraldfournier 2026-03-03
Sorry, I'll put that in a new ticket.
I confirm that 6ae057b3e fixed this issue. Can close. Thanks.