From 4937de026cc20c15f861aa87fb53fd409ec22ca0 Mon Sep 17 00:00:00 2001 From: Oleksiy Date: Tue, 2 Apr 2024 13:51:17 +0300 Subject: [PATCH] Optimized some MIDI related stuff --- Software/Gravity/Gravity.ino | 8 +++----- Software/Gravity/Interactions.ino | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Software/Gravity/Gravity.ino b/Software/Gravity/Gravity.ino index 2b0096f..d9d68a9 100644 --- a/Software/Gravity/Gravity.ino +++ b/Software/Gravity/Gravity.ino @@ -6,7 +6,7 @@ #include #include -const char version[5] = "1.1b4"; +const char version[5] = "V:1.1"; #define SCREEN_ADDRESS 0x3C @@ -238,10 +238,9 @@ void sendMIDIStop() { NeoSerial.write(0xFC); } -void receiveMIDI() { +void receiveMIDI( uint8_t msg, uint8_t status ) { if (masterClockMode == 2) { - //if(Serial.available() > 0) { - int msg = NeoSerial.read(); + //int msg = NeoSerial.read(); if (msg == 0xF8) { //Clock MIDIClockReceived = true; } else if (msg == 0xFC) { //stop @@ -249,7 +248,6 @@ void receiveMIDI() { } else if (msg == 0xFA || msg == 0xFB) { //start and continue isPlaying = true; } - //} } } diff --git a/Software/Gravity/Interactions.ino b/Software/Gravity/Interactions.ino index e699b7c..fcb4a82 100644 --- a/Software/Gravity/Interactions.ino +++ b/Software/Gravity/Interactions.ino @@ -178,7 +178,7 @@ void checkInputs() { && (shiftBtnPushed || menuItemSelected) && displayTab == 0 && menuItem == 1) { //Master Clock Mode - if (masterClockMode == 1 && change == -1) { //Stop when switching from ext to int + if (masterClockMode == 1) { // && change == -1) { //Stop when switching from ext to int or to midi isPlaying = false; }