I'm looking into developing an iPhone app that will potentially involve a "simple" analysis of audio it is receiving from the standard phone mic. Specifically, I am interested in the highs and lows the mic pics up, and really everything in between is irrelevant to me.
Is there an app that does this already (just so I can see what its capable of)? And where should I look to get started on such code?
Thanks for your help.
"Audio Frequency Analyzer" is a powerful real-time audio analyzer (RTA) app for iPhone. This app can measure the frequency response in 30 split band scale of 1/3 octave in real time. Also it can be displayed the FFT analysis result.
Spectrum Analyzer for iOS is a powerful real-time audio analysis app. Designed with musicians and recording engineers in mind, it can also be used by anyone interested in the world of sound. Ideal for room tuning or speaker tuning, the app enables portable, precision audio measurement and visualization.
Spectroid is a real-time audio spectrum analyzer with reasonable frequency resolution across the the entire frequency spectrum.
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.
Look in the Audio Queue framework. This is what I use to get a high water mark:
AudioQueueRef audioQueue; // Imagine this is correctly set up
UInt32 dataSize = sizeof(AudioQueueLevelMeterState) * recordFormat.mChannelsPerFrame;
AudioQueueLevelMeterState *levels = (AudioQueueLevelMeterState*)malloc(dataSize);
float channelAvg = 0;
OSStatus rc = AudioQueueGetProperty(audioQueue, kAudioQueueProperty_CurrentLevelMeter, levels, &dataSize);
if (rc) {
NSLog(@"AudioQueueGetProperty(CurrentLevelMeter) returned %@", rc);
} else {
for (int i = 0; i < recordFormat.mChannelsPerFrame; i++) {
channelAvg += levels[i].mPeakPower;
}
}
free(levels);
// This works because one channel always has an mAveragePower of 0.
return channelAvg;
You can get peak power in either dB Free Scale (with kAudioQueueProperty_CurrentLevelMeterDB) or simply as a float in the interval [0.0, 1.0] (with kAudioQueueProperty_CurrentLevelMeter).
Don't forget to activate level metering for AudioQueue first:
UInt32 d = 1;
OSStatus status = AudioQueueSetProperty(mQueue, kAudioQueueProperty_EnableLevelMetering, &d, sizeof(UInt32));
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