Room Impulse Response
Play an exponential sine sweep through your speakers, record it with the mic, and recover the impulse response of the room. From the IR you get the direct path, the early reflections, and the reverberation tail — and from the Schroeder integration of that tail, the reverberation time RT60.
The idea in one minute
If you knew how a room responds to a single perfect click (a Dirac impulse), you would know everything — any sound played in that room is just that click’s response convolved with the source signal. That click response is called the room impulse response (RIR).
You could try literally clapping or popping a balloon. The problem: a clap has tiny energy spread across the spectrum, the room is noisy, and your mic has limited dynamic range. So instead we play a long, well-known signal — an exponential sine sweep s(t) — and recover the impulse response by mathematically deconvolving the sweep out of the recording. That is Farina’s method, and it is what this page does.
Sweep parameters
Use a quiet room and turn the speaker volume up. Headphones will not work — the sound has to travel through the air to the mic. The browser’s echo cancellation, AGC, and noise suppression are all disabled so your mic captures the room honestly.
Hear it
Pick a source signal and play it through a room. The default is a real public-domain speech clip (Armstrong on the Moon, 1969). The synthetic room is built from a velvet-noise reverb tail with controllable RT60, pre-delay, and reflection density — the same idea as classic Schroeder/Moorer artificial reverbs. Headphones recommended so the playback isn’t coloured by your real room.
Synthetic room
How long the tail takes to fade by 60 dB (i.e. to inaudibility). Big number = “live” room with a long ringing tail.
Gap between the direct sound and the first wall reflection. Long pre-delay reads as a “big” room without smearing the source.
How tightly packed the reflections are. Sparse = you hear individual echoes (slap-back), dense = a smooth wash.
Try RT60 0.4 s for a small office, 1.5 s for a hall, 3 s+ for a cathedral. Drop density to 80 /s and you can hear individual reflections; raise it past 1500 /s for a smooth diffuse tail. Pre-delay above ~30 ms is what makes a reverb feel “big.”
How the math works
Step 1. The sweep. An exponential (logarithmic) sweep has instantaneous frequency growing as f(t) = f₁ (f₂/f₁)^(t/T). Equal time per octave, which is acoustically “flat” to the ear. The closed form is
s(t) = sin( 2π f₁ T / ln(f₂/f₁) · ( exp(t·ln(f₂/f₁)/T) − 1 ) )
Step 2. The inverse filter. Convolution by s(t) spreads energy in time. To collapse it back to an impulse we convolve the recording with a matched filter i(t). For an exponential sweep, the right inverse is the time-reversed sweep with a +6 dB/octave amplitude envelope (because the sweep spends more time at low frequencies than at high ones, so the high end needs boosting):
i(t) = s(T − t) · (f₂/f₁)^(−t/T)
One nice consequence: distortion products from a non-linear loudspeaker land at negative times in the deconvolved signal — you can literally see them as ghosts before the main impulse. Try cranking the volume.
Step 3. Schroeder backward integration. A clean reverb tail is statistically a noise burst with an exponentially decaying envelope. The squared-IR sample-by-sample is a noisy estimate of that envelope. Schroeder showed that integrating h² from back to front gives the smooth decay curve we want:
EDC(t) = ∫t∞ h²(τ) dτ, in dB: 10 log₁₀ ( EDC(t) / EDC(0) )
Step 4. RT60. Reverberation time is how long the sound takes to drop by 60 dB. The direct measurement rarely reaches that depth above the noise floor, so we fit a line to a usable section — here, −5 dB to −25 dB (T20) — and extrapolate. RT60 = 3 · T20.
Things to try
- Run a measurement, then walk into a different room and run it again. Bathroom vs. carpeted bedroom is dramatic.
- Drape a towel over the mic and re-measure: see the high-frequency RT shorten.
- Shorten the sweep to 0.5 s and watch the SNR collapse — longer sweeps spread test energy over time, which beats the noise floor.
- Push the gain up enough to clip the speaker. Look for the “ghost” pre-impulses below zero on the time axis — harmonic distortion landing at negative time.
- Compare your IR’s reflection density (the spikes around 5–50 ms after the direct sound) to the smooth diffuse tail after about 100 ms. That transition is the “mixing time.”