I'm thinking about how to schedule events relative to clock ticks from a stream of bangs (or numbers).
That is, [delay], [pipe] and [metro] run under their own timing and are not easily coordinated to a master timeline.
A "priority queue" accepts times and actions. The nearest time in the future is the "top priority." When this next-event time falls within the next clock tick, it can be popped off the queue and awakened (and then the next top priority may be a different time in the future). So you can schedule something for exactly e.g. beat 27.35235 and count on it to fire at the right musical time.
Has anyone implemented this in Pd? If it already exists, I'd rather not waste my time redoing it.
hjh