Skip to main content
Topic: spectrum analyzer using vdsp (Read 1883 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

spectrum analyzer using vdsp


First, sorry for my english, I hope you'll understand my problem.
I'm working on a spectrum analyzer using the apple vdsp lib to make the fft. My fft is working on real values. It seems to work good, by that I mean that the graphical result seems to correspond to the "behaviour " of my sample. But I'm still not satisfied, because I 'd like the amplitude display (in dB) to show the correct values, otherwise the analyzer would be useless..
I've printed the output values values of my fft and the "up values" of the real parts goes up to 100 or down to -100, and the imaginary part goes the same way.. For example if I'm playing a 40Hz harmonic, I have the amplitude values around the 4th case of my tab (which si good) which are going up to 100, and the others values are between -5 and 5 (approximatly). I suppose that's because I'm not doing the scaling properly after doing the fft. My method to rescale is to divide each element by its length. I'm doing also a hanning before performing the fft.
So my question is how to use the scaling with the vdsp lib?
Hope I've exposed clearly my problem. thanks in advance for your answers.


SimplePortal 1.0.0 RC1 © 2008-2020