且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

AudioKit FFT转换为dB?

更新时间:2023-02-27 13:34:41

数组中的值对应于FFT中的二进制值。使单个箱包含接近1的幅度值将意味着大量能量处于该窄频带中,例如一个非常响亮的正弦曲线(一个单一频率的信号)。

The values in the array correspond to the values of the bins in the FFT. Having a single bin contain a magnitude value close to 1 would mean that a great amount of energy is in that narrow frequency band e.g. a very loud sinusoid (a signal with a single frequency).

正常的声音,例如你在麦克风上吹的声音,在整个频谱上传播能量,也就是说,在许多箱子而不是一个箱子里。出于这个原因,通常随着FFT大小的增加,幅度会变小。

Normal sounds, such as the one caused by you blowing on the mic, spread their energy across the entire spectrum, that is, in many bins instead of just one. For this reason, usually the magnitudes get lower as the FFT size increases.

单个bin上的-40dB的幅度非常大。如果您尝试播放音调,则应在其中一个箱中看到明显的峰值。

Magnitude of -40dB on a single bin is quite loud. If you try to play a tone, you should see a clear peak in one of the bins.