From 67eeac6635f7d5f6c582a520170b645223ce3a3f Mon Sep 17 00:00:00 2001 From: ezra buchla Date: Thu, 7 Oct 2021 16:01:07 -0700 Subject: [PATCH] read midi input, avoiding issues from always-full buffer --- firmware/bleached/bleached.ino | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/firmware/bleached/bleached.ino b/firmware/bleached/bleached.ino index e881ba0..655e374 100644 --- a/firmware/bleached/bleached.ino +++ b/firmware/bleached/bleached.ino @@ -88,7 +88,7 @@ uint16_t loop_count = 0; void setup() { // serial monitoring for debugging - Serial.begin(38400); + // Serial.begin(38400); // potentiometers analogReadResolution(POT_BIT_RES); @@ -106,6 +106,10 @@ void loop() { } } + // MIDI Controllers should discard incoming MIDI messages. + // (reference: https://www.pjrc.com/teensy/td_midi.html) + while (usbMIDI.read()) { ;; } + // Periodically send MIDI CC for every knob so that the receiving end matches the knobs // even when changing pure data patches. // if (loop_count > LOOPS_PER_REFRESH) {