From 7ce94fc841da1fc32c81d0d468515b926c798458 Mon Sep 17 00:00:00 2001 From: hselasky Date: Fri, 6 May 2011 07:10:20 +0000 Subject: [PATCH] Bugfix: A key volume of zero means key off. git-svn-id: svn://svn.code.sf.net/p/jack-keyboard/code/trunk@14 1fa2bf75-7d80-4145-9e94-f9b4e25a1cb2 --- NEWS | 4 ++++ src/jack-keyboard.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 269b27e..f31fea1 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +User-visible changes between 2.5 and 2.6 include: + + - Bugfix: A key volume of zero means key off. + User-visible changes between 2.4 and 2.5 include: - Autotools. This should make life easier for distributors. ;-) diff --git a/src/jack-keyboard.c b/src/jack-keyboard.c index 943140e..4c18caa 100644 --- a/src/jack-keyboard.c +++ b/src/jack-keyboard.c @@ -209,7 +209,10 @@ process_received_message_async(gpointer evp) } if (ev->data[0] == MIDI_NOTE_ON) { - piano_keyboard_set_note_on(keyboard, ev->data[1]); + if (ev->data[2] == 0) + piano_keyboard_set_note_off(keyboard, ev->data[1]); + else + piano_keyboard_set_note_on(keyboard, ev->data[1]); } if (ev->data[0] == MIDI_NOTE_OFF) {