tidalcycles/Tidal

Should controllers use global rather than local cycle count?

matthewkaney opened this issue · 0 comments

Currently, there's no way to get a reference to the global cycle count from within a pattern, which means that when you reference a patterned controller value, the controller is queried using the local concept of time.

setN "root" "<0 4 12 7>/2"

d1 $ n ("c'major'4*4" + cN0 "root") # s "supersquare"
d2 $ slow 2 $ n (cN0 "root") # s "superbass"

In this example, the roots of the two patterns will fall out of sync, because the second pattern queries the controller pattern at half the speed. This isn't the behavior I'd want in this case since the point of a controller is that it's "outside" the pattern. Indeed, if this value were being regularly set via OSC, the controller values in all patterns would stay in sync.

Perhaps we could pass down a state value for the original query that the controller could refer to?