Unable to get correct frequency value on iphone

元气小坏坏 提交于 2020-01-13 07:15:48

问题


I'm trying to analyze frequency detection algorithms on iOS platform. So I found several implementations using FFT and CoreAudio (example 1 and example 2). But in both cases there is some imprecision in frequency exists:

  • (1) For A4 (440Hz) shows 441.430664 Hz.
  • (1) For C6 (1046.5 Hz) shows 1518.09082 Hz.
  • (2) For A4 (440Hz) shows 440.72 Hz.
  • (2) For C6 (1046.5 Hz) shows 1042.396606 Hz.

Why this happens and how to avoid this problem and detect frequency in more accurate way?


回答1:


Resolution in the frequency domain is inversely related to number of FFT bins. You need to either:

  • increase the size of your FFT to get finer resolution
  • use magnitude of adjacent bins to tweak the frequency estimate
  • use an alternative method for frequency estimation rather than FFT e.g. parametric model


来源:https://stackoverflow.com/questions/9477535/unable-to-get-correct-frequency-value-on-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!