starting coroutines inside transport callbacks may be a bit tricky. it’s safe to assume that clock.sync(1/4) in your couroutine will wake up at 0.25 beats, and not at 0 beats as expected.
it might help to start the coroutine with the engine.hz call as follows:
function sequencer()
engine.hz(get_note())
while true do
clock.sync(1/4)
engine.hz(get_note())
end
end
or wait for 1 or more whole beats before you start your norns sequencer:
function sequencer()
clock.sync(1)
while true do
engine.hz(get_note())
clock.sync(1/4)
end
end
we’re working on fixing the syncing behaviour on transport start, but for now i don’t recommend relying on it for all use cases.