diff options
author | David Robillard <d@drobilla.net> | 2015-02-19 20:23:11 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-02-19 20:23:11 -0500 |
commit | b68a4e5cdc59ffb81c1952ac9cad63ddf0c76d06 (patch) | |
tree | af8d97525461c83580bfe4096850d7342ba463cf /libs/ardour/midi_port.cc | |
parent | 450291adfca22a41fb63f8792fd588cede35b463 (diff) |
Normalize notes on all channels.
Probably.
Diffstat (limited to 'libs/ardour/midi_port.cc')
-rw-r--r-- | libs/ardour/midi_port.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/ardour/midi_port.cc b/libs/ardour/midi_port.cc index ccd6e9848b..615abede1c 100644 --- a/libs/ardour/midi_port.cc +++ b/libs/ardour/midi_port.cc @@ -117,9 +117,9 @@ MidiPort::get_midi_buffer (pframes_t nframes) if (buf[0] == 0xfe) { /* throw away active sensing */ continue; - } if (buf[0] == 0x90 && buf[2] == 0) { + } else if ((buf[0] & 0xF0) == 0x90 && buf[2] == 0) { /* normalize note on with velocity 0 to proper note off */ - buf[0] = 0x80; /* note off */ + buf[0] = 0x80 | (buf[0] & 0x0F); /* note off */ buf[2] = 0x40; /* default velocity */ } |