Browse Source

Fix zero-velocity note-ons on MIDI files

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.2.0-RC1
falkTX 4 years ago
parent
commit
6995188ebd
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      source/native-plugins/midi-base.hpp

+ 4
- 0
source/native-plugins/midi-base.hpp View File

@@ -175,6 +175,10 @@ public:


carla_copy<uint8_t>(rawEvent->data, data, size); carla_copy<uint8_t>(rawEvent->data, data, size);


// Fix zero-velocity note-ons
if (MIDI_IS_STATUS_NOTE_ON(data[0]) && data[2] == 0)
rawEvent->data[0] = MIDI_STATUS_NOTE_OFF;

appendSorted(rawEvent); appendSorted(rawEvent);
} }




Loading…
Cancel
Save