Using Arduino to recognize "clap clap" - making your own clapper

This seems like the better forum to ask for "clapper" project guidance.

I have a condenser microphone like this one:

http://www.adafruit.com/products/1063

How can I use it to recognize a "clap clap", just like those "The Clapper" devices in the 90's? The microphone only sees sound amplitude. I don't think I can simply look for two high peaks 400ms apart...there's probably way too much TV noise and stuff that would fit that pattern. If there's a way to narrow it down to a certain sound frequency - the frequency of hands clapping, that would work better, but I have no idea how that could be done.

If there's a way to narrow it down to a certain sound frequency - the frequency of hands clapping, that would work better,

No. A clap is an impulse and as such has a wide spectrum.

just like those "The Clapper" devices in the 90's?

Most (possibly all) of those were fake controlled by a person.

You can use an amplifier before the microphone and after that an envelope detector before feeding it into the analogue input to get an over all measure of the sound, but this is not very well correlated to the perceived loudness.

If there's a way to narrow it down to a certain sound frequency - the frequency of hands clapping, that would work better,

No. A clap is an impulse and as such has a wide spectrum.

just like those "The Clapper" devices in the 90's?

Most (possibly all) of those were fake controlled by a person.

You can use an amplifier before the microphone and after that an envelope detector before feeding it into the analogue input to get an over all measure of the sound, but this is not very well correlated to the perceived loudness. [/quote]

An envelope detector is a rectifier, either half or full wave with some sort of filtering - low pass filtering is the norm, however viewing a concentration of change in high frequency energy (even in a wideband signal) may be more effective. I do this all of the time to detect events using spectral means (spectral flux), but it also works in the time domain. This would prevent background noise - rumbles, voice, etc...from falsely triggering your device. The rectification can be accomplished by offsetting your ADC values by subtracting the (number of bits)^2 / 2, then giving absolute values to those below 0 (full wave rectification) or by completely truncating those values (half wave rectification) - you can then set thresholds/conditionals for onset and offset. Ensure to bandlimit your input signal to avoid strange values hitting the ADC.

detect events using spectral means (spectral flux),

just to clear things up we are not talking about Ghost Busters here are we?

Haha, no not Ghostbuster's - techniques from signal processing - Spectral Flux is used widely in the Music Information Retrieval community for onset detection of events like new note onsets, or re-articulations of the same note. You'd have to be able to run an FFT or similar transform on your micro in order to pull it off though. You basically look at the energy in adjacent windows, and when there is a great difference in energy (or power depending on your usage), i.e. change = flux, it usually signifies that some event has occurred.

Just google MIR & George Tzanetakis or Juan Bello.