I am currently attempting to create a sound frequency detection application on the iPhone. I have been informed that the algorithm I need for frequency detection of a single frequency is the goertzel algorithm.
However, I am currently struggling to implement this algorithm in C or Objective-C. I am unsure how to retrieve the data I need from the microphone and how to process it in realtime with this algorithm.
Any help / sample code would be greatly appreciated.
Sound wave frequencies can be measured with a frequency counter or with a spectrum analyzer. These devices work by using a microphone to convert the sound wave into an electrical signal. The peaks and valleys of wave are counted to find the frequency.
Spectrum analyser gives insight into your sounds and deconstructs the audio spectrum, showing the levels of the various frequencies in your audio signal. The built-in sound meter provides high-quality measurement results when measuring ambient noise levels in a multitude of real-life scenarios.
The Sound Detector is a small board that combines a microphone and some processing circuitry. It provides not only an audio output, but also a binary indication of the presence of sound, and an analog representation of it's amplitude.
Measure the main frequency of analog captured signal connected to an Arduino and check for noise and mute. Detects frequency from 38 Hz to 9612 Hz and works even on an ATTiny85 with 1 MHz up to 4806 Hz. Signal can be delivered e.g. by a microphone.
Sample projects:
- http://developer.apple.com/library/ios/#samplecode/aurioTouch/ (Real-time processing)
- http://developer.apple.com/library/ios/#samplecode/SpeakHere/
The projects above contain everything you need :)
https://github.com/irtemed88/PitchDetector Try the Code Repository it does what you need
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With