Unable to resume coroutines with clock.sync() while beat is negative (Link count-in)
dstroud opened this issue · 1 comments
PR #1740, which fixes Link clock to start on beat 0, uses negative beat values during the count-in. This works great but clock.sync()
does not resume coroutines on negative beats. Per the excellent discussion in #1738, it seems this is by design to avoid breaking scripts that would otherwise require an additional check if the beat is >=0.
However, this approach introduces breaking changes elsewhere. Here are some examples of some issues/limitations I've come across:
Ex 1: Unable to make a script with Ableton Live-like functionality for pause/continue. Live lets you pause at any point in the measure and continue using shift+space. Live’s playback resumes during the negative beat count-in and synced devices start at the next measure/beat 0.
Ex 2: Unable to make a script with a metronome that starts during count-in and continues after beat 0.
Ex 3: Not sure if this is necessarily using clock.sync()
but it's certainly related: MIDI clock pulses stop being sent during count-in, which can cause issues with follower devices. Depending on tempo, phase, and Link quantum, Ableton Live sometimes interprets the loss of clock pulses as a dropped connection ("The MIDI sync signal has been lost").
I’m not sure what the solution might be and I’m wary of introducing breaking changes by allowing sync on negative beats, but thought I’d raise the issue.
sorry I think I am tapped out for the foreseeable w/r/t this problem space on norns