1

Possible Duplicate:
How to detect sound frequency for particular sound in iphone?

I am seeking a way to find the frequency of mic input. I can record my voice or a sin noise in a temporary file.

For the recording I am using the AVFoundation framework. I used this framework to find the peak of the signal. What can I do to find the frequency of the signal?

Community
  • 1
  • 1
attin83
  • 115
  • 3
  • 8
  • Try searching SO for the pitch-tracking tag. – Bjorn Roche Dec 20 '12 at 16:36
  • 1
    attin83, if you've asked the wrong question, then realise it because of my answer, and then edit your question to be the question you meant, it might be polite to comment on my answer. Otherwise I get downvoted unfairly. – occulus Dec 20 '12 at 17:00
  • See my answer to the same question here: stackoverflow.com/a/19966776/468812 – krafter Nov 13 '13 at 23:50

1 Answers1

1

There is a quite good example project from Apple. Here is the link to the aurioTouch2 sample app: https://developer.apple.com/library/ios/samplecode/aurioTouch2/Introduction/Intro.html

I guess you need to start using the CoreAudio Library instead of the AVFoundation. To get the frequency you probably need to use a FFT (Fast Fourier Transformation). This is done in the example above. It even visualizes a Spectogram (Frequency over time).

Or maybe this stackoverflow posts could help you: Get Frequency for Audio Input on iPhone

Community
  • 1
  • 1
Prine
  • 12,192
  • 8
  • 40
  • 59
  • 1
    There are many many questions on SO about pitch tracking that may help. I won't list them here. Also check out the open source http://aubio.org/ library. – Bjorn Roche Dec 20 '12 at 16:36