我正在尝试实现 FFT,我想问一下我所做的是否正确。我将 GSL(GNU 科学图书馆)用于 FFT 函数。我一直在阅读有关 FFT 的教程,但我仍然想请人验证我是否朝着正确的方向前进。
这是我通过网络材料提出的方法:
The input is a list of the amplitudes of a sin wave generated
in audacity at 440Hz (A).
The sample rate is 44100
# FFT points: 1024
有人可以解释如何选择 FFT 点的数量吗?或者它是否重要。我可能忽略了它,但我似乎找不到选择这个数字的方法。
编辑:我认为命名这个 FFT 窗口更合适,因为你在样本上滑动一个窗口 1024 点以找到频率。
bin size = 44100 / 1024 = 43.066
运行 FFT 后,我有另一个幅度列表,并且基于它们所在的 bin,即正在检测的频率,对吗?所以为了找到生成信号的频率,我想找到最高峰?
A bin is defined as a peak if and only if the bin has an amplitude greater than
2 bins to the left and 2 bins to the right.
这种方法是否在获取输入信号频率的正确轨道上?