I am just trying to understand what the values sent back from computeSpectrum(bytes,true,0)
mean. I have values ranging from 0 to 1 for each float i read from the byte array but does each value represent a range of Hz.
Asked
Active
Viewed 1,491 times
4

tshepang
- 12,111
- 21
- 91
- 136
-
This question is for a different FFT implementation, but I think the answers will apply for your question also: http://stackoverflow.com/questions/433831/help-me-understand-fft-function-matlab – mtrw Apr 08 '10 at 00:38
2 Answers
2
The ByteArray returned (well, modified) by computeSpectrum() contains 512 bytes. The first 256 are for the left channel and the second 256 are for the right channel. Each byte represents the normalized energy level for 1 of 256 frequency bands. The bands are divided linearly from ~6 hz to ~11khz with a bandwidth of 43.0664062 Hz (source: http://blog.benstucki.net/?p=60). So each float value you're looking at is the energy of that frequency band. Be aware that you might want to compensate for the linear distribution if you don't want visually skewed results.

T3db0t
- 3,491
- 4
- 28
- 45
0
In my opinion each of the values represents the amount of energy a band of frequency has, considering the resolution.

Oliver
- 487
- 2
- 9