How the brain constructs a three-dimensional sound scene from the signals at two ears — and how to recreate that in code.
Every spatial cue the auditory system uses is encoded in the difference between what the left ear hears and what the right ear hears, shaped further by the geometry of your head, ears, and body. Each page in this series isolates one piece of that encoding — starting from simple geometry and building to full binaural and ambisonic rendering.
The two fundamental horizontal cues: interaural time difference and the head's acoustic shadow. Hear how sound pans as geometry changes.
ITD · ILD · Duplex TheoryYour pinna filters sound differently by direction, resolving the cone of confusion — letting you distinguish front/back and elevation.
HRTF · Pinna · ElevationLevel, high-frequency air absorption, and the direct-to-reverberant ratio each carry independent information about source distance.
Inverse Square · Air AbsorptionReflections arriving within ~80 ms fuse with the direct sound, conveying room size and surface character via the Haas effect.
Haas Effect · Precedence · RoomThe statistical late-reverberant field. RT60, room size, absorption coefficients, and algorithmic vs convolution reverb.
RT60 · Schroeder · ConvolutionA moving source compresses wavefronts in front and stretches them behind, shifting pitch in proportion to velocity.
Doppler · Frequency ShiftEncode a full-sphere sound field into four B-format channels (W, X, Y, Z) and steer a virtual microphone anywhere in it.
B-Format · HOA · DecodingThe browser's built-in 3D audio engine: PannerNode, AudioListener, HRTF panning, and distance models in the Web Audio API.
PannerNode · AudioListenerSynthesise the full 3D illusion on headphones by convolving with an HRTF. Comparison with stereo panning and crossfeed for speakers.
Binaural · Crossfeed · Headphones