Update MIDI.hpp
This commit is contained in:
parent
d688030c14
commit
dac0862657
|
|
@ -26,7 +26,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#pragma message ("git clone MIDI.hpp" )
|
|
||||||
|
|
||||||
BEGIN_MIDI_NAMESPACE
|
BEGIN_MIDI_NAMESPACE
|
||||||
|
|
||||||
|
|
@ -136,18 +135,15 @@ void MidiInterface<SerialPort, Settings>::send(MidiType inType,
|
||||||
DataByte inData2,
|
DataByte inData2,
|
||||||
Channel inChannel)
|
Channel inChannel)
|
||||||
{
|
{
|
||||||
|
if (inType <= PitchBend) // Channel messages
|
||||||
|
{
|
||||||
// Then test if channel is valid
|
// Then test if channel is valid
|
||||||
if (inChannel >= MIDI_CHANNEL_OFF ||
|
if (inChannel >= MIDI_CHANNEL_OFF ||
|
||||||
inChannel == MIDI_CHANNEL_OMNI ||
|
inChannel == MIDI_CHANNEL_OMNI ||
|
||||||
inType < 0x80)
|
inType < 0x80)
|
||||||
{
|
{
|
||||||
Serial.print("invalch: "); Serial.println(inType);
|
|
||||||
return; // Don't send anything
|
return; // Don't send anything
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inType <= PitchBend) // Channel messages
|
|
||||||
{
|
|
||||||
Serial.print("chmsg: "); Serial.println(inType);
|
|
||||||
// Protection: remove MSBs on data
|
// Protection: remove MSBs on data
|
||||||
inData1 &= 0x7f;
|
inData1 &= 0x7f;
|
||||||
inData2 &= 0x7f;
|
inData2 &= 0x7f;
|
||||||
|
|
@ -178,7 +174,6 @@ void MidiInterface<SerialPort, Settings>::send(MidiType inType,
|
||||||
}
|
}
|
||||||
else if (inType >= Clock && inType <= SystemReset)
|
else if (inType >= Clock && inType <= SystemReset)
|
||||||
{
|
{
|
||||||
Serial.print("sendRT: "); Serial.println(inType);
|
|
||||||
sendRealTime(inType); // System Real-time and 1 byte.
|
sendRealTime(inType); // System Real-time and 1 byte.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue