AS3 computeSpectrum fft true

I'm just trying to figure out what the values ​​sent back from computeSpectrum(bytes,true,0) mean. I have values ​​from 0 to 1 for each float that I read from an array of bytes, but each value represents a range of Hz.

+4
source share
2 answers

ByteArray returned by (well, modified) computeSpectrum () contains 512 bytes. The first 256 for the left channel, and the second 256 for the right channel. Each byte represents the normalized energy level for 1 of 256 frequency ranges. The bands are linearly separated from ~ 6 Hz to ~ 11 kHz with a passband of 43.064040 Hz (source: http://blog.benstucki.net/?p=60 ). Thus, each value of the float that you are looking at is the energy of this frequency band. Keep in mind that you can compensate for the linear distribution if you do not need visually distorted results.

+2
source

In my opinion, each of the values ​​represents the amount of energy that the frequency band has, given the resolution.

0
source

Source: https://habr.com/ru/post/1306312/


All Articles