From dac0862657fe3adef0f6f3ca07c39fd4bf4203ed Mon Sep 17 00:00:00 2001 From: Eric Bateman Date: Sun, 11 Aug 2019 00:58:17 -0700 Subject: [PATCH] Update MIDI.hpp --- src/MIDI.hpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/MIDI.hpp b/src/MIDI.hpp index fd87d33..99e348a 100644 --- a/src/MIDI.hpp +++ b/src/MIDI.hpp @@ -26,7 +26,6 @@ */ #pragma once -#pragma message ("git clone MIDI.hpp" ) BEGIN_MIDI_NAMESPACE @@ -136,18 +135,15 @@ void MidiInterface::send(MidiType inType, DataByte inData2, Channel inChannel) { - // Then test if channel is valid - if (inChannel >= MIDI_CHANNEL_OFF || - inChannel == MIDI_CHANNEL_OMNI || - inType < 0x80) - { - Serial.print("invalch: "); Serial.println(inType); - return; // Don't send anything - } - if (inType <= PitchBend) // Channel messages { - Serial.print("chmsg: "); Serial.println(inType); + // Then test if channel is valid + if (inChannel >= MIDI_CHANNEL_OFF || + inChannel == MIDI_CHANNEL_OMNI || + inType < 0x80) + { + return; // Don't send anything + } // Protection: remove MSBs on data inData1 &= 0x7f; inData2 &= 0x7f; @@ -178,7 +174,6 @@ void MidiInterface::send(MidiType inType, } else if (inType >= Clock && inType <= SystemReset) { - Serial.print("sendRT: "); Serial.println(inType); sendRealTime(inType); // System Real-time and 1 byte. } }