My 11yo son is learning the piano, and I rigged him a midi->raspberry pi->RGB LED strip so keys he plays light up then fade (it's a 144/m strip so nearly 2 leds per key).
Now i'd like him to program he visualizer himself. Tweak the colors, maybe do some analysis like recognize chords, try record/replay, maybe even ignore the music and make some game using the piano as input device?
He knows Scratch/Snap!, and wants to learn python (which my current script happens to already use), but the audio/visual nature here just screams "missed FoC/live coding opportunity" 😆
What would you recommend?
[constraint: myself I know zero about music 🙉]
I'm tempted to "unroll time". If he codes, he'll need access to a 2D screen anyway where he can code animations in in Snap! or whatever - and the LEDs will simply render one 1D line scanned out of the 2D image.
Nice qualities:
- A desired animation of LEDs over time can be statically drawn, even as a sprite.
- a "lighted while pressed" visualization will by default build up a time/frequency chart of the melody.
- Conversely, if he builds some kind of Synthesia "falling notes" game,, the leds will light up according to what he "should play".
But I'm probably missing out on more intersting music-centric things to code.
Should i use something like SonicPi?
I guess I should check if that yamaha's MIDI is bi-dorectional ant can be made to play notes programmatically, not just report them...
And if you use TidalCycles, its creator/maintainer is active here on this Slack.