Jon Moshier / Notes / Building an Ambient Drone Machine in the Browser draft
Note · From the Notebook

Building an Ambient Drone Machine in the Browser

How I built a generative ambient drone synth with nothing but the Web Audio API — detuned oscillators, glacial LFOs, and Eno-style tape loops.

Drone is a generative ambient sound machine that runs entirely in your browser. No samples, no audio libraries — just oscillators, filters, and delay lines wired together with the Web Audio API. It’s a companion to Acid 303, and shares the same self-contained architecture: a single page with inline TypeScript and no bundled dependencies.

The goal: something that feels alive

A static tone gets boring in seconds. What makes a drone breathe is constant, mostly-imperceptible motion:

How it’s built

The core is a bed of seven detuned oscillators (a mix of sine, triangle, and sawtooth) fanned out from ±3 to ±14 cents. Each voice has its own slow LFO nudging its detune, so the beating pattern evolves rather than looping. To keep the modulation from ever repeating, the LFOs are spread by the golden angle (137°) and their depths are themselves modulated by even slower LFOs.

The signal then runs through a tanh waveshaper for warmth, a slowly-breathing lowpass filter, a chorus for width, and the two effects that matter most:

Letting it play itself

The fun part is the generative layer. Every 45–90 seconds a Markov chain picks a new root pitch from a harmonically related set and glides there over ~12 seconds, slow enough that it never reads as a discrete jump. Each of the seven voices also has an independent probability gate that re-rolls periodically and fades in or out over several seconds. Leave it running and the texture reshapes itself with zero input.

Inspirations

ArtistTechnique borrowed
Brian Eno (Discreet Music)Tape loops of different lengths drifting out of phase
William BasinskiTape degradation — a highpass slowly closing over the session
Stars of the LidDense layering and long reverb tails
GrouperBuried, lo-fi, very high reverb-to-dry ratio

The full design doc lives in the project repo (docs/ambient-drone-spec.md).

See also: Music Tools.

← All notes Read recent essays →