Sound triggered audio installation

Hello!

I'm working on a sound installation where specific sound would trigger audio. I have no previous experience with arduino and would appreciate if someone knowledgeable could give some pointers. I am extremely eager to learn this!

To be more clear I'd like a specific sound to trigger audio that would be output'd to headphones.

After surfing multiple forums I'm still really lost. Apparently having arduino output audio trough headphones is a bit difficult. So I figured I could have the sound sensor input trigger a program on a computer to play audio, and simply have the headphones connected to the computer. I imagine I could code a program on Processing for that. To have the Arduino pick up on a specific sound only, I'd program it to calculate frequency. I found a freqmeasure library someone used to make Arduino detect a whistle which I planned to modify to detect the sound I'm using.

This setup is pretty much what I want, except with the light being replaced by audio output to headphones.

BUT! I have never done anything with Arduino so even if this plan is plausible I'm really lost. Big help if you could answer these:

  • Am I totally off with this plan?
  • If this could work, what parts do I need?
  • How would you do this?

Thank you so much if you decide to help me out!

First: Not really my primary area but since no one else answered yet I give it a shot.

  1. The setup in the video uses a comparator to digitalize the audio output. As far as I can tell, you want to have the analog output of the microphone (somehow processed) on an analog pin of the arduino. Depending on your mic, the exact setup varies but you'll need resistors and capacitors for that as far as I know. If I'm wrong and you only need the digital square wave form, you don't really need a library to get the frequency. Just measure the number of times some interrupt got triggered over a specific amount of time and divide it by that time to get the frequency. If you go the digital way though, there might be noise problems (solution: Schmitt trigger) and you only have very very very limited possibilities to detect and characteristics of the sound.
  2. Microphone, capacitors, resistors, wires, USB cable
  3. How would I do what? How would I do the communication? I think your plan using processing is good. I would let the Arduino send the Serial data over USB which the processing program can read and go from there. How would I do the analog reading? analogRead(x); How would I do the "somehow processed" part I talked about earlier? Well, here my knowledge ends completely but that's also dependent on your mic.

EDIT: Just noticed that if you already have a PC in your project, you might as well just use a regular microphone and connect that to your PC and make the sound detection with Processing. You can save yourself a lot of headache about the resistor/capacitor stuff. If you need the Arduino for other parts of the project, you can also use Processing to send serial data to the Arduino. If your goal is to learn beginner Arduino stuff with this project, I would recommend not starting with sound because that is quite difficult and has more to do with electricity than programming.