Parcel speakers: smooth sync during movement (no drift-then-snap) #898

Open
opened 2026-10-20 22:11:28 +00:00 by sky_line · 0 comments
Owner

Follow-up to #892.

Today

OpenAL Doppler shifts each speaker's playback rate while the listener moves. We don't model propagation delay (#896), so every move leaves each speaker with a permanent timing offset. A once-a-second sync guard then re-joins any speaker more than 10 ms off, or more than 50 ms off while the listener is moving. That leaves a 40–90 ms gap in that speaker. The result is audible: while you walk, the speakers drift apart, and they snap back together when you stop or when the 50 ms limit is crossed.

Goal

Keep speakers in time continuously and inaudibly, without giving up the Doppler effect.

Options

  • Continuous rate correction instead of jumps. Each frame, measure each speaker's offset against the timeline (the stereo bed, which has no Doppler). Feed a small per-source rate correction back so the offset converges smoothly. The catch is that it fights Doppler: either correct only the integral of the Doppler shift and leave its instantaneous pitch, or apply the correction slowly, over seconds.
  • Pair Doppler with propagation delay (#896). If each speaker is delayed by distance / 343 m/s, a Doppler rate change is exactly the derivative of the changing delay. The offset is then physically correct, never accumulates as error, and needs no correction. This is the real-world model.
  • Crossfade resyncs. When a jump is unavoidable, crossfade a short overlap between the old and new position instead of leaving a gap.
  • Optional: a setting to scale Doppler for speakers, from 0 (always locked) to 1 (full).

Acceptance

Walking through a multi-speaker venue gives no audible drift or snap. Doppler pitch is still heard while moving fast, and the speakers remain sample-locked after you stop.

Follow-up to #892. ## Today OpenAL Doppler shifts each speaker's playback rate while the listener moves. We don't model propagation delay (#896), so every move leaves each speaker with a permanent timing offset. A once-a-second sync guard then re-joins any speaker more than 10 ms off, or more than 50 ms off while the listener is moving. That leaves a 40–90 ms gap in that speaker. The result is audible: while you walk, the speakers drift apart, and they snap back together when you stop or when the 50 ms limit is crossed. ## Goal Keep speakers in time continuously and inaudibly, without giving up the Doppler effect. ## Options - **Continuous rate correction instead of jumps.** Each frame, measure each speaker's offset against the timeline (the stereo bed, which has no Doppler). Feed a small per-source rate correction back so the offset converges smoothly. The catch is that it fights Doppler: either correct only the integral of the Doppler shift and leave its instantaneous pitch, or apply the correction slowly, over seconds. - **Pair Doppler with propagation delay (#896).** If each speaker is delayed by distance / 343 m/s, a Doppler rate change is exactly the derivative of the changing delay. The offset is then physically correct, never accumulates as error, and needs no correction. This is the real-world model. - **Crossfade resyncs.** When a jump is unavoidable, crossfade a short overlap between the old and new position instead of leaving a gap. - **Optional:** a setting to scale Doppler for speakers, from 0 (always locked) to 1 (full). ## Acceptance Walking through a multi-speaker venue gives no audible drift or snap. Doppler pitch is still heard while moving fast, and the speakers remain sample-locked after you stop.
sky_line added this to the Slipstream project 2026-10-20 22:11:28 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#898
No description provided.