demo mode change state at random each 4 beats

This commit is contained in:
2025-10-02 23:40:37 +02:00
parent bbe96b3cd2
commit e7ad7fabb5
3 changed files with 14 additions and 5 deletions
+3 -2
View File
@@ -113,10 +113,11 @@ void tempo_tap(Tempo *tempo) {
add_tap_to_chain(tempo, t);
}
double tempo_progress(Tempo tempo) {
double tempo_progress(Tempo tempo, double modulo) {
long t;
t = now();
return fmod((double)(t - tempo.last_reset) / (double)tempo.beat_length, 1.0);
return fmod((double)(t - tempo.last_reset) / (double)tempo.beat_length,
modulo);
}