nightdrift
Generative lofi radio for sleep. Procedural Web Audio with no samples, no backend, and seamless scene transitions.
The idea
I wanted something that would just play in the background at night without needing anything from me. No playlists, no skipping, no ads. So I built it. nightdrift generates its own music entirely in the browser from scratch, no audio files, no outside libraries. It picks a key, a chord progression, a tempo, builds out a little band texture, and plays through a set of bars before fading into the next generated scene. Every note comes from oscillators and noise.
How it actually works
It's a Next.js client app running a procedural Web Audio engine. There's a hidden audio element wired up as a sink so your lock screen controls work, play, pause, that kind of thing. The Media Session API handles the handoff.
You can nudge the mood, adjust the vinyl crackle, set a sleep timer, and pretty much leave it alone from there.
Why I built it this way
I specifically didn't want to pull in Tone.js or any synthesis library. I wanted to understand exactly what was happening at every layer, and raw Web Audio gives you that. No server, no database, nothing to maintain. Just a static deploy that keeps working.
Status
Live and still tinkering with it at nightdrift-vert.vercel.app.