Not too long ago, we finished an Arduino FFT library, which added frequency spectrum analysis to the list of things you can do with an Arduino. Now you can do that same task in half the time and half the memory usage, thanks to the Fast Hartley Transform (FHT). It’s identical to the FFT, except that it was designed specifically for processing real audio data, which is exactly what we’re all about here. It can do a 256 point spectrum in 3.2ms! That’s fast enough to be sampling at 40ksps and not miss a beat. And we bundled it up into a nice Arduino library with examples, so check it out:
This transform is named after the same Ralph Hartley that gave us the Hartley oscillator. So thanks to Ralph for coming up with this nice transform back in 1942, and to Ronald Bracewell for making the dicrete version in 1983, and finally to Stanislav for introducing it to me in 2012.
4 Comments
Well, it works great. Since I am already 3 weeks busy with Cascata and spectrum/waterfall and don’t get it work. This is in one time working.
Only I don’t get out any integer number (0…255) for doing x,y on the TFT.
1 / (3.2 milliseconds) = 312.5 Hertz
Did you mean microseconds?
No, you meant milliseconds.
I’m trying to use your FHT library within a larger Arduino project. Using your library by itself has worked great in one try! However, when I try to include it within my larger project, I get many linker errors. It doesn’t work when multiple libraries are including FHT.h, even though it has include guards. I get multiple definition errors for all of the variables. I played around with making some of the variables static, but to no avail. Do you have hints for why it won’t work?
One Trackback
[...] with FHT, or Fast Hartley Transform. Why? I played with a few libraries, and ended up using the one from Open Music Labs – I highly suggest checking out their benchmarks – FHT is pretty much as fast as [...]