ArduinoFHT – Tastes great! Less filling!

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:

ArduinoFHT wiki page

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.

This entry was posted in updates. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

4 Comments

  1. Roelf
    Posted October 4, 2012 at 9:06 pm | Permalink

    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.

  2. okie
    Posted November 21, 2012 at 7:24 am | Permalink

    1 / (3.2 milliseconds) = 312.5 Hertz
    Did you mean microseconds?

  3. okie
    Posted November 21, 2012 at 7:30 am | Permalink

    No, you meant milliseconds.

  4. Daniel Kern
    Posted January 26, 2014 at 3:19 am | Permalink

    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

  1. [...] 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 [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>