diff options
author | Robin Gareus <robin@gareus.org> | 2015-02-19 00:54:20 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-02-19 00:54:30 +0100 |
commit | 3a63b785a9d46a36bf3c9176df397d8f5736f524 (patch) | |
tree | b47456814df849f5900e0efb993327b688a23afb /libs/plugins/reasonablesynth.lv2 | |
parent | 3f8583f8d6b71abca7b070f2fdcbd9fb29c29d38 (diff) |
rsynth: map note-on with zero velocity to note-off
Diffstat (limited to 'libs/plugins/reasonablesynth.lv2')
-rw-r--r-- | libs/plugins/reasonablesynth.lv2/rsynth.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/plugins/reasonablesynth.lv2/rsynth.c b/libs/plugins/reasonablesynth.lv2/rsynth.c index 4e35c0e3c2..e2c8898823 100644 --- a/libs/plugins/reasonablesynth.lv2/rsynth.c +++ b/libs/plugins/reasonablesynth.lv2/rsynth.c @@ -447,6 +447,9 @@ static void synth_parse_midi(void *synth, const uint8_t *data, const size_t size ev.type=NOTE_ON; ev.d.tone.note=data[1]&0x7f; ev.d.tone.velocity=data[2]&0x7f; + if (ev.d.tone.velocity == 0) { + ev.type=NOTE_OFF; + } break; case 0xB0: ev.type=CONTROL_CHANGE; |