Turn your drumkit into a light show! By mounting an led strip to your drums you can use this code to control the strip through MIDI. With the correct setup the LEDs will react to the midi drum pads. This repo also includes the code for an optional web app to control the LED colours. Follow the steps here in the README for materials and setup. For more info on the project check out the video: https://youtu.be/ctKZRcTf2wk
- Raspberry Pi
- WS2812 RGB LED Strip (or similar strip with individually addresable LEDs)
- Power supply suitedable for the LED strip. 10A per 300 5v leds in this case.
- Drum kit capable of MIDI note output (electric drumkit or acoustic with triggers)
- (Optional) Aluminium LED channel for mounting to stands.
- (Optional) Useful power connectors
- (Optional) No solder strip connectors
Using the steps listed here you can setup you Raspberry pi to control an LED strip. These steps are based off the info here
- Install packages on the Raspberry Pi.
pip install requirements.txt
,sudo pip install rpi_ws281x
- Connect the Power supply to the strip and link to the Pi
- Connect the data line (green) to pin 18 in case
- Connect the ground (black) to pin 6 or any available ground pin.
- Connect the other parts of the led to the power supply.
- Run the example script from the link above
examples/strandtest.py
- Connect the midi unit to the Pi (through USB). You can test the connection by running the following in python
import mido
mido.get_input_names() # Get connected midi device names
with mido.open_input('<midi_device_name>') as inport:
for message in inport:
print(message)
- Cut the LED strip and mount each section to your drumkit
- Modify
config.py
to set the length of the LED strips (TODO: add a test script to handle this) - Modify
accentColors.json
to choose the LED colours. - Run the main script and enjoy your led light show!
python main.py
- Install npm
- Install vue js
npm install vue
cd UI/
and runnpm update
- Replace the ip in
src/components/var.js
to the ip of the raspberry pi (TODO: Add a script to handle this) - Start the server
npm run serve
- Start the control server
python controlServer.py
- Open the http://:8080/ and enjoy!
- Make sure it's up to date
sudo apt-get update
- Install required packages
sudo apt-get install gcc make build-essential python-dev git scons swig
- Deactive the audio output sudo echo "blacklist snd_bcm2835" > /etc/modprobe.d/snd-blacklist.conf
- Restart
sudo reboot
- Download the LED control library
git clone https://github.com/jgarff/rpi_ws281x
- Compile the libraries
cd rpi_ws281x/;sudo scons
- Setup python libraries
cd python
sudo python3 setup.py build
sudo python3 setup.py install
sudo pip3 install adafruit-circuitpython-neopixel
- Setup test script
sudo nano examples/strandtest.py
Then modifiy the constants in the class like the LED_PIN and LED_COUNT - Run the code
sudo python3 examples/strandtest.py
This will vary depending on the drumkit. Most led strips come with small clips that can be stuck or screwed into the drum. This can be avoided by using some for of tape or even covering part of the drum wall with tape and then using a glue gun to gule the strip to the part of the drum with tape. This makes it easy to take the strip off the drums if needed with no damage.
The strip will also need to be cut and either clipped together using something like this TODO or soldering together for better secure line connections.
Built by Stephen Colfer