A friend of mine set up his Raspberry Pi to drive a mechanical relay based on MIDI input. He plans to use it with an FM transmitter to broadcast holiday music with synchronized light effects. They key piece of software is LightShowPi which converts audio frequencies to GPIO signals on the RPi.  These pins in turn drive the relay channels and ultimately the power to individual lights.