Detect and trigger on the sound of a human voice
Chuck Rice
Posts: 210
Does anyone know of code that could be used to take a line-out (or headphone out) signal of a singer singing a song, and trigger a pin high for the duration of the sound? So the pin would be high when the singer sang a word, but low during frequencies other than human vocals. I thought that the microphone_to_vga would be a start, but it looks like it would trigger on amplitude, not frequency.
Edit 1: I added a couple of pictures.
Edit 2: Here is a link to a movie of the skeleton: www.wildrice.com/Halloween/Construction/Skelly/Skelly.m4v
Post Edited (Chuck Rice) : 11/1/2008 2:15:06 AM GMT
I think that it is too late for this year, my singing skeleton has to perform at the party tomorrow night. I have a solution that works (black box I had in the Halloween Junk Drawer), but it is very fiddly. Is what I am looking for called a Notch Filter? -Chuck-Wikipedia said...
The voiced speech of a typical adult male will have a fundamental frequency of from 85 to 155 Hz, and that of a typical adult female from 165 to 255 Hz
Edit 1: I added a couple of pictures.
Edit 2: Here is a link to a movie of the skeleton: www.wildrice.com/Halloween/Construction/Skelly/Skelly.m4v
Post Edited (Chuck Rice) : 11/1/2008 2:15:06 AM GMT
Comments
The quickest way to achieve what you want is to generate a control track, where you use a sound program on your computer to manually generate a time file of when the human voice is present. You sync the playback with the control track to make it appear as though your skeleton is singing the song.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Post Edited (Paul Baker (Parallax)) : 10/24/2008 10:05:54 PM GMT
I would be willing to live with a few false triggers. People sometimes move their mouth when they are not singing, or singing DA-DA-DA to the music. By moving the frequency code to the Propeller, I would also be able to have another cog trigger on a guitar frequencies and cause the skelly's hand to strum his guitar in sync.
Something along that principle should work. Getting arms to move in response to bass beats and suchlike is probably easier than trying to track vocal presence but accuracy probably isn't as necessary as overall effect.
Once you've got some raw data which represents the music to work with it's really just a matter of coming up with some algorithms to detect beats, determine bpm, crescendos, silences and so on. Once you have that it's then a case of combing that to create some output. It is also possible to make some good guesses as to type of music being played and modify what the output is as appropriate; wild gestures for rock 'n' roll, smoother ones for slow ballads.
I wouldn't worry about getting everything perfect; most people seem to be more impressed by what does work well and will overlook what doesn't.
Once you figure out which frequency best matches your singing, you can use the fft object to react to the singer. I would use a multi-state trigger. For example, only trigger when you pass a threshold at frequency X, then Y, then Z. Good luck!
Hanno
Use two microphones located on the same stand relatively in the same vertical plane. One microphone will pick up ambient sound "music" plus some of the singer while the other will pick up ambient sound plus most of the singer. subtract the two via a differential amplifier or wire the two mic's in series so that they are out of phase with one another.
If this is a Stereo recording and you are trying to pick off the vocals, then this may already be mostly done for you...... With most recordings the voice track is always in MONO equally distributed on both the Left and Right channels.... you can prove this by creating a 3rd channel or "center channel" take the POSITIVE terminal from each output Left and Right and wire that to a single speaker. Doing so will only allow stereo signals to be heard from the center speaker and most VOICE will be silent.
Ok, so the center channel is sort of opposite of what you want.... use the center channel to dynamically attenuate the original signal... in other words have two Op-Amps for each channel Left and Right setup as a 1:1 gain amplifier. Use the center channel technique by using a third Op-Amp in a differential mode which drives or quenches the gain to the Left and Right Op-Amps.... The output should be mostly voice.
Edit: Attached schematic block diagram
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 10/26/2008 1:50:42 PM GMT
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with a Propeller Protoboard?
Check out: Introduction to the Proboard & Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS
Here's the link - the pics might give you some ideas on mechanics.
Jim-
http://cannibalrobotics.com/Photo_ralph.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Signature space for rent, only $1.
Send cash and signature to CannibalRobotics.
OBC, I would, but Time is short during the Halloween season. It takes me a couple of weeks to set everything up. My Propeller code is nothing much so far. I do not think it would qualify at this point.
Beau, Thanks. That looks like an awesome thing to try. I can't wait to try give it a test! Too many projects. So little time.
CannibalRobotics, I also did one years ago, I think about 1999, and used what looks like that same skeleton. Take a look at: www.wildrice.com/Halloween/Construction/Skeleton/. Your hardware looks much more sophisticated than mine. That skeleton was very light weight, which is good, but I found it rather breakable. I also kept stripping the gears in the arm due to the stop and start mass of the arm. . It did not last from season. The arms and legs kept breaking off. [noparse]:)[/noparse] [noparse][[/noparse]url]