This Arduino project allows for controlling a LED strip from a DAW program (via MIDI) over a Teensy microcontroller.
- LED Strip
- The LPD8806 and WS2812B strips are implemented in separate Arduino projects.
- USB Development Board
- A 32-bit PJRC Teensy is highly recommended. A Teensy-LC was used while developing this project and is officially supported alongside other Teensy 3 models.
- Teensy 2 (8-bit) and certain Arduino boards might work, but have not been tested and are not officially supported.
- Arduino Software
- Developed with version 1.8.5, but older versions will likely work.
- Also requires Teensyduino, and the LPD8806 Arduino library if you're using the LPD8806.
- OS
- Windows, Linux and macOS are officially supported.
- DAW Software
- Ableton Live is recommended due to its flexibility in creating MIDI Effects.
Connect your board with the LED strip using the schematic. You can attach the strip to any object, I used a short wooden cylinder which I wrapped the strip around and it works well.
If you haven't already, install Teensyduino for Arduino, and the LPD8806 libraries if applicable (the correct path for the LPD8806.cpp
and LPD8806.h
files from the adafruit repository is Documents/Arduino/libraries/LPD8806/
) Modify the Arduino script according to your LED strip configuration (_nLED
= Number of LEDs < 128, _dLED
= Data pin, _cLED
= Clock pin LPD8806 only). Under Tools, make sure USB Type: "MIDI"
, Optimize Code: Fastest
and your board are selected, then compile and upload to your board. You can also change your MIDI device name by editing name.c
.
The retinaConverter.py
Python 3 script will take a Retina palette file as input, and output equivalent _r
, _g
and _b
arrays to replace in the script. Before running the script, you should uncomment one of these lines depending on your LED strip. Then, run it with:
$ python3 retinaConverter.py < paletteFile > array.txt
Sending standard MIDI note-offs and note-ons on any channel will trigger the LED with the matching color (from the palette arrays). Sending a SysEx message in the format F0 PP RR GG BB F7
(where PP
is the LED index, RR
is the red component of the color, GG
is the green component of the color, and BB
is the blue component of the color) will directly set the LED to a desired color.