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?
Resolution in the frequency domain is inversely related to number of FFT bins. You need to either: