From c1b29924f71d9cea8c3a9d601c123760b1471396 Mon Sep 17 00:00:00 2001 From: Adam Wonak Date: Tue, 3 Jun 2025 07:33:50 -0700 Subject: [PATCH] Do not show MIDI tempo. Serial MIDI is too unstable. CV ext seems pretty stable when given a steady clock, but I need to try unstable sources / polyrhythms. --- clock.h | 1 - examples/clock_mod/clock_mod.ino | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/clock.h b/clock.h index 44eac80..2a0e54b 100644 --- a/clock.h +++ b/clock.h @@ -46,7 +46,6 @@ class Clock { pinMode(PULSE_OUT_PIN, OUTPUT); // Initialize the clock library - uClock.setExtIntervalBuffer(32); uClock.init(); uClock.setClockMode(uClock.INTERNAL_CLOCK); uClock.setOutputPPQN(uClock.PPQN_96); diff --git a/examples/clock_mod/clock_mod.ino b/examples/clock_mod/clock_mod.ino index e2823be..0474477 100644 --- a/examples/clock_mod/clock_mod.ino +++ b/examples/clock_mod/clock_mod.ino @@ -293,7 +293,12 @@ void DisplayMainPage() { if (app.selected_param == 0) { gravity.display.setFont(LARGE_FONT); char num_str[3]; - sprintf(num_str, "%d", gravity.clock.Tempo()); + // Serial MIID is too unstable to display bpm in real time. + if (app.selected_source == SOURCE_EXTERNAL_MIDI) { + sprintf(num_str, "%s", "EXT"); + } else { + sprintf(num_str, "%d", gravity.clock.Tempo()); + } textWidth = gravity.display.getUTF8Width(num_str); gravity.display.drawStr(32 - (textWidth / 2), textY, num_str); gravity.display.setFont(TEXT_FONT);