Finishing a track isn’t the end of the job — most places to share music, YouTube included, want a video, not a bare audio file. music-video-gen is a small library of “generators”: self-contained pages with reactive visuals that get screen-recorded alongside a track to produce that video, one scene assembled per song as needed.

Five generators so far. party-stage is the most developed: a full virtual venue with a DJ, a dancing crowd, lasers, light bars, and a projection screen that runs one of several audio-reactive shader visualizers — Synthwave Run, Drugged Out Flow, Nebula, Floating Shapes — picked at runtime. party-cathedral swaps the modern club for a torch-lit medieval hall, with illustrated performers instead of a laser show. tv-player takes the opposite mood entirely, a quiet in-room scene built around an old TV and VCR, with small environmental touches like dust, flies, and a spider added recently for texture. magic-mirror rounds out the mid-sized scenes, and sparkles, the original and simplest of the set, is still there too.

The part actually worth writing about is how it got built: essentially the whole thing was written by an AI (Gemini) rather than by hand. Instead of one big scene file the AI would have to reason about — and risk breaking — on every change, each stage element (dancers, DJ, lasers, torches, camera, curtain) is its own small class behind a two-method interface, registered with a single manager. Visualizers work the same way, behind their own shader interface. That structure was chosen specifically so an AI could keep extending the project safely, one self-contained file at a time, without needing to hold the whole scene graph in its head.

Getting the music-reactive parts to actually feel right was the fiddliest bit. Beat detection went through several rewrites before settling on combining multiple detection approaches at once, plus a dedicated “blackout” effect to sell song drops. The newest work adds a visualizer picker and two new shader visualizers, and swaps pre-rendered video textures for a plain image slideshow.
These scenes have ended up in real music videos on my channel: party-cathedral’s torch-lit hall backs Flofleep, party-stage’s laser-lit DJ booth scores Ropot Gili, and tv-player’s dusty VCR room sets the mood for Mystery Tape. Full source for every generator, including the scene and shader code, is in the music-video-gen repository.
