Spectrum analysis

Hi guys,

After weeks of trying to figure out how to use FFT/FHT libraries as spectrum analyzers, I am no further than when I started.

FHT Library: FHTExample - Open Music Labs Wiki

Basically what I want is to get a spectrum analysis of the input from a piezo element and send it via serial to Processing, which should be pretty straightforward. I have done this using an MSGEQ7, but for the application I'm doing, it's not detailed enough, which made me turn to FFT. Unfortunately I suck at math, so trying to comprehend FFT is beyond me.

The problem with the FHT libraries I have tried is that I cant figure out how to just get an array with all the sample values, and output them via serial. If I open the Serial monitor running the example mentioned above, I just get an endless line of blank characters (I checked that the baud rate is correct).

Does anyone have an idea of how to get these FHT samples into an array of numbers that I can pass on to Processing? In advance, thanks.

try changing serial.write to serial.println

the data is currently coming out in binary and not ascii, so its hard to read.

If you just want to plot the data and see what you are looking at, the FHT library comes with a Pure Data sketch for visualizing the data. You need to download and install Pure Data, but then the sketch works very well.