How to detect sound frequency / pitch on an iPhone? [closed]
Asked Answered
L

6

8

I'm trying to find a way to detect sound frequency being recorded by iPhone's Microphone. I'd like to detect whether the sound frequency is going up or down.

Lapierre answered 8/11, 2009 at 14:54 Comment(0)
T
5

you can try to use SCListener. It's a small open-source class and very easy to use

EDIT: The formatter does not like the _ in the name. Here is the link. http://github.com/stephencelis/sc_listener

Tavish answered 8/11, 2009 at 15:22 Comment(1)
Seems SC_Listener is deprecated, for iOS 3.0+, you can try to use this tutorial, which works pretty well: mobileorchard.com/…Decision
E
2

To detect frequency you should check out the fast Fourier transform (FFT) algorithm.

Estrogen answered 8/11, 2009 at 15:29 Comment(0)
H
2

Note that the SC_listener does not work on iPhones running iOS 3.0 or above, check in AVAudioRecorder and FFT. It somehow works in the simulator though....

Hueyhuff answered 1/12, 2011 at 12:20 Comment(0)
P
0

For simple pitch detection, I think the FFT is good enough. Try look into Aurio Touch 2 and vDSP reference in accelerate framework.

Phaedra answered 28/6, 2012 at 7:13 Comment(0)
W
0

I wrote some code with explanation for tracking pitch in C. It uses the FFT, which is not the optimal method, but you can see if this is good enough for your application. Ideally, you'd replace the FFT with something hardware accelerated.

http://blog.bjornroche.com/2012/07/frequency-detection-using-fft-aka-pitch.html

https://github.com/bejayoharen/guitartuner

Whitehall answered 23/7, 2012 at 20:31 Comment(0)
D
0

Beethoven looks like a good option: https://github.com/vadymmarkov/Beethoven

Dewey answered 21/6, 2017 at 15:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.