Skip to content

Commit 2ffbdef

Browse files
authored
Merge pull request #124 from insolace/master
::send ignores realtime messages, quick fix
2 parents a44d1e7 + 843a9e5 commit 2ffbdef

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/MIDI.hpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,16 +135,15 @@ void MidiInterface<SerialPort, Settings>::send(MidiType inType,
135135
DataByte inData2,
136136
Channel inChannel)
137137
{
138-
// Then test if channel is valid
139-
if (inChannel >= MIDI_CHANNEL_OFF ||
140-
inChannel == MIDI_CHANNEL_OMNI ||
141-
inType < 0x80)
142-
{
143-
return; // Don't send anything
144-
}
145-
146138
if (inType <= PitchBend) // Channel messages
147139
{
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+
}
148147
// Protection: remove MSBs on data
149148
inData1 &= 0x7f;
150149
inData2 &= 0x7f;

0 commit comments

Comments
 (0)