[SCM] jack-keyboard/master: Add patch to fix pianola mode (Closes: #625282).
alessio at users.alioth.debian.org
alessio at users.alioth.debian.org
Tue May 3 06:14:48 UTC 2011
The following commit has been merged in the master branch:
commit 0eda233aa1f1e46b7317b5f998ad7ac9d7215490
Author: Alessio Treglia <alessio at debian.org>
Date: Tue May 3 08:14:11 2011 +0200
Add patch to fix pianola mode (Closes: #625282).
Thanks to Dan Muresan for the report and patch!
diff --git a/debian/patches/0005-fix_pianola_mode.patch b/debian/patches/0005-fix_pianola_mode.patch
new file mode 100644
index 0000000..b9c6b53
--- /dev/null
+++ b/debian/patches/0005-fix_pianola_mode.patch
@@ -0,0 +1,47 @@
+Description: jack-keyboard should pass through incoming MIDI
+ messages but replace the channel number with its own. The
+ code only recognized incoming messages sent on MIDI channel
+ 0 though, and did not rewrite the channel at all.
+Author: Dan Muresan <danmbox3 at yahoo.ro>
+Bug-Debian: http://bugs.debian.org
+Forwarded: no
+---
+ src/jack-keyboard.c | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+--- jack-keyboard.orig/src/jack-keyboard.c
++++ jack-keyboard/src/jack-keyboard.c
+@@ -199,23 +199,29 @@ process_received_message_async(gpointer
+ {
+ int i;
+ struct MidiMessage *ev = (struct MidiMessage *)evp;
++ int b0 = ev->data [0], b1 = ev->data [1];
+
+- if (ev->data[0] == MIDI_RESET || (ev->data[0] == MIDI_CONTROLLER &&
+- (ev->data[1] == MIDI_ALL_NOTES_OFF || ev->data[1] == MIDI_ALL_SOUND_OFF))) {
++ /* Strip channel from channel messages */
++ if (b0 >= 0x80 && b0 <= 0xEF)
++ b0 = b0 & 0xF0;
++
++ if (b0 == MIDI_RESET || (b0 == MIDI_CONTROLLER &&
++ (b1 == MIDI_ALL_NOTES_OFF || b1 == MIDI_ALL_SOUND_OFF))) {
+
+ for (i = 0; i < NNOTES; i++) {
+ piano_keyboard_set_note_off(keyboard, i);
+ }
+ }
+
+- if (ev->data[0] == MIDI_NOTE_ON) {
++ if (b0 == MIDI_NOTE_ON) {
+ piano_keyboard_set_note_on(keyboard, ev->data[1]);
+ }
+
+- if (ev->data[0] == MIDI_NOTE_OFF) {
++ if (b0 == MIDI_NOTE_OFF) {
+ piano_keyboard_set_note_off(keyboard, ev->data[1]);
+ }
+
++ ev->data [0] = b0 | channel;
+ queue_message(ev);
+
+ return FALSE;
diff --git a/debian/patches/series b/debian/patches/series
index eb37560..e4c0a1c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,4 +2,5 @@
0002-document_dvorak_support.patch
0003-midi_programs.patch
0004-desktop_file.patch
+0005-fix_pianola_mode.patch
1001-manpage_errors.patch
--
jack-keyboard packaging
More information about the pkg-multimedia-commits
mailing list