diff options
author | cbdev <cb@cbcdn.com> | 2019-11-22 17:03:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-22 17:03:37 +0100 |
commit | 44fa8625455ad161fccad337ab48e49fe587b52c (patch) | |
tree | 1d5606d3589bb4ef18ecc863c8ec3e371f46d694 /backends | |
parent | b60c1adbf3c66c42997020539f8bb8a0eb6250c9 (diff) | |
parent | 1aa8b88a1df5539fa7ad4004cfcbf3b8438486b4 (diff) | |
download | midimonster-44fa8625455ad161fccad337ab48e49fe587b52c.tar.gz midimonster-44fa8625455ad161fccad337ab48e49fe587b52c.tar.bz2 midimonster-44fa8625455ad161fccad337ab48e49fe587b52c.zip |
Always output 0 channel value on for MIDI note-off (#34)
Diffstat (limited to 'backends')
-rw-r--r-- | backends/midi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/backends/midi.c b/backends/midi.c index 536457d..cde278b 100644 --- a/backends/midi.c +++ b/backends/midi.c @@ -265,6 +265,9 @@ static int midi_handle(size_t num, managed_fd* fds){ ident.fields.channel = ev->data.note.channel; ident.fields.control = ev->data.note.note; val.normalised = (double)ev->data.note.velocity / 127.0; + if(ev->type == SND_SEQ_EVENT_NOTEOFF){ + val.normalised = 0; + } event_type = "note"; break; case SND_SEQ_EVENT_KEYPRESS: |