← All articles
Dev Log· 4 min read· By the Neon Burrow Team

Dev Log: A Soundtrack With No Audio Files

Every note and sound effect in Neon Burrow is synthesised live in the browser with the Web Audio API. Here is how the procedural music system works.

Open your browser's network panel while Neon Burrow is loading and you will notice something missing: there are no audio files. No MP3s, no OGGs, no sound sprites. Every sound you hear, from the soft chime of a seed to the pulsing soundtrack in the Core Vault, is generated live by code using the browser's Web Audio API. This dev log explains why we chose that approach and how the system works.

Why procedural audio?

Three motivations drove the decision.

  • Load time. A web game should start almost instantly. Recorded music for five districts plus a menu theme would have added several megabytes to the download. Synthesised audio adds a few kilobytes of code.
  • Reactivity. Because the music is generated note by note, it can respond to what is happening in the game: tempo, intensity and pitch can change smoothly at any moment.
  • Style. Neon Burrow's visuals are built from glowing geometric shapes. Clean synthesiser tones match that aesthetic far better than recorded instruments.

The building blocks

The whole audio system rests on two primitives.

The first is a tone: a single oscillator with a waveform (sine, triangle, square or sawtooth), a frequency, a duration and a volume envelope. Tones can also slide in pitch over their lifetime, which is how we create rising and falling effects.

The second is noise: a short buffer of random samples, generated once when audio starts, then played through a filter. By changing the filter type and frequency, the same noise becomes a hi-hat, a whoosh, a splash or the crunch of a breaking wall.

Almost every sound effect in the game is a combination of a few tones and a burst of filtered noise.

Designing sound effects

Some examples of how effects are built:

  • Seeds are a short triangle-wave tone that slides upward. The starting pitch rises with your combo, so a long chain of seeds climbs musically, giving you audible feedback that your combo is growing.
  • The gold key plays a quick four-note rising arpeggio.
  • Core activation layers a sawtooth chord built on the district's root note, a sweeping filtered noise burst and a deep sine-wave drop. It is the biggest sound in the game, by design.
  • Breaking a cracked wall combines low filtered noise with a falling square-wave thud.
  • Teleporting is a sine tone sweeping up to a high pitch, followed by a second tone sweeping back down.
  • The secret room plays a bright, six-note sine melody.
  • The enemy alert is two quick square-wave beeps, short and distinctive so it cuts through the music.

Because each effect is a few lines of code, we could iterate on them extremely quickly during playtesting.

The music engine

The music is built from four layers, all generated on the fly:

  1. A drone pad. Three sawtooth oscillators, two of them slightly detuned from each other, run through a low-pass filter whose cutoff is gently swept by a slow oscillator. This creates the warm, breathing background of every district.
  2. A kick drum. A sine tone that drops quickly in pitch, played on every beat.
  3. Hi-hats. Very short bursts of high-passed noise on the off-beats.
  4. Bass and arpeggio. A triangle-wave bassline and a quiet square-wave arpeggio, both following short repeating patterns over a musical scale.

Each district has its own root note and tempo. Power Junction sits on a root of 110 Hz at 104 beats per minute. The Flooded Archives drop to 98 Hz and a calmer 96 BPM. The Thermal Foundry runs at 118 BPM, the Crystal Network at 110 and the Core Vault at a driving 124 on the lowest root of all. The menu has its own slower theme. Because the same patterns are transposed to a different root and played at a different tempo, every district has a distinct mood while sharing a musical identity.

Reacting to extraction

The most important musical moment is extraction. When you activate the Pulse Core, the music's intensity rises. The tempo increases by a quarter, the hi-hats double, an extra snare-like hit appears on the last beat of each bar and the arpeggio jumps up an octave and plays on every step. Combined with the countdown tick, which itself gets louder and gains a second note as time runs low, the change makes the soundtrack feel urgent without a single extra audio file.

Scheduling precisely

Browsers do not guarantee that game code runs at perfectly regular intervals, so we cannot simply play a note every time a frame is drawn. Instead the music uses a look-ahead scheduler. On every update, the engine checks which sixteenth notes fall within the next fifth of a second and schedules them on the audio clock, which is sample-accurate. If the game stutters, the music does not.

If the tab is hidden for a while and the scheduler falls far behind, it skips ahead rather than playing a burst of missed notes.

Respecting the player

Browsers require a user interaction before audio can start, so Neon Burrow unlocks its audio on your first click, tap or key press. Music and sound effects have independent toggles in Settings, and when you switch to another tab the game pauses and the audio context is suspended, so nothing keeps playing in the background.

What we learned

Procedural audio gave us a tiny download and a reactive soundtrack, but it demanded discipline. With no recorded audio to fall back on, every sound had to be designed from scratch, and it took many iterations to make synthesised tones feel satisfying rather than harsh. The payoff was worth it: Neon Burrow sounds like nothing else, and every note responds to what you are doing.

Ready to put this into practice?

Neon Burrow is free and runs in your browser on desktop, tablet and phone.

PLAY NEON BURROW

Keep reading