Skip to content

Commit dac0862

Browse files
committed
Update MIDI.hpp
1 parent d688030 commit dac0862

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

src/MIDI.hpp

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
*/
2727

2828
#pragma once
29-
#pragma message ("git clone MIDI.hpp" )
3029

3130
BEGIN_MIDI_NAMESPACE
3231

@@ -136,18 +135,15 @@ void MidiInterface<SerialPort, Settings>::send(MidiType inType,
136135
DataByte inData2,
137136
Channel inChannel)
138137
{
139-
// Then test if channel is valid
140-
if (inChannel >= MIDI_CHANNEL_OFF ||
141-
inChannel == MIDI_CHANNEL_OMNI ||
142-
inType < 0x80)
143-
{
144-
Serial.print("invalch: "); Serial.println(inType);
145-
return; // Don't send anything
146-
}
147-
148138
if (inType <= PitchBend) // Channel messages
149139
{
150-
Serial.print("chmsg: "); Serial.println(inType);
140+
// Then test if channel is valid
141+
if (inChannel >= MIDI_CHANNEL_OFF ||
142+
inChannel == MIDI_CHANNEL_OMNI ||
143+
inType < 0x80)
144+
{
145+
return; // Don't send anything
146+
}
151147
// Protection: remove MSBs on data
152148
inData1 &= 0x7f;
153149
inData2 &= 0x7f;
@@ -178,7 +174,6 @@ void MidiInterface<SerialPort, Settings>::send(MidiType inType,
178174
}
179175
else if (inType >= Clock && inType <= SystemReset)
180176
{
181-
Serial.print("sendRT: "); Serial.println(inType);
182177
sendRealTime(inType); // System Real-time and 1 byte.
183178
}
184179
}

0 commit comments

Comments
 (0)