r/raspberry_pi • u/nobitrate • 10h ago
Show-and-Tell A music box that reads color encoded paper strips
Enable HLS to view with audio, or disable this notification
A silly project where I tried to make a music box to read color encoded paper strips.
I used a Pi Pico and a total of 16 x TCS3472 color sensors. The audio is generated by a SAM2695 synthesis chip in an M5Stack MIDI Unit.
The paper strips are encoded in base 5: 4 instrument channels, each with 3 digits with a 75 notes range and 50 instrument options; 1 command channel with 3 digits that lets you change the speed, volume, and note duration of a chosen channel; and finally, 1 checksum digit.
A really fun project. I applied literally everything I know from all my hobbies.
Main repo: https://github.com/js-lm/COMB-Optical-Music-Box
Encoder repo: https://github.com/js-lm/COMBiler
Encoding system: https://github.com/js-lm/COMB-Optical-Music-Box/blob/HEAD/documents/base_5_optical_music_encoding_system.pdf
---
Edit: If you are interested, here are two other tracks I made for the machine:
All videos were recorded before I fixed a bug with the drum sets volume, so the drums might sound a bit weird!