# strange FFT size...

This topic is 3047 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi! The FFT my Engine computes to some music is very strange. It works, but the bars on the left are MUCH higher than the bars on the right side. I've seen this in some other apps, too. Is there a way to make them all sized right, like in those WinAmp?

##### Share on other sites
I'm not really an expert in this question but isn't it normal that the low frequencies are boosted? Or is it something else that you meant by bars on the left?

##### Share on other sites
They are not boosted. Lower frequencies just encode more information, higher frequencies are not heard very well by human, so usually they are not present in encoded form of audio (or they are encoded with low weight compared to lower frequencies).

##### Share on other sites
Here you can see the FFT of the song compared to the same song in winamp,at the same position:

The last *bar* is at position 0, or 0.0000123, whatever, while the left *bars* are very high! In winamp you can see, that everything has got a good height.

##### Share on other sites
It's tricky.

First, the x axis represents various frequencies. The left-most and probably many on the right are discarded.

If the input of 44.1kHz is converted using 2048 buckets, then each bucket covers 44.1kHz/2048 = 21.5 Hz. Human range of hearing is 20-20,000Hz. This means values at index 1..952 would be displayed. It might be more complex, I don't recall right now how exactly mp3s are sampled.

For visualization I sometimes used a simple multiplication. I'd multiply the value at x by log(i), sqrt(i) or even i, where i = 0..n (0..2048) in above case. Or perhaps it was log(f(i)).

The article above suggests a few more ways on how to average the samples. Toying around with median or average might work as well.

1. 1
Rutin
18
2. 2
3. 3
JoeJ
12
4. 4
5. 5

• 16
• 18
• 10
• 13
• 17
• ### Forum Statistics

• Total Topics
631694
• Total Posts
3001746
×