Questing · 2026-10-03 · Room Acoustics · Zero Dependencies
ECHO
Place a sound source anywhere in the room. Ninety rays radiate outward in every direction — each one bouncing off the walls, fading with every reflection, tracing the exact paths that carry sound to your ear. Move the listener across the room and watch which paths connect. Turn the absorption slider down to a cave: the room roars for seconds. Turn it up to foam panels: silence in three bounces.
Open Echo →Geometric Acoustics — The Ray Approximation
Sound is a pressure wave. In a room it reflects, diffracts, and interferes — the full wave equation is a partial differential equation whose solution fills every corner with a complex standing-wave pattern. But when the sound wavelength is much smaller than the room dimensions, a powerful simplification applies: treat sound exactly like light and trace rays.
At 1 kHz (roughly the middle of speech intelligibility), the wavelength in air is 34 cm — much smaller than a typical room. At 4 kHz the wavelength is 8.5 cm. In these ranges the ray picture is accurate enough to predict reverberation time, early reflections, and the gross spatial distribution of energy within a room. Architects have used this model — known as geometric or ray acoustics — to design concert halls since the 1930s.
Law of specular reflection (each wall bounce): θ_reflected = θ_incident or in vector form, given inward wall normal n̂: d' = d − 2(d·n̂)n̂ where d is the incoming direction unit vector. This is the same law that governs flat mirrors. Curved or angled walls redirect the energy differently — the reason concave reflectors focus sound (parabolic dish) and convex panels scatter it (diffuser panels in recording studios).
Absorption — How Materials Kill Sound
At each wall bounce, some energy is converted to heat by the surface material. The absorption coefficient α (0 = perfect mirror, 1 = total absorber) describes what fraction of incident energy is lost per reflection. After n bounces, the remaining energy is (1 − α)n.
Absorption coefficients at 1 kHz (industry reference values): Material α ────────────────────────────────────────────────────────── Polished stone/tile 0.01 – 0.03 (near-perfect mirror) Bare concrete 0.03 – 0.06 Plaster / drywall 0.04 – 0.08 Hardwood floor 0.05 – 0.10 Audience (occupied) 0.35 – 0.55 (bodies absorb a lot) Thick carpet 0.30 – 0.55 2-inch foam panels 0.50 – 0.75 Anechoic wedges 0.97 – 0.99 (used in testing labs) After 10 bounces at α=0.05: energy = 0.95¹⁰ ≈ 60% (still audible) After 10 bounces at α=0.40: energy = 0.60¹⁰ ≈ 1% (nearly inaudible) After 10 bounces at α=0.70: energy = 0.30¹⁰ ≈ 0.006% (gone) This is the visual gradient you see in Echo: rays from a cave barely fade; rays from a foam studio vanish after 3-4 bounces.
RT60 — The Standard Measure of Reverberation
When a source stops emitting, the room does not go silent immediately — energy keeps bouncing until it is absorbed. The standard measure of how long this takes is RT60: the time for sound to decay by 60 dB from the moment the source cuts off. A 60 dB drop corresponds to the energy falling to one millionth of its initial value.
In 1900 Wallace Sabine — a young Harvard physics professor who became the founder of architectural acoustics — derived the first formula for RT60 by timing how long an organ pipe’s tone was audible in a lecture room as he systematically hauled in seat cushions from neighbouring halls. The formula he found is still in use everywhere today:
Sabine's formula (1900): RT60 = 0.161 × V / (S × ᾱ) V = room volume (m³) S = total surface area (m²) ᾱ = mean absorption coefficient (area-weighted average) 0.161 = 24 ln10 / c₀ (c₀ = 343 m/s speed of sound) Typical values: Anechoic chamber 0.01 – 0.10 s (used for speaker/microphone testing) Recording studio 0.20 – 0.35 s (dead, dry, close-mic'd vocals) Living room 0.40 – 0.65 s (comfortable speech intelligibility) Concert hall 1.60 – 2.20 s (optimized for orchestral music) Gothic cathedral 5.00 – 10.0 s (chant designed for this reverb) Tiled bathroom 0.60 – 1.20 s (resonant, speaker's voice "blooms")
The optimal RT60 for a space depends entirely on what it will be used for. Speech intelligibility peaks at RT60 ≈ 0.5–0.8 s — long enough to fill gaps between words, short enough not to smear consonants. Orchestral music peaks at RT60 ≈ 1.8–2.0 s — the longer reverb tail allows legato playing and blends the orchestra into a single sonic object. A space designed for speech (a lecture hall) sounds dead and disappointing for a symphony; a space designed for a symphony (Carnegie Hall) sounds muddy and unintelligible for a lecture.
Early Reflections and the Haas Effect
Not all reflections are equal. The ones that arrive within roughly 50 ms of the direct sound — the early reflections — are perceived as part of the direct signal itself. The human auditory system fuses them with the original: you hear a louder, spatially richer sound rather than discrete echoes. This is the Haas effect (or precedence effect), discovered by Helmut Haas in 1949.
In Echo you can see the early reflections clearly: they are the first few amber segments that arrive near the listener shortly after the wave-front reaches it directly. In a well-designed concert hall, the angled side-wall reflectors overhead are carefully aimed to deliver strong early reflections to every seat within this 50 ms window — providing the sense of envelopment and spatial width that distinguishes a great hall from a mediocre one.
50 ms of travel at c₀ = 343 m/s ≈ 17.2 m of path length. Direct-path to listener + first reflection must total < 17 m for the reflection to fuse with the direct sound (Haas window). In Echo at 50 px/m scale: the Haas boundary is 17 × 50 = 850 px of cumulative path length. The first few highlighted segments arriving at the listener are almost always within this window.
Concert Hall Design — Shoebox vs Fan vs Vineyard
Three dominant hall shapes, each with a different acoustic character:
Shoebox (Vienna Musikverein, 1870; Amsterdam Concertgebouw, 1888; Boston Symphony Hall, 1900) — narrow rectangular room, typically 20–25 m wide and 35–50 m long. The parallel side walls deliver strong lateral early reflections to every seat; the long narrow shape keeps the reverb time above 2 s. Most acoustic consultants still consider this shape the gold standard for orchestral music. The Musikverein’s RT60 of 2.0 s is often cited as the ideal.
Fan-shaped (Royal Festival Hall, 1951; Philharmonic Hall, New York, 1962 — later demolished) — popular in the mid-20th century because it fits more audience members with good sightlines. But the diverging side walls direct early reflections upward and outward, not toward the audience. Both halls were acoustically disappointing and extensively remediated. The fan shape is now largely abandoned for music.
Vineyard terrace (Berlin Philharmonie, 1963; Walt Disney Concert Hall, 2003) — orchestra at the centre, audience on terraced platforms surrounding it. Designed by Hans Scharoun and refined by acoustician Lothar Cremer, the Berlin hall achieved RT60 = 2.1 s despite its non-shoebox shape by using angled overhead reflectors and carefully profiled ceiling clouds to simulate lateral reflections. The vineyard form has since become the preferred shape for new prestige halls.
RT60 comparison (occupied, 500 Hz–1 kHz average): Vienna Musikverein (shoebox, 1870) 2.0 s Amsterdam Concertgebouw (shoebox, 1888) 2.2 s Boston Symphony Hall (shoebox, 1900) 1.8 s Carnegie Hall (modified shoebox, 1891) 1.7 s Berlin Philharmonie (vineyard, 1963) 2.1 s Walt Disney Concert Hall (vineyard, 2003) 2.2 s Sydney Opera House (fan, 1973) 1.5 s ← below optimum Royal Festival Hall (fan, 1951, original) 1.4 s ← controversial
Why Bathrooms Sound Different — Resonance and Hard Surfaces
A tiled bathroom has two acoustic features that combine to create the famous booming, enhancing vocal quality that makes people sing in them. First, the extremely hard tile surfaces have absorption coefficients below 0.02 — nearly perfect mirrors that bounce energy many times before it dies out. This produces a long RT60 despite the room being tiny: a 2×2×2.5 m bathroom with α=0.02 has RT60 ≈ 0.8 s, similar to a small concert hall.
Second, the parallel walls create flutter echo — a rapid sequence of discrete reflections between two facing walls. At room width d, the flutter period is 2d/c₀, giving a repetition rate f = c₀/2d. For d = 2 m, f = 343/4 = 85.75 Hz — coincidentally close to the fundamental frequency of a male singing voice. This adds a resonant colouration that makes your voice sound richer and fuller.
Flutter echo rate: f = c₀ / (2d) Room width d = 2.0 m → f = 343/4 = 85.75 Hz (bass resonance) Room width d = 1.5 m → f = 343/3 = 114 Hz (higher, brighter) Room width d = 3.0 m → f = 343/6 = 57 Hz (sub-bass rumble) Axial room modes (fundamental standing waves): fn = n × c₀ / (2L) for n = 1, 2, 3, … L = 2.5 m (room length): f₁ = 68.6 Hz, f₂ = 137 Hz, f₃ = 206 Hz Below the Schroeder frequency (≈ 2000√RT60/V Hz) rooms are dominated by individual modal resonances — geometry acoustics fails. Above it, the modal density is high enough for the ray picture to hold.
The Dead Zones — Where Sound Cannot Reach
Move the source and listener in Echo to opposite corners of the room and watch what happens: most ray paths still arrive at the listener, because the corner is such a strong retroreflector (a ray hitting two perpendicular walls bounces straight back toward where it came from). But position the listener just inside one corner while the source is behind the opposite wall — and far fewer paths connect. These are the acoustic dead zones that plagues theatre directors and church organists: positions where sound energy simply does not arrive.
In a real room, diffraction (wave bending around obstacles) partially fills these zones. The geometric approximation, which ignores diffraction, is most accurate at high frequencies where diffraction is negligible. At low frequencies — below the Schroeder frequency — the wave solution is needed. But for predicting where a performer can be heard in a large hall at speaking frequencies, the ray tracer gives the right answer.
Implementation
Echo emits 90 rays from the source in a uniform angular fan (every 4°). Each ray is traced iteratively: find the nearest wall intersection using the parametric line–segment intersection formula, compute the specular reflection direction, multiply energy by (1 − α), repeat up to 14 times or until energy falls below 0.6%. The intersection test solves a 2×2 linear system per wall per segment.
Ray–wall intersection (given ray origin p, direction d̂, wall from a to b): wall direction e = b − a denom = dx × ey − dy × ex t = [(ax−px) × ey − (ay−py) × ex] / denom (ray parameter) s = [(ax−px) × dy − (ay−py) × dx] / denom (wall parameter, 0≤s≤1) intersection at p + t × d̂ iff t > ε and 0 ≤ s ≤ 1 Listener detection: perpendicular distance from listener point P to segment [A, B] — clamped projection onto the segment. t_proj = clamp((P−A)·(B−A) / |B−A|², 0, 1) dist = |A + t_proj × (B−A) − P| Segment is "heard" iff dist ≤ L_RADIUS (12 px = 24 cm at 50 px/m) Animation: each segment carries cumulative path distances [d0, d1]. At animation time waveT (in canvas-px), draw the portion of each segment where d0 ≤ waveT — the wave-front propagates at 880 px/s. Colour encodes bounce count; alpha encodes energy^0.68. RT60: Sabine formula with assumed 3 m room depth. 50 canvas pixels → 1 m (so room ≈ 9.84 m × 6.24 m × 3 m). V = 184 m³, S = 288 m², RT60 = 0.161 × 184 / (288 × α). At α = 0.07: RT60 ≈ 1.47 s. At α = 0.02: RT60 ≈ 5.14 s. Performance: 90 rays × up to 14 segments = 1,260 max segments, each checked against 4 walls = 5,040 intersection tests per compute. Runs in < 2 ms. Canvas 2D, zero libraries, zero backend.