8

I'm looking for an Objective-C class that allows me to get the frequency of a live input sound on the iPhone. Didn't find anything useful.

Before you ask: the frequency will not change for 0.1 seconds.

Thanks for answers, Christian

cschwarz
  • 1,195
  • 11
  • 24
  • 5
    You won't find anything in Cocoa. Probably need to look for some external library, most likely some C or C++ library. – Nick Moore Mar 30 '10 at 19:18

2 Answers2

6

Following is the library used to fid the frequency..

A lib to find the frequency https://github.com/jkells/sc_listener

A example using the above library https://github.com/jkells/sc_listener_sample

Hope it helps some once..

Dilip Rajkumar
  • 7,006
  • 6
  • 60
  • 76
5

Do you mean frequency or pitch ? If it's just a pure sinusoid and you want the frequency then you can just measure the time between zero crossings (crude) or use an FFT to get the power spectrum and then find the peak (more complex, more reliable).

Paul R
  • 208,748
  • 37
  • 389
  • 560