Synthwave Surfer
A single HTML file that composes and plays electronic music in the browser. You give it a seed and a genre engine; it deterministically writes a complete arrangement — bass, lead, pads, drums, builds and drops — and plays it back through Tone.js. Same seed plus same genre always produces the same track, so a whole composition collapses to two numbers you can share.
Why this one
Determinism is the point. Because seed + genre fully determines the output, a track is reproducible, shareable, and diff-able — no two seeds sound alike, and the same seed never drifts. That's the generative thread from a different angle: structure you can watch appear out of a rule, here a musical arrangement out of a single number. The melody engine states a motif and develops it — transpose, invert, ornament — rather than random-walking, so the result has shape rather than noise. It began as a way to generate Carpenter-style soundtracks for the Kuro screensaver and is becoming the audio layer of that universe — on its way to a standalone Obsidian plugin.
Under the hood
Eight genre engines — Outrun, Noir, Dreamwave, Carpenter, Techno, Prog House, Trance, Acid House — each pairing its own composition algorithm with its own voicing. Under them sit six shared synth voices (a DX7-style FM bell, an MS-20 bass, a TB-303 with per-step slide and accent, two Juno-106 detuned-saw voices, a supersaw anthem lead), four drum kits with live per-voice knobs, and a 32-bar EDM arrangement engine with two drops and a breakdown. It exports MIDI, WAV, JSON, and .swmd — a small Markdown music format that opens back in Obsidian. Zero build, one dependency (Tone.js from a CDN); the whole thing is one ~3.9k-line HTML file.
Repository
git.jkaindl.de/jkaindl/synthwave-surfer — code, the genre table, and the technical detail.
See also: zettelkasten · Kuro Screensaver