Playing your first Song
You can play a single song with the following command from your install directory (replacing the path with that of another music file you’ve uploaded to your Raspberry Pi if desired):
sudo python py/synchronized_lights.py --file=/home/pi/lightshowpi/music/sample/ovenrake_deck-the-halls.mp3
Before the song is played all the lights are turned on for 30 seconds, then off for 1 second before playback begins. You can modify this behavior by overriding the preshow_configuration setting.
Playing back music from a playlist
You can create a playlist of songs to play. The playlist is simply a file with one song per line in the following format (replacing <tab> with the actual <tab> character):
My Cool Song<tab>/home/pi/lightshowpi/music/cool_song.mp3 An Amazing Tune<tab>/home/pi/lightshowpi/music/amazing_tune.mp3
A sample playlist and sample songs are provided in the lightshowpi/music/sample directory.
You can play one song at a time from your playlist by running the following command (replacing /home/pi/lightshowpi/music/sample/.playlist with the path to your playlist):
sudo python py/synchronized_lights.py --playlist=/home/pi/lightshowpi/music/sample/.playlist
Each time the above command is run, a single file from your playlist will be played. To play one song after another from your playlist you’ll want to override the playlist_path configuration setting to point to your playlist, and then run the following script to continuously play songs from your playlist:
To stop the continuous playback, you can issue to following command: