Blinky lights and music created using a Raspberry Pi? Count us in! When Aaron Chambers shared his latest project, Py-Lights, on Reddit, we were quick to ask for more information. And here it is:
[Seizure Warning] Raspberry Pi MIDI LED demo
A demo for controlling LEDs on a Raspberry Pi Song: Bassnectar – Chasing Heaven https://github.com/aaron64/py-lights
- Werbung -
Controlling lights with MIDI commands
Tentatively titled Py-Lights, Aaron’s project allows users to assign light patterns to MIDI actions, creating a rather lovely blinky light display.
For his example, Aaron connected a MIDI keyboard to a strip of RGB LEDs via a Raspberry Pi that ran his custom Python code.
The program I made lets me bind “actions” (strobe white, flash blue, disable all colors, etc.) to any input and any input type (hold, knob, trigger, etc.). And each action type has a set of parameters that I bind to the input. For example, I have a knob that changes a strobe’s intensity, and another knob that changes its speed.
The program updates each action, pulls its resulting color, and adds them together, then sends that to the LEDs. I’m using
rtmidi
for reading the midi device andpigpio
for handling the LED output.
Aaron has updated the Py-Lights GitHub repo for the project to include a handy readme
file and a more stable build.
Website: LINK