Skip to content

Control a light show with drums. Reactive LED strip triggered by midi notes.

License

Notifications You must be signed in to change notification settings

StephenC19/led_drumkit

Repository files navigation

led_drumkit

By Stephen Colfer

Description

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

Materials

Installation

LED setup

Using the steps listed here you can setup you Raspberry pi to control an LED strip. These steps are based off the info here

  1. Install packages on the Raspberry Pi. pip install requirements.txt, sudo pip install rpi_ws281x
  2. 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.
  3. Run the example script from the link above examples/strandtest.py
  4. 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)
  1. Cut the LED strip and mount each section to your drumkit
  2. Modify config.py to set the length of the LED strips (TODO: add a test script to handle this)
  3. Modify accentColors.json to choose the LED colours.
  4. Run the main script and enjoy your led light show! python main.py

Web app control setup

  1. Install npm
  2. Install vue js npm install vue
  3. cd UI/ and run npm update
  4. Replace the ip in src/components/var.js to the ip of the raspberry pi (TODO: Add a script to handle this)
  5. Start the server npm run serve
  6. Start the control server python controlServer.py
  7. Open the http://:8080/ and enjoy!

Pi Setup

  1. Make sure it's up to date sudo apt-get update
  2. Install required packages sudo apt-get install gcc make build-essential python-dev git scons swig
  3. Deactive the audio output sudo echo "blacklist snd_bcm2835" > /etc/modprobe.d/snd-blacklist.conf
  4. Restart sudo reboot
  5. Download the LED control library git clone https://github.com/jgarff/rpi_ws281x
  6. Compile the libraries cd rpi_ws281x/;sudo scons
  7. Setup python libraries
cd python
sudo python3 setup.py build
sudo python3 setup.py install
sudo pip3 install adafruit-circuitpython-neopixel
  1. Setup test script sudo nano examples/strandtest.py Then modifiy the constants in the class like the LED_PIN and LED_COUNT
  2. Run the code sudo python3 examples/strandtest.py

Drum Installation

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.

Server Start

Built by Stephen Colfer

About

Control a light show with drums. Reactive LED strip triggered by midi notes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published