Reputation: 31
for a school project I am trying to make an android application that, once started, will perform a spectrum analysis of live audio received from the microphone or a bluetooth headset. I know I should be using FFT, and have been looking at moonblink's open source audio analyzer ( http://code.google.com/p/moonblink/wiki/Audalyzer ) but am not familiar with android development, and his code is turning out to be too difficult for me to work with.
So I suppose my questions are, are there any easier java based, or open source android apps that do spectrum analysis I can reference? Or is there any helpful information that can be given, such as; steps that need be taken to get the microphone input, put it into an fft algorithm, then display a graph of frequency and pitch over time from its output?
Any help would be appreciated, thanks.
Upvotes: 2
Views: 7438
Reputation: 31
Suggestion....
It depends what you want to use it for. If you don't need the entire spectrum, then you might only need a filter, easily achieved using a FIR filter. Note that you can get 3 bands (LP, BP and HP) very quickly by realizing that the HP uses the same multipliers as the LP, just some of the values are subtracts instead of adds. Likewise the BP is obtained by subtracting the LP and HP from the original data (all pass). So, if you code it right, you can get a very fast 3 band analyzer....if thats all you need.
If you want to use an FFT, you might look to see if there isn't already an FFT available in the Java libraries, written in C using the JNI (NDK) interface. This will be much faster than writing your own in java.
Hope that helps.
Upvotes: 3