You've already forked torvalds-GuitarPedal
mirror of
https://github.com/torvalds/GuitarPedal.git
synced 2026-06-17 13:17:42 +00:00
This is all antigravity based on my requests to show the things our tuner code does. I should have done this originally, because the harmonic peaks are much more obvious when visualized this way, and it also shows why the whitening is so hard. The harmonic peaks move up a bit due to the inharmonicity of the guitar strings. I wonder if I can actually try to account for that and improve the whitening? But the really good news is that this also compares the 4x downsampled signal and my fastsincos Hann function with the "real thing". Including a zero-padded full-frequency FFT (that wouldn't be remotely reasonable to run on the poor little rp2354 - it makes this visualizer slightly slow even on my desktop workstation ;) And the math itself comes out with absolutely flying colors. There is effectively zero difference. The 4x downsampling works perfectly, and the Grandke interpolation gives effectively the exact correct result and a higher-resolution FFT doesn't add any value. If anything, being _so_ spot-on means that we probably could use a smaller FFT. But why mess with perfection? Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>