Under the Bridge

Users Blowing

No, we’re not going to talk about support woes today, and we’re not talking about anything sexual either, misinterpretable title notwithstanding; we’re pointing you at another excellent Mobile Orchard tutorial, Detecting When A User Blows Into The Mic:

The job of detecting when a user blows into the microphone is separable into two parts: (1) taking input from the microphone and (2) listening for a blowing sound.

We’ll use the new-in-3.0 AVAudioRecorder class to grab the mic input. Choosing AVAudioRecorder lets us use Objective-C without — as other options require — dropping down to C.

The noise/sound of someone blowing into the mic is made up of low-frequency sounds. We’ll use a low pass filter to reduce the high frequency sounds coming in on the mic; when the level of the filtered signal spikes we’ll know someone’s blowing into the mic….

Not that we have any actual immediate need for this … or can think of any good ones off the top of our head, really; but hey, if you want to put a cool easter egg in your iPhone app, this certainly would be a stylish way to trigger it!

0