Making patterns aware of bars and beats

You could probably mess with Thread.endBeat which is a semi-hidden feature that time-dependent patterns use, but just finding (all) the Threads that need be messed with is difficult. (You’d need to traverse the tree of Threads spawned from the main Stream of the player, or something like that.) The real alternative imho is to not use time-dependent patterns. Sometimes that’s feasible and even desirable. But sometimes something like PtimeClutch is really handy.

And fast-forward is not the only time when time-dependent patterns have issues. As I noted in a linked thread:

Unfortunately all the Ptime -like patterns get desynchronized from the underlying stream if you pause the Stream[Player].

In a more “future vision” (rather than how to hack the present system), there could probably be a dependent-clock registration system implemented so that when you pause or FF a thread some “related” threads would get the same treatment for their clocks. But with pausing there’s the additional issue that clocks once stopped (=paused) cannot be restarted (for some reason). You have to create a new clock…