Go Down

Topic: send digital output based on sound frequency. (Read 1 time) previous topic - next topic

adamparkersmith

I have a wave shield attached to the arduino and I am trying to send digital output based on sound frequency.  I would like to be able to analyze the wave file and assign different outputs to different peaks.  In short I am trying to build my own player piano that will run with solenoid pistons.  I have the wave file of the piano playing.  The audio will come from speakers, but to get the keys to move I need to figure this out.  Does anybody know the code that would help me do this.
Thanks
Adam

adamparkersmith

I have a wave shield attached to the arduino and I am trying to send digital output based on sound frequency.  I would like to be able to analyze the wave file and assign different outputs to different peaks.  In short I am trying to build my own player piano that will run with solenoid pistons.  I have the wave file of the piano playing.  The audio will come from speakers, but to get the keys to move I need to figure this out.  I am thinking that the best way to do this is to figure out a way to analyze the wave file, compare it to the musical score and then assign outputs to the different solenoid pistons/keys.  Does anybody know the code that would help me do this.

Thanks
Adam

adamparkersmith

I have a wave shield attached to the arduino and I am trying to send digital output based on sound frequency.  I would like to be able to analyze the wave file and assign different outputs to different peaks.  In short I am trying to build my own player piano that will run with solenoid pistons.  I have the wave file of the piano playing.  The audio will come from speakers, but to get the keys to move I need to figure this out.  I am thinking that the best way to do this is to figure out a way to analyze the wave file, compare it to the musical score and then assign outputs to the different solenoid pistons/keys.  Does anybody know the code that would help me do this.


Thanks
Adam

robtillaart

Which waveshield you have ? Post a link please ..

you need an FFT filter to split the sound in individual frequencies. And depending on the amplitude of the freq. you can trigger a solenoid or so.
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

arduinoadrian

Something called Fast Fourier Transform Algorithm may help you. Complicated stuff for a beginner though. You've got to have advance level in math to properly process that. Signal peaks? that's amplitude. Frequency components maybe is what you need. The FFT will do that. I'm not sure if Arduino "speed" at high audio frequencies will allow to do the FFT in real time if that's the case. Maybe others have experience on that.
Perseverance is 90% of the solution. The remaining 10% is more perseverance.

AWOL

Topics merged.
OP, do NOT cross-post, it just wastes time.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

dhenry

Quote
Does anybody know the code that would help me do this.


Programming is simple: all you need to do is to pretend to be a computer trying to replicate activities that a human would otherwise perform to achieve the goal. So in your case, ask yourself how YOU as a human would have done here to achieve your goal.

Once you have that cleared, it is a breeze to tell the computer to do it for you.

arduinoadrian

This chip may help you make things easier and simpler to begin; but you will be limited in the amount of keys you can play (7). I suggest you start by using this chip and you will learn in the process. It does the frequency separation inside. Simply by connecting some of this chip's outputs to the Arduino analog inputs and then your software will control your pistons, etc.
https://www.sparkfun.com/products/10024
Perseverance is 90% of the solution. The remaining 10% is more perseverance.

Magician

http://coolarduino.wordpress.com/2011/09/03/arduino-musical-note-recognition-pushing-the-limits/

Though, it'd be much easier to process MIDI file, arduino will just drive pull of solenoids based on text - note information.

arduinoadrian

Perseverance is 90% of the solution. The remaining 10% is more perseverance.

adamparkersmith

this is the wave shield I have- http://www.adafruit.com/products/94

adamparkersmith

I am NYC based and would be willing to hire somebody to help me complete this project.  Any recommendations? 

Go Up