Sound activated lighting is a fairly common Arduino application. I've made a few sound-activated lighting effects... I've made a 4-channel AC lighting effect that uses colored floodlights (usually 4 different colored pairs plugged-in, but sometimes 16 smaller white floods), a dual 24-LED "VU meter" effect, and a 7-channel effect that controls 8 strings of 7-lights built into the ceiling of my van (the van came with the lights, and I "re-wired" them). Actually, each of these is several different effects that run randomly.
Ok, so I have one of these:
http://createdigitalmusic.com/files/2013/04/launchpad_s.jpg
I'm not familiar with the Launchpad. If it's pure MIDI, it's relatively easy. MIDI commands are notes/instruments/timing that trigger a synthesizer or virtual synthesizer. You can "capture" the MIDI commands and instead of playing a particular note on a particular instrument (or a particular drum), you can trigger a light.
It's easier to "plug into" regular-old serial MIDI than USB MIDI. In either case you'll need some additional hardware.
I wanted to build several 20x20 LED light panels and have them all flash simultaneously at different tempos, at different frequencies, all triggered by the controller.
So, all 400 LEDs in the 20x20 panel will switch on & off together, acting as one light?
The Arduiino has 14 general purpose I/O pins, so you can directly control several lights, depending on the number of pins you need for other purposes (such as MIDI). If you don't need to dim, you can use serial shift registers and control many lights/channels with just 3 output lines. My 8-foot VU meter effect has 48 individually addressable LEDs all controlled from 3 output pins.
Some other things; does a frequency sensor exist?
Yes, but like I said you don't need it for MIDI because MIDI knows the notes.
For regular audio it can be done with hardware filters or software (look-up "FFT"). There is a super-handy little chip called the [u]MSGEQ7[/u] that takes an analog input and gives you 7 frequency bands.
With regular music, it's almost impossible to detect the actual "note" being played because musical instruments generate overtones and harmonics, and real music (and instruments that play chords) has more than one note at a time. But, you can still get a good effect (look-up "Spectrum Analyzer").
Like, something that could change how bright a light is depending on the sound frequencies it picks up? So, say, if I cut out all the high frequencies, the lights dim, and then get bright again as soon as I bring them all back?
Once you get the data, you can dim or do whatever you want.
There are basically 3 different methods of dimming for regular LEDs, high-power LEDs, and incandescent lamps. (Add a 4th method if you need to dim fluorescent amps.)
Similarly, does something exist to detect how loud a sound is?
Yes. The Arduino has analog inputs. The MSGEQ7 gives you 7 time-multiplexed analog signals, each proportional to the "loudness" of the related frequency band.
Again, with MIDI the loudness is included in the command (it's called velocity in MIDI for how hard you hit the key or how hard you pluck the string, etc.)
With analog audio, there is one thing you need to take care of... Audio is AC, which goes positive and negative. The Arduino can be damaged by negative voltages (and/or the Arduino could distort the negative half of your audio waveform). The most popular solution is to bias the input at 2.5 Volts. (I'll leave the details out for now).
I use an op-amp circuit called peak detector that throws-away the negative-half of the waveform and "holds" the peak level for a short period of time. It gives you a varying DC voltage proportional to the loudness. That means you only have to sample the volume at around 10 times per second instead sampling the audio waveform thousands of times per second, freeing-up the processor to do other things. The downside to a peak detector is that it throws-away the frequency information.
Any other suggestions?
You generally needs lots of variation & "randomness". Any lighting effect can get boring rather quickly. For example, my VU meter effect is only one effect mode. There is a handful of other sequencing/flashing modes. And, the VU meter randomly reverses directions (where louder is down instead of up), it inverts (where the loudness turns the LEDs off instead of on). And, the left channel can be reversed while the right channel remains normal or vice-versa, etc. There is a "dot mode" (with only one LED on at a time) in addition to the regular bar-graph mode, and a "dots mode" with some random number of LEDs on at a time.
A very simple "flicker" effect can be made by taking a moving loudness-average over 15-30 seconds and turning the light on whenever the sound is above average and off whenever it's less than average. I expand this a bit by loading a random pattern into the 24 LEDs in each channel, and then when it's louder than average the LEDs that were off toggle-on, and the LEDs that were on toggle-off.
All of my effects use the average volume to automatically and continuously calibrate to volume changes or louder/quieter music. I also switch between the 5V and 1.1V ADC reference depending on the signal level. (When I switch the reference, I have to re-calculate the moving average to compensate.)
None of my effects are based on frequency. They are just based on the loudness and some crude beat detection, but I still get plenty of interesting variations. Frequency detection can add another dimension. Another thing that can add variety is to use RGB (color-changeable) LEDs.
I actually prefer "loose" beat detection that responds more to loudness than simply flashing/blinking to the same-constant (boring) tempo through the song.
I wanted to build several 20x20 LED light panels
If you are planning on hand-wiring & hand soldering 400 LEDs, that's a ship-load of wiring!!!! It took me "forever" to wire-up 48 LEDs. (Part of the difficulty was the mechanical construction I chose.)