There are already several way to use push buttons in your projects (e.g. hacking mouse and keyboard, or Arduino, gainer, MCK). This probides alternative way to use push buttons with audio input and output.
We also present an application of this instructable from a work Monalisa "shadow of the sound".
All you need is just a push button, some soldering, and some software.
Note: This is a series of "How to coonect with Audio". Please see others: Fader, and Sensor.
Step 1: The Parts
1 Push button
In this time, we choose a button with push on / off locking switch. However you could choose a push button with no lock, toggle switch, or foot switch instead.
2 3.5mm Mono Plug
One for audio input and another for audio output.
1 Twin Cable
You could use loudspeaker cable for this purpose. The length depends on how long you want.
Step 2: The Tools
Step 3: Cutting the Middle of the Cable
Step 4: Stripping the Ends of the Cable
Step 5: Soldering the Push Button
Step 6: Soldering the Plugs
Step 7: Quality Control
Step 8: Connect to the Audio Input and Output
Step 9: Some Software
In this time, we use MaxMSP and Pure Data.
Assign an audio signal (e.g. 10000Hz sine wave) for audio output.
Set volume calculator for audio input. In this time, we use a meter~ object on MaxMSP, and a threshold~ object on Pure Data.
Add a receiver for the calculator / threshold. In this time we use a 'toggle' object on MaxMSP, and a 'print' object on Pure Data.
Here are basic examples of MaxMSP and Pure Data patches.
Pure Data: pushbutton-001.pd
Step 10: Moment of the Connection
If it does not work, you just need to adjust the volume for audio output.
Step 11: Uses? Photo Release
Here is the setup. You will need to setup yourself (and your friends) for photo. In your software, you add a webcam control function. In this time, we made a patch with MaxMSP on Mac OSX. We use an apple script to control webcam and a shell object to run the script.
You could download shell object from here!
Now, you can finely take your photo from a distance!
Here are the apple script and the MaxMSP patch (photorelease.zip). You just need to put both files in a same folder and run the patch.
Apple Script: takephoto.scpt
Step 12: Application: Monalisa "shadow of the Sound"
In this work, we detect the conduction of a push button as on/off of audio signal.
Step 13: Possible Improvements and Modifications
You can use two push buttons with 3.5mm stereo plugs and triple cable.
If you need more push buttons, you can extend with external audio interfaces. In this time, you need to use proper plugs for the port of the audio interface.