Show HN: Beatsync – perfect audio sync across multiple devices
Implementation & timing approach
- Uses a central server for clock synchronization between clients, then Web Audio API scheduling to start playback at a shared future time and sample position.
- Does not touch hardware ring buffers directly (browsers don’t allow it) and does not use microphones; it’s purely clock-based.
- Millisecond‑level alignment is generally achieved; network jitter is averaged out in clock sync calculations.
Accuracy, latency & drift
- Several commenters question whether “perfect” or “guaranteed” sync is possible, especially across oceans, citing NTP limitations and speed‑of‑light bounds.
- Others note that for in‑room listening, 1–3 ms is usually “good enough” because speaker placement differences already introduce ~1 ms per foot.
- Professional systems (Dante, AES67) rely on PTP and hardware support to reach sub‑millisecond precision; this project is acknowledged as less strict but adequate for casual listening.
- Clock drift over long sessions isn’t currently corrected mid‑track; periodic resync is suggested.
Platform and device limitations
- Optimized for Chrome on macOS; initially less smooth elsewhere, though the author reports subsequent cross‑platform improvements.
- Safari Web Audio issues were encountered but worked around.
- Hardware/output latency (especially AirPlay, Bluetooth, or external speakers) can break sync; users request manual per‑device delay controls and/or mic‑based calibration chirps.
Comparisons & related technologies
- Snapcast is cited as a stronger streaming-based whole‑house solution but requires setup; Beatsync’s advantage is “just a link” in the browser.
- References to AES67/PTP, PipeWire/PulseAudio RTP streaming, Airfoil, and webtiming/WebTransport/WebRTC as related or alternative approaches.
Use cases & future ideas
- Multi‑room/household listening, “silent disco” with phones and headphones, shared listening across the internet, and pseudo‑radio / jukebox modes.
- More advanced ideas include automatic spatial placement, multi‑device surround setups, timecode/Dante integration, and syncing offline libraries or playlist state.
Legal and ecosystem concerns
- Integration with Apple Music/Spotify is requested but others warn the main barriers are copyright/licensing and potential patent issues (e.g., Sonos/Google audio sync disputes).
Overall reception
- Strong enthusiasm: people praise the seamless demo, zero install, and polish.
- Skepticism focuses on hard timing guarantees, browser/hardware variability, and long‑term robustness.