Developer Adrian Cruceru has turned a Raspberry Pi Pico W into the brains of a "Piano Helper" — a device designed to teach you new songs by lighting up the keys you need to hit, built as an add-on for an existing full-size electronic keyboard.
"This was a fun little project," Cruceru writes of his creation. "It's a WS2812B-based [RGB] LED strip aligned with piano keys. [You] can feed it converted MIDI files and it will light up keys to be pressed at configured intervals or original timestamps. It also has a nifty gradient effect."
The tool is inspired by keyboards with built-in lighting, designed to help teach users new songs without the need to sight-read music by lighting up the next key in the sequence when it's ready to be pressed. While built-in tutorials are limited in the number of songs supported, though, Cruceru's creation is absolutely without limit — supporting conversion of songs from MIDI files to its internal format.
"Music files are text files under [the] 'songs folder' with timing info," Cruceru explains. These come from converting MIDI files. To add new songs just grab any MIDI files [and] convert them to the text files in song folder. For playback you can slow down as you want based on options."
Cruceru's creation comes with an interesting approach to aligning the LEDs of an off-the-shelf lighting strip with the keys, and one which avoids the need to solder the components by hand" bending the flexible circuit strip and gluing it into place, allowing the distance between LEDs to be matched to the distance between keys without damaging the strip.
The software side of the project is written in MicroPython and uses the Raspberry Pi Zero W's integrated Wi-Fi radio to provide access to a web page listing the songs available — allowing a song to be chosen from any device on the network, including smartphones. The speed of the playback can be altered, too, and Cruceru has a few ideas for future improvements — including using a smartphone's microphone to detect when the correct key has been pressed for active feedback.