Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link quantum (downbeat) about a beat and a half off, couldn't fix #143

Open
jamshark70 opened this issue Aug 6, 2024 · 3 comments
Open

Comments

@jamshark70
Copy link

The other day, I tried to use Link in a show, and the quanta didn't sync.

  • Me: SuperCollider LinkClock, Ubuntu Studio.
  • Him: iPad (don't know iOS version), I guess the main rhythmic thing he was running was Patterning 3 but he had some other main-control interface, which I think was responsible for the Link connection.
  • Dedicated WiFi router, not connected to the outside world.

The connection itself was fine: 2 peers on both machines, and I picked up his tempo (125 bpm) right away.

So then we tried a simple test, playing simple downbeats. I was 5 16th-notes early.

link-quantum-desync

So this isn't a case of drift (because the desync was immediate), and it wasn't a case of not connecting (we definitely both saw 2 peers).

We quit and relaunched, and had roughly the same problem. Workaround on the fly was that I would stick to pulsed, but unmetered, material so that downbeats would be irrelevant.

I've used Link from time to time for several years. I've seen connection failures, and I've seen it drift, but I never saw the quantum just stubbornly get stuck a beat and a half off. Wondering how to prevent this in the future. Thanks.

@fgo-ableton
Copy link
Collaborator

It is hard for me to tell what exactly the issue here could be. I can't recall anyone having similar issues.
In general the quantum is a per peer property that is not synced on the network. It is used by each peer individually to align to a shared timeline. Synced downbeats are only guaranteed when all peers use the same quantum. http://ableton.github.io/link/#beat-alignment
So what you are seeing here could be due one peer having the quantum set to 0. In this case tempo is synced, but the peers are not aligned on a quantum grid.
If that is not the issue, it would be good to know more about the setup on the iPad.

@jamshark70
Copy link
Author

jamshark70 commented Aug 11, 2024

Synced downbeats are only guaranteed when all peers use the same quantum.

Right, I remember that from the other issue a few years ago.

I'm certain that the SC quantum is 4.0 -- it's initialized from the SC language clock object's beatsPerBar, and this is passed to requestBeatAtTime.

l = LinkClock.new; l.quantum.postln;
-> 4.0

My collaborator just sent me a screenshot showing "Sync Quantum = 1 bar" -- this seems to be the Audiobus iOS app. I'm not 100% certain if this is the Link quantum, though it would be odd if it were not. The Audiobus user manual is not clear about the definition of "one bar" -- I'd assume 4 beats but this doesn't appear to be concretely specified. Actually it's AUM from Kymatica -- user manual suggests that Time Signature sets Link quantum. I'm assuming that's 4 (and confirming with my friend).

@fgo-ableton
Copy link
Collaborator

I just tried syncing Live and Patterning for iPhone running inside AUM. I was not able to get it out of sync. Patterning allows to use Inter-App Audio or Link as a Clock Source. Both worked for me. It would be interesting to know which setup exactly caused the issue.
Also, if you should run into this again, it would be great if you could add a third Link peer and check if that is in sync with one of the other peers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants