pyanoled
Piano LED visualizer based in Python 3.x. Inspired by the onlaj/Piano-LED-Visualizer project.
Table of Contents
Hardware Setup
Setup instructions for the hardware are covered in onlaj/Piano-LED-Visualizer. It lists out all of the parts and equipment, and references a lot of other sites with useful information on how to setup and configure the hardware. Here are some of my takeaways:
LED
For a standard 88-key piano, the distance from lowest and highest key is just 4 meters. The WS2818B LEDs have enough LED density to align with every key, so 4 meters of that will be around 172 LEDs.
- It is recommended to purchase the longer-lengthed strip and cut it down to 4 meters. Soldering two shorter strips together is more tedious. Here is a good instructional video on how to do that.
- Finding vendors selling 4 meter long aluminum casing was also troublesome. Here is a vendor that offers custom-length cases and lids.
- Get a 5V power supply that draws 10A of current.
Raspberry Pi
The instructions for setting up the Raspberry Pi are pretty straight forward, but here are some issues that I ran into:
-
- To enable wifi: do not need to set country code value in
wap_supplicant.conf
if you have Raspbery Pi Zero
- To enable wifi: do not need to set country code value in
-
Configuring Raspbian to work with WS2128
- To disable sound: if
/etc/modprobe.d/alsa-base.conf
is not found, try/usr/share/alsa/alsa.conf
- To disable sound: if
-
- Missing Jack module errors:
sudo apt-get install libjack-dev
- Python 3 packages:
libatlas-base-dev
- Missing Jack module errors:
Install
- clone project in Raspberry Pi
- switch to root and install
# in pyanoled project python3 setup.py install
- Run manually
python3 pyanoled/app.py
- Optionally, setup supervisord to run automatically on power on
TODO
- Persist PyanoLED app configuration changes
- Configure and run PyanoLED via Docker
- MIDI playback
- Synthesia support
- Additional color schemes and effects
- Additional configuration exposed in UI