Hi Everyone,
I am sampling a microphone for spectral analysis using a microcontroller simillar to arduino. Due to the nature of application, I am trying to compute everything I can on the microcontroller itself. I have optimized everything so I am getting adequate sampling/FFT speeds.
However, there is a inherited spectral leakage which I initially solved using a hann window. But in doing so, I am getting drastic speed downs as a computational cost. I have tried using all the inbuilt functionalities onboard, so it can be said that everything is being done as fast as it can be (in terms of programming). The alogrithm is fairly simple:
Step 1: Gather samples from microphone using ADC.
Step 2: Apply Hann window:
Step a: for every sample[i] (the sample element), multiply the sample with the multiplier:
(1 - cos(2*PI*i/Sample_size))/2
Step b: repeat Step a for every sample element in the Sample matrix
Step 3: Compute fft of the resultant matrix from Step 2
To initially solve the problem, I wish to apply the hann window, after having computed the fft. I want to do this because I am taking the output of this fft to a computer where I have decent amount of computational power.
The problem is open to both answers and suggestions.
--Asheesh