Sound Lab
Sound made from physics, shaped live and sent to games
The problem
Games and apps need a lot of sound effects, and sample libraries only give you the takes someone else recorded. Changing a door from wood to steel, or moving the listener further away, means finding a different file.
The aim was to model the thing itself, so every sound can be reshaped by changing what it is made of and where you hear it, and every one sounds like it belongs in the same place.
What I built
- Every control is a real quantity with a unit: rainfall in mm/h, door thickness in mm, hinge pin friction, string tension. There are no vague 'punch' knobs.
- Each model renders its own layers dry, then one shared mixer adds air absorption, the ground reflection and the space: outdoor echoes or a solved room.
- Renders are deterministic for a seed and vary a little between seeds, which gives a game several variations of the same event.
- The engine is plain JavaScript with no DOM and no audio libraries, so the same code runs in the page, in workers, in AudioWorklets and from the command line.
- The piano is an instrument that plays live from the computer keys or MIDI; the other models render offline in a fraction of a second.
What it does
- Seven models and 72 presets: firearm, explosion, impact, door, engine, weather and piano.
- A 3D scene showing the source and the listener; drag the listener to move it and hear the difference.
- A layered waveform (for rain: rain, wind and space) with play, loop and slow-down playback down to 1/100 speed.
- Read-outs computed from the physics, such as drops landing per second, a door's lowest mode or a string's speaking length.
- Save a sound as your own preset, or export it straight into a game's sound folder.
Built with Vanilla JavaScript (ES modules), Web Audio + AudioWorklets, Web Workers, WebGL 3D scene, Node.js (offline renders), 2026.