Audio Delay
Convert distance ↔ delay at the temperature-corrected speed of sound, and compute the alignment delay between two sources (speaker/subwoofer), in milliseconds and in samples at 48 kHz.
Inverse · delay → distance
Type a delay and get the equivalent distance and samples at the current speed of sound.
Distance → delay (at the current temperature)
| Distance | Delay | Samples @Fs |
|---|
row closest to your distance · samples at the selected Fs.
How it is calculated · speed, delay and alignment
1. Speed of sound in air:
c = 331.3 + 0.606·T (m/s), with T in °C. At
20 °C it gives 343.42 m/s; at 0 °C, 331.3 m/s.
2. Path delay:
delay(ms) = distance(m) / c × 1000. Each meter adds
~2.9 ms at 20 °C.
3. Aligning two sources: the
nearer source is delayed by the path difference,
delay = (d_far − d_near) / c × 1000, so both wavefronts
reach the listener together.
4. Samples:
samples = ms/1000 × Fs. At 48 kHz, 29.14 ms
equals 1399 samples.
5. Inverse: given a delay,
distance = c × ms/1000. Handy to read a processor's
delay and find the distance it corresponds to.
6. Simple geometric model: it uses direct distances and ignores reflections, wind, humidity and the DSP's own latency. For subwoofers, measure the real distance from the cone to the listening position.
Runs locally in your browser · no sign-up · nothing leaves your browser