monome / crow

Crow speaks and listens and remembers bits of text. A scriptable USB-CV-II machine
GNU General Public License v3.0
162 stars 34 forks source link

when using `input.mode = 'clock'` sense start/stop #455

Open trentgill opened 2 years ago

trentgill commented 2 years ago

at present we just do our best to try and follow the input clock. if the clock disappears we let the clock continue running at whatever rate it was set before the clock disappeared.

in contrast, it would seem more useful to detect when a clock is deactivated & stop the internal clock (and trigger clock.stop() event). then restart & trigger clock.start() on the first newly received trigger.

in the stop case, we likely need to wait for 3~4 clock misses to be confident the clock has stopped, vs just a change in tempo.

for startup, we must be sure to activate immediately on the first pulse, and assume the tempo is the same as it was before a stop.