MCP: hack #2 for Nucleus fader touch messages
authorPaul Davis <paul@linuxaudiosystems.com>
Sat, 14 Apr 2012 01:02:40 +0000 (01:02 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Sat, 14 Apr 2012 01:02:40 +0000 (01:02 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@11969 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/surfaces/mackie/surface.cc

index 171ac92d8df8ddc4b3958246e46594dc8b1fc198..2f87b844f085aaeeef56b092ff0e86ef5527e474 100644 (file)
@@ -376,12 +376,12 @@ Surface::handle_midi_note_on_message (MIDI::Parser &, MIDI::EventTwoBytes* ev)
 
                if (strip) {
                        DEBUG_TRACE (DEBUG::MackieControl, string_compose ("strip %1 button %2 pressed ? %3\n",
-                                                                          strip->index(), button->name(), (ev->velocity == 0x7f)));
-                       strip->handle_button (*button, ev->velocity == 0x7f ? press : release);
+                                                                          strip->index(), button->name(), (ev->velocity > 64)));
+                       strip->handle_button (*button, ev->velocity > 64 ? press : release);
                } else {
                        /* global button */
                        DEBUG_TRACE (DEBUG::MackieControl, string_compose ("global button %1\n", button->id()));
-                       _mcp.handle_button_event (*this, *button, ev->velocity == 0x7f ? press : release);
+                       _mcp.handle_button_event (*this, *button, ev->velocity > 64 ? press : release);
                }
        } else {
                DEBUG_TRACE (DEBUG::MackieControl, string_compose ("no button found for %1\n", ev->note_number));