Live data from Hacker News

Show HN: Beatsync – perfect audio sync across multiple devices

github.com

41–50 of 135 posts

Re: Show HN: Beatsync – perfect audio sync across multiple devices

#41

Any plans to integrate this with Apple Music or Spotify? I would assume your algorithm would work only with files uploaded to the site, but curious if you had plans to attempt something with Apple Music/Spotify

Yes! The very next step.

Re: Show HN: Beatsync – perfect audio sync across multiple devices

#44
post #12

Unfortunately the w3c webtiming community group has closed. It'd be amazing to have the browser better able to keep time in sync across devices. https://www.w3.org/community/webtiming/ https://github.com/webtiming/timingobject

Luckily the audio industry as solved this problem, and they use PTP as the clocking mechanism for AES67 (kind of the bastard child of Ravenna and Dante, but with a fully open* AoIP protocol) that's designed for handling all the hard parts of sync'ing audio over a network. And it's used everywhere these days, but mostly in venues/stadiums/theme parks. * open if you pay membership dues to the AES or buy the spec

Hopefully wifi8 has something PTP built-in. I hear there's some vague hope that better timing info is one of the core pieces, so maybe maybe!

I'm super jazzed seeing AES67 emerge.. although it not working great over wifi for lack of proper timing info hurts. Very understandable for professional gear, but there's nothing I love more than seeing professional, prosumer and consumer gear blend together!

PipeWire already has pretty decent support! There's a tracker where people report on with their hardware experiences trying it. Some really really interesting hardware shows up here (and elsewhere on the gitlab): https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/32...

Re: Show HN: Beatsync – perfect audio sync across multiple devices

#46
post #26

Very cool! As someone who doesn't know much about the topic, I'm surprised that "millisecond-level accuracy" is enough. I would have imagined that you need to be accurate down to some fairly small multiple of the sample rate to avoid phasing effects. Do you have any interesting insight into that question?

Sound travels at a speed of ~1 foot/millisecond

Oh, that's a nice approximation! Similar to Grace Hopper's famous demo of a six inch wire being about how far electrical signals travel in a nanosecond.

Re: Show HN: Beatsync – perfect audio sync across multiple devices

#48
post #4

How does it deal with the audio ring buffers on the various devices? Does it just try to start them all at the same time, or does it take into account the sample position within the buffer?

Another issue is seeking in compressed audio. When seeking (to sync), some API's snap to frame boundaries.

I solved this by decompressing the whole file into memory as PCM.

Re: Show HN: Beatsync – perfect audio sync across multiple devices

#50
post #22

Earlier quoted context omitted.

> You can guarantee that you and someone else are listening to the same thing even across an ocean. How can you guarantee that? NTP fails to guarantee that all clocks are synced inside a datacenter, let alone across an ocean (Did not read the code yet) EDIT: The wording got me. "Guarantee" & "Perfect" in the post title, and "Millisecond-accurate synchronization" in the README. Cool project!

More, the speed of light puts a hard cap on how simultaneous you can be. Wolfram Alpha reckons New York to London is 19ms in a vacuum, more using fibre. Going off on a tangent: Back in the days of Live Aid, they tried doing a transatlantic duet. Turns out it’s literally physically impossible because if A songs when they hear B, then B hears A at least 38ms too late, which is too much for the human body to handle and…

It's a less hard problem than the duet. If the round-trip is 38ms, you can estimate that the one-way latency is 19ms. You tell the the other client to play the audio now, and you schedule it for 19ms in the future.

That's assuming standard OS and hardware and drivers can manage latency with that degree of precision, which I have serious doubts about.

In a duet, your partner needs to hear you now and you need to hear them now. With pre-recorded audio, you can buffer into the future.

Post reply on HN