I just need some clarification of some very basic aspects of creating a frequency analyzer. I am writing a c++ program, so far it is just a media player, with a custom explorer. You can make playlists, shuffle, repeat etc.
But my goal is to continue to add functionality. So far, I just have a signal level meter, and I am now trying to add a frequency analyzer.
I am using fftReal. So I am at the stage where I have the output, and I am scaling to dbfs like so which I think is correct, but not exactly sure.
for (int i=0; i < fftsize/2; ++i) db[i]=20*log(sqrt(imaginary[i]*imaginary[i]+real[i]*real[i]));
So I know I should apply a window function somewhere, and I'm trying to understand how to do that. But I am wondering this as well. If I want to display the data as rectangles popping up and down rather than plotting points and connecting with lines, and I want to limit the amount of rectangles to about 50 or so. Do I take the average db of a range.
I notice that in many applications, the frequency scale is skewed, where the higher frequency, the small distance between units. What kind of scale is used, and how can I break up the spectrum so that I have a nice visual?
I'm sorry if this has all been discussed before, I have been googling for a while now, and overall I am overwhelmed with information, but there are a just a few key thing which I need to understand first.