I’ve been really interested in music visualization lately.Â Specifically, I’ve been trying to build a robot that dances to music.Â Wouldn’t it be wicked cool to have a cute little robot on your desk dancing to Fatboy Slim?

Winamp provides a nice API for writing music visualization plug-ins.Â I wrote a plug-in that sends signals to the parallel port that correspond to the waveform data in the song being played.Â By setting the pins of the parallel port on and off, I can control the robot and attempt to make him respond appropriately to changes in the music.

Aww… isn’t he adorable?
The wires coming out of the back of his neck are a little creepy though.

My first dancing robot prototype was a metal and rubber incarnation of the Kinetix dancing baby.Â I took the baby’s rubber arms off, inserted circular plastic joints, and soldered them onto some 99-cent DC motors from Radio Shack.Â The motors were hooked up to a protoboard on which I built a circuit that turned them on and off in response to the signals from the parallel port.

Unfortunately, the baby’s thick arms were a little too heavy for the wimpy motors I was using.Â Instead of a dancing baby, all I got was a baby that twitched uncontrollably to the music, as if Winamp were givingÂ him an epileptic seizure.I decided to try a smaller dancing figure instead, so I outfitted this Buzz Lightyear action figure with the same motors.Â He dances in rhythm very well for songs with strong drumbeats, but not as well for quiet songs.

Right about now, the funk soul brother…

If you want to try building your own dancing robot, I can send you my plug-in.Â Here’s a diagram of the circuit I used.Â This diagram is for just one motor, but the parallel port has eight data pins, so you can replicate this circuit three more times to control four motors.The motor can be turned forward by setting pin 1 on and pin 2 off, or in reverse by setting 1 off and 2 on.Â Turning both pins off turns off the motor, while turning both pins on blows out your transistors (I did this a lot).

I’m going to try to build a better version of the robot that uses servo motors to move the robot’s limbs in a more controlled fashion, but I’m a little concerned that this will make the cost of the robot too high (right now, the entire thing can be built with 5 dollars worth of electronic components).

I also want to tweak the plug-in a bit to perform some more sophisticated beat detection.Â Right now Buzz dances quite well to Prodigy, but very poorly to Beethoven.Â Ideally, he would dance well to many different types of music.