Skip to content

soundtrack

Soundtrack

Silent product to AAA-feeling product is the highest-leverage uplift in the whole build. This page is the cheat sheet: how the audio graph is wired, what each bus does, why every arena sounds different even though every chunk of sound is synthesised at runtime.

THE GRAPH

A single AudioContext rooted in a brick-wall limiter at -1 dBFS. Above the limiter sits a master gain node (your slider) and a one-shot lowpass filter (the collision LPF fires through it). Below master, seven buses fan out: music, sfx, engine, surface, ambient, gui, and an aux reverb send. Every sound source connects to a bus; the bus mixes into master.

THE SEVEN BUSES

MUSIC

Procedural drone + pulse + accent stems. Mix shifts with vehicle state — idle vs driving vs photo-mode pause. Each arena has its own tempo + key character.

SFX

Transient events. Ignite sting, photo capture click, gear shift thunk, LOD-swap shimmer, button taps. Side-chains into Music: every hit ducks the music ~60% over 170 ms attack so the cue cuts through.

ENGINE

Either sampled (when public/audio/engine/*.ogg files are present) or synthesised — a four-oscillator FM model with RPM-mapped pitch + a noise component for grit. Side-chains into Ambient at speed so the cabin doesn't compete with engine roar.

SURFACE

Tyre-roll loop (speed-modulated) plus a slip-driven skid screech. The thud + skid timbres tint per arena (lib/audio/vehicle-surface.ts profiles) — LUDLOW bright stone-and-tarmac, LA NIGHT AERIAL mid-grit asphalt.

AMBIENT

Per-arena 30-second loop crossfaded on arena change. Trim multiplier per arena so quieter captures sit below unity and busier ones (freeway hum, signage glow) sit above.

GUI

UI stings — hover ticks, click downsweeps, settings drawer slide, master-mute previews. Always dry; never sent through the reverb.

REVERB SEND

Aux convolution. Per-arena IR (procedural noise envelope; LUDLOW open ~2.20s, LA NIGHT AERIAL canyon ~1.50s). Engine + surface + sfx tap a small percentage; ambient + music + gui bypass entirely.

THE SYNTH FALLBACK

Every audible source has a synth implementation. When CC0 / licensed samples land in public/audio/ the sample-loader picks them up + crossfades the synth path out; until then everything you hear is generated at runtime from oscillators, noise, biquad filters and a procedural convolution IR. The pipeline is the same either way — only the buffer source differs.

TUNE IT

Settings → Audio (or open Settings drawer with , during pause). Five sliders map to the seven buses (SFX + GUI share one). Each has a test-tone preview button. M toggles master mute while driving — restores the same volume on un-mute.