microphone time difference of arrival calculator
Microphone Time Difference of Arrival Calculator guide
Place the microphones on a baseline and call them A and B. A distant source directly in front of the midpoint is broadside at zero degrees. Rotate its bearing toward A for a positive angle. The output is arrival time at B minus arrival time at A.
Play the instrument ↑- Default result
- 291.5452 µs B minus A
Calculation and units
For a plane wave, path difference equals spacing times sin(angle). Divide the path difference in metres by sound speed to get seconds. Multiply by the recording sample rate to obtain fractional samples, retaining the sign.
Worked examples
Select a named case in the Worked example control to load these values. You can then edit any input to compare the result.
Spaced pair at thirty degrees
Microphone spacing (cm) = 20 · Angle from broadside toward A (°) = 30 · Sound speed (m/s) = 343 · Sample rate (Hz) = 48000.
291.5452 µs B minus A. Signed path difference 10 cm and delay 13.99417 samples. Microphone A receives the wave first.
The path difference is half the microphone spacing. Keep the fractional sample value when comparing a fitted time lag.
Broadside plane wave
Microphone spacing (cm) = 20 · Angle from broadside toward A (°) = 0 · Sound speed (m/s) = 343 · Sample rate (Hz) = 48000.
0 µs B minus A. Signed path difference 0 cm and delay 0 samples. Both arrivals coincide.
Both capsules have equal path lengths along the propagation direction, so neither leads.
Toward microphone A
Microphone spacing (cm) = 20 · Angle from broadside toward A (°) = 90 · Sound speed (m/s) = 343 · Sample rate (Hz) = 48000.
583.0904 µs B minus A. Signed path difference 20 cm and delay 27.98834 samples. Microphone A receives the wave first.
Endfire produces the maximum positive delay for this spacing. The path difference equals the full baseline.
Toward microphone B
Microphone spacing (cm) = 20 · Angle from broadside toward A (°) = -90 · Sound speed (m/s) = 343 · Sample rate (Hz) = 48000.
-583.0904 µs B minus A. Signed path difference -20 cm and delay -27.98834 samples. Microphone B receives the wave first.
Reversing the bearing reverses the sign of the delay while preserving its magnitude.
Wider stereo bar
Microphone spacing (cm) = 40 · Angle from broadside toward A (°) = 30 · Sound speed (m/s) = 343 · Sample rate (Hz) = 48000.
583.0904 µs B minus A. Signed path difference 20 cm and delay 27.98834 samples. Microphone A receives the wave first.
Increasing the baseline doubles the time difference for the same angle and sound speed.
High sample rate
Microphone spacing (cm) = 20 · Angle from broadside toward A (°) = 30 · Sound speed (m/s) = 343 · Sample rate (Hz) = 96000.
291.5452 µs B minus A. Signed path difference 10 cm and delay 27.98834 samples. Microphone A receives the wave first.
The acoustic delay stays fixed. Doubling the recording rate doubles its value in samples.
Interpreting the result
Use capsule-to-capsule spacing. If a measured delay exceeds spacing divided by sound speed, check channel order, synchronization and the selected correlation peak. A reflection can be stronger than the direct arrival.
For a signed measurement check, place a source near the A end of the baseline at a distance large compared with the spacing. Inspect both recorded tracks around a sharp onset. Find the sample of the first clear arrival in B and subtract the corresponding position in A. The result should be positive under this naming convention. If all observations show the opposite sign, check which physical microphone was assigned to each recorded channel.
Measurement and model limits
A nearby source needs its actual distance to each capsule. The plane-wave result assumes a common clock and omits channel latency. One microphone pair cannot uniquely determine distance or resolve front/back symmetry.
Music theory tools → · Microphone Polar Pattern Calculator →
Answers before you play
Common questions
Which side is positive?
A positive result means A received the wave first and B received it later. Swapping A and B reverses the sign.
Can an arrival differ by a fraction of a sample?
Yes. Continuous acoustic time has no sample grid. Estimators interpolate or fit the peak to report fractional delay.
What is the maximum possible delay?
Its magnitude is microphone spacing divided by sound speed. Endfire attains that limit for an ideal plane wave.
What if my angle starts along the baseline?
Convert it to the signed angle from broadside first. Entering an endfire angle as zero would predict simultaneous arrival.