Scenes
Nine scenes, one rule: every bounce plays the next note
Each scene is a small physics simulation with a goal, a counter and an ending. Pick one, give it a melody, and the collisions play the tune.
How the scenes are built
Every scene runs on fixed 60 Hz physics with several substeps per frame and a seeded random number generator. That makes them deterministic: the same scene and variation number give the same video down to the frame, on any computer. The collisions are recorded with exact timestamps, and the soundtrack is built from that list, which is why the notes land on the hits.
The scenes started as Python scripts for the Melody Bounce channel and were ported to TypeScript for this site and the open-source engine, with tests that check the port against the original, event by event.