is there a direction someone can push me on how to build a circuit that would react to a certain sound like a clap?

was thinking of using something like this with a filter: http://www.sparkfun.com/products/9964

I have means of recording and analyzing a sound so I can find what frequency the sound is around at least. I was thinking of building a hardware or digital band-pass filter (not even sure how I would do that honestly, hah) that would only trigger a signal to arduino if that frequency was met.

I've seen suggestions in using a UM3763: http://www.chinaicmart.com/series-UM3/UM3763.html

This is only my guess at how to do this. maybe there is a better way? any ideas?

The main problem is that a sound like a clap is a complex waveform and is not just one frequency. That makes it difficult to recognise.For getting at the frequency content of a waveform look to use a FFT. However that gives you in effect a list of all the frequencies and their relitave strengths. Recognising a specific sound is a lot more complex because its FFT will change over time.While you can implement a band pass filter digitally it will not be a very high order filter due to the lack of processing power of the arduino.

That might help you, but he's right, claps are difficult to differentiate from other complex high frequency waveforms. If all the others are low pure tones and less brief than it will be easy! Read the datasheet within my link above.

Implementing an envelope detector might help with capturing claps - the envelop is pretty distinctive. Basically rapid attack and no noticeable duration before decay. The only frequency-dependent part is choosing a time-constant for the decay - wants to be short but long enough to not count a single clap as several events.

Operating under the "Assumption" that microphone placement relative to the event is constant... a VERY big "Assumption" then just measure the rise time of the envelope. A properly configured comparator will return a measurable rectangular pulse and the pulse duration (short) could indicate a hand clap, unfortunately so would a book dropped on a hard surface or any other loud impact noise.

Doc

--> WA7EMS "The solution of every problem is another problem." -Johann Wolfgang von GoetheI do answer technical questions PM'd to me with whatever is in my clipboard

The main problem is that a sound like a clap is a complex waveform and is not just one frequency. That makes it difficult to recognise.For getting at the frequency content of a waveform look to use a FFT. However that gives you in effect a list of all the frequencies and their relitave strengths. Recognising a specific sound is a lot more complex because its FFT will change over time.While you can implement a band pass filter digitally it will not be a very high order filter due to the lack of processing power of the arduino.

I understand they are complex frequency but everything has a fundamental or a dominant freq, so you can basically search for a specific freq something likes to resonate at. I have done this purely digitally, no problem. It's doing it with an arduino that I am stuck on.

That might help you, but he's right, claps are difficult to differentiate from other complex high frequency waveforms. If all the others are low pure tones and less brief than it will be easy! Read the datasheet within my link above.

Implementing an envelope detector might help with capturing claps - the envelop is pretty distinctive. Basically rapid attack and no noticeable duration before decay. The only frequency-dependent part is choosing a time-constant for the decay - wants to be short but long enough to not count a single clap as several events.

that is genius! never thought about adding envelope detector. any suggestions on where I should go to learn about this? assuming this would be done software side. I might even be able to do redundant tests, envelope, freq, pitch etc.

but everything has a fundamental or a dominant freq, so you can basically search for a specific freq something likes to resonate at.

No that is not correct, especially with impulse sounds like a clap. If you take the FFT you will see the distribution of frequencies changes rapidly with time, so their is no one signature spectrum for the sound.An envelop detector is an example of parameter extraction, which is more likely to succeed than a full frequency analysis. Another popular parameter is zero crossing timing.

Once you have these parameters extracted at many points at during the sound, you can then compare them to a template or standard sound. As you are comparing many values with many values the answer is not a simple yes or no, it is more like a probability. You then set a threshold on a probability that you want to use in order to differentiate a clap from some other percussive sound you might pick up. One way of comparing templates is to use an cross-correlation:-http://en.wikipedia.org/wiki/Cross-correlation