Reputation: 2002
I want to detect the frequency of a tone in a video with my iPhone. The frequency of this tone should be between 17 kHz to 20 kHz, I found a sample, but when I try it on the simulator on my Mac it works and when I put it to my iPhone to test on the device it doesn't work. The sample I found it can't recognize the tone if there are other sound around it, so it's not useful for my purpose. How I can detect a tone with this frequency by using iPhone? There's a library that I can use?
Upvotes: 1
Views: 601
Reputation: 3478
Are you trying to do it using microphone ? if yes do you need check if your iPhone hardware are able to track this frequency, search by the microphone Frequency Response from your hardware!
17kHz to 20kHz are on the limit that the human ears can listen !
Are diferents way to find Frequencies, we need know what type of sound are you trying to find the Frequencies, this is monophonic, polyphonic, pure tone (sinusoids) ??? When you say "frequency of a tone" is too vague !
Some suggested algorithms for:
monophonic - algorithms based in autocorrelation can work well (AMDF, YIN, etc)
polyphonic - if your signal is polyphonic things will get more complicated, try following the algorithm described by A. P. Klapuri, “Multiple Fundamental Frequency
Estimation based on Harmonicity and Spectral Smoothness"
pure tone - this can be very easy to find, one simple FFT can solve your problem
I not know any library to IOS, I can only give you directions which you should take.
Upvotes: 3