Spatial Audio · Web Audio · Three.js Playable

Echo
Space

A dark 3D hall of floating objects, each with its own voice synthesised live in your browser. Sounds are placed in space with HRTF panning, so you find your way by ear. Six objects are easy to spot. A seventh stays hidden until you walk far enough into the dark.

🎧 Headphones recommended 🌐 Plays in the browser 🎛️ Zero audio samples 🧠 HRTF localisation 📱 Touch controls
RoleSolo: concept, design and development
StackVanilla JavaScript, Three.js r128 and the Web Audio API, no build tools
01 · Enter
Play it here

There is nothing to show you first. Just listen.

The game opens full window from this page, and the menu has a link that brings you back here. Nothing downloads or installs. It starts in a dark, quiet hall, and everything you learn about it comes through your ears.

HeadphonesThe spatial cues rely on HRTF, which only works properly over headphones. Speakers will flatten most of it.
DesktopWASD or arrows to move, mouse to look, click to interact, Esc for the menu.
TouchLeft stick moves, right stick looks, and an interact button appears when you are close to an object.
▶ Enter EchoSpace

Opens in this tab. On desktop the mouse pointer is captured for looking around, and Esc gives it back.

🔊 Audio systems

  • HRTF panning. Every object is a Web Audio PannerNode with the HRTF model and inverse distance rolloff. The listener position and orientation follow the camera each frame.
  • Seven synthesis voices. Drone, pulse, granular, breath, chime, sub and whisper, all built from oscillators, filters and LFOs in real time. No samples are loaded.
  • Sympathetic resonance. Objects tuned to a harmonic ratio swell when you approach their partner, and a faint line between them brightens as you stand near both.
  • Distance-aware reverb. A convolution reverb with a generated impulse response, and the wet level moves as you get closer to or further from the nearest object.
  • Procedural footsteps and wind. Filtered noise bursts for steps, and a band-limited noise bed that rises as you near the edge of the space.

⚙️ Engineering decisions

01

No audio library

The Web Audio graph is wired by hand, which keeps the signal path readable: voice, panner, resonance gain, interaction gain, then a dry bus and a reverb send.

02

Synthesis over samples

Generating the voices keeps the build tiny, lets each one be tuned to a precise fundamental, and means there are no loading screens or licences to track.

03

Pause means silence

Opening the menu suspends the audio context as well as the scene, so the hall really stops while you read the controls or the story.

04

Plain JavaScript files

Audio, objects, connections and the main loop live in four small scripts with no bundler, so the whole game can be hosted as static files.

02 · The seven voices

Each object has one voice and one name on the plate that appears when you interact with it. The fundamentals are spread out on purpose, which keeps the voices from piling onto the same part of the spectrum and hiding each other.

ObjectVoiceFundamentalBuilt from
resonanceDrone110 HzFour detuned sine oscillators and a slow LFO
pulsePulse220 HzSquare wave, amplitude LFO and a bandpass filter
scatterGranular165 HzFive detuned grains with randomised envelopes
breathBreath80 HzSawtooth through a lowpass swept by a 0.18 Hz LFO
chimeChime528 HzInharmonic partials with exponential decay
groundSub55 HzSine through a 120 Hz lowpass, with slow drift
whisperHidden880 HzThree sine partials with micro LFOs, very quiet
03 · Perception behind the design

A space you navigate by hearing

With almost no light to trust, the sound has to carry the job of showing where things are. These are the perceptual ideas the audio is built around.

Localisation

HRTF filtering gives each voice a direction, and distance shapes level so you can tell near from far while you turn your head.

Masking

Fundamentals are spaced apart across the voices, so several objects can sound at once and each one stays audible.

Reverb as a distance cue

The balance between direct sound and reverb changes with how close you are to the nearest object, which adds depth to the level cue.

04 · The code

The whole game is plain files with no build step. audio.js holds the Web Audio engine, the seven synth builders, the panners and the reverb. objects.js defines the floating objects and ties each one to a voice. connections.js draws the lines between harmonically related pairs, and main.js runs the scene, the player controller, the menu and the visualiser.

JavaScript
All game and audio logic
Three.js r128
Scene, lighting, fog and controls
Web Audio API
Synthesis, HRTF panning, reverb
AnalyserNode
Live FFT visualiser
Pointer Lock
Mouse look on desktop

Sound that carries the space

If you need spatial audio, procedural sound or interactive audio systems built on how people actually localise and hear, I'd love to hear about your project.