With [abl_link~] you are syncing Pd to the other programs at the audio rate.... the audio "is" the time.
I'm quite sure this is not the point of Ableton Link at all.
Link, AFAICS, does not follow a master/slave clock model. It's a cooperative negotiation among equal peers to maintain best-possible (or, musically useful) sync. There is no concept of Pd originating time, or not originating time.
When you use Link, you voluntarily sacrifice sample accuracy in exchange for a coherent musical pulse shared across multiple machines. Samples run according to the machine's local soundcard (and soundcards are famously inaccurate -- in SuperCollider, if I do
s.actualSampleRate, I get numbers like 44099.234426884 or 44099.40771005, but never 44100.0). So a "beat" at, say, 120 bpm is not necessarily exactly 22050 samples -- but it doesn't matter because everyone is slightly inaccurate, together. (If typical musical events are at least 80 ms apart, inaccuracy within 1-2 ms will be undetectable to the ear.)
Here (connected to a SuperCollider client running a LinkClock at 60 bpm), the time between beat ticks varies between 998 and 1001.36. Most of the time it's 999.909 but occasionally it "adjusts" for the inevitable time variance between clocks.
The point of Link is, if I have a musical event that is supposed to happen on the "and of 2," then Link determines that time point to coordinate with the other machines, within an acceptable margin of error. Pd's sample clock is totally irrelevant to this. (Corollary: If you need sample accuracy, don't use Link.)
The phase will be 0-1 I imagine
Nope, it's 0 - (quantum-1). "Quantum" is a Link property corresponding to the number of beats in the bar. So my "and of 2" example should happen at phase = 1.5.
You can do a [text] lookup every tick
That seems wasteful. I would rather calculate the beat index for the next event and store it in a [float] box -- because this value is likely to be stable for hundreds or thousands of audio ticks.
@EEight The cue system seems a bit heavyweight for note sequences, but I might be able to steal some code design ideas from it