Turning music into a light show

[nickinoki] Made a light show using some amplifiers and an arduino. First he created a microphone circuit based around a LM386 Audio Amplifier. After amplifying the output of the microphone a second time, he uses three bandpass filters to block all but a few desired frequencies from reaching the arduino. By only letting a few frequencies through the arduino is able to determine if the song is louder at higher or lower frequencies. Then using the three analogue inputs he created a scheme for generating the light show on an arduino. While he was unable to achieve the exact target frequencies with his bandpass filters they worked well enough to allow him to successfully generate the light show.

An Arduino is overkill for a simple project like this, of course, but it is a good way to get into audio DSP. (Comparators would have been a good choice for a simpler, all-analog approach.)

As for the filters, could you not replace the resistors with trim-pots and use a multimeter to fine-tune the cut-off frequencies, since imprecise resistance/capacitance values are typically the culprit?

LOL, i just did this 2 days ago, without knowing what i was doing. I ripped apart a controller from my phone speaker and wired them into the arduino board. Connected some wires to the controller and arduino and it worked :D

I don’t like Instructables. They exist in opposition to “Freedom of the Internet”. In addition, they are making rediculous amounts of money off the work of others (Advertizing and “Pro” membership). And this is content they receive for free. I would prefer that you NOT refer me to them. I realize that you are not likely to do as I would prefer, so please note when the referral you make is to Instructables so that I can avoid wasting valuable emotional energy following the link. I may be the only reader who feels this way, but please humor me.

cry about it. how about you make a FREE account, and it turns into a great resource for anyone who wants to use the site for its intended purpose: making things. and good for them making money, whats it to you? two words: Chrome, AdBlock.

I did a similar thing with a mic, low pass filter for the bass and opamp.
Output goes into a Picaxe 08M that filters out the beat and generates serial RGB flashy data that runs to my RGB lamp. (serout)
If the beat had not been detected for a few seconds, it would fade to random colours. Once a beat had been picked up it would swap between two random colours (sometimes black to make a strobe effect).
The colours would be changed every 8 beats or so so it should synch up with whatever song.

It’s kinda fun to optimize programs into a small space. Squeeze every byte!

@Norm
Instructables makes money, yes, but for people who have a project to share you have several options to post your project. If you want something easy that will share your project with a huge number of people, Instructables is free and easy to use. Otherwise you would need to pay for a web host or run your own server with enough bandwidth to handle linking from HaD. Advertisements aren’t a problem if you use AdBlock and if you have a (free) account you don’t see the Go Pro stuff so I really don’t see the reason behind the Instructables hate. If you really don’t like it, don’t go there.

As for the project, cool! I just finished a project where I modded some LED fans with microcontroller-driven RGB LED’s for my PC case (3 fans * 4 RGB LED’s * 3 R/G/B = 36 LEDs total with Software PWM). I used an FFT in Processing to analyze the audio playback and do the same thing except digitally to send serial commands and flash the LED’s. I have blue mapped to low (bass) frequencies, green to midrange, and red to high (treble).

@CalcProgrammer
You mentioned you used a FFT libary for audio stuff… I’m plannung to play with FFTs on Atmels for a long time – but usually find excuses why not to start.
One thing I’m always wonding is how you debug your stuff.
Even assuming your FFT libary is rock solid – designing an FIR filter or whatever is (for me) always a try and error game.
How did you do that. How do you test your whole setup – always with real data???

I built something similar into an IKEA mood lamp, although all audio processing is done on the atmega168 (using software filters, not FFT). The lamp also accepts MIDI input (and sports the requisite automatic colour-cycling modes):

(I have changed jobs since posting the video comment, and I would now be willing to assume the minuscule risk of posting details about the construction/code… one day I hope to have/take the time to do so :-( )

@Norm Lillibridge
Doesn’t your browser tell you the target of links when you hover on them? If not, I suggest you get one that does.
I always like to check where a link is taking me, lest I blindly click myself onto something horrific – such as Instrucatables.

Taking Philip’s tip a step further, there is a handy Firefox add-on called “Redirector” that allows you to redirect URLs matching a given pattern to a custom URL, based either on regexes or wildcards. By using the following include pattern:http://www.instructables.com/id/*

Why bother with a mic. pre-amp? Eliminate that stage, use a capacitor and a variable resistor for volume control and make two of ’em, feeding them at line level and stereo use. Gets rid of unwanted background noise such as someone talking in vicinity of the mic. and other ‘room noises’.

Not to say this isn’t cool, but I did this very thing when I was about 10 (close to 30 years ago…damn) and I used op amps. Even then the project cost me just a few dollars for parts. I also used incandescent bulbs for my “color organ” as the LEDs I had back then just weren’t very impressive for a light show.

when i was a teen I made one with a triac and some transistors per channel. it was great for listening to ELO on :) Its not really a waste to use an arduino chip only though, you could program beat sequencing of lights and stuff.