X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fsurfaces%2Fgeneric_midi%2Fmidiinvokable.cc;h=f0a5e6161104ee8408bde214df83814c7c6e0b27;hb=24f64b3ea7386ace6d584503fe1397eb4f611dfe;hp=42c74553d8b9a61f3d476cc5e505d83194eb33ce;hpb=1ab61b8564f9934c533d1c1a229888bc7e2fd557;p=ardour.git diff --git a/libs/surfaces/generic_midi/midiinvokable.cc b/libs/surfaces/generic_midi/midiinvokable.cc index 42c74553d8..f0a5e61611 100644 --- a/libs/surfaces/generic_midi/midiinvokable.cc +++ b/libs/surfaces/generic_midi/midiinvokable.cc @@ -1,6 +1,6 @@ /* Copyright (C) 2009 Paul Davis - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -75,7 +75,7 @@ MIDIInvokable::midi_sense_note (Parser &, EventTwoBytes *msg, bool /* is_on */) void MIDIInvokable::midi_sense_controller (Parser &, EventTwoBytes *msg) { - if (control_additional == msg->controller_number) { + if (control_additional == msg->controller_number && msg->value > 0x40 ) { execute (); } } @@ -141,7 +141,7 @@ MIDIInvokable::bind_midi (channel_t chn, eventType ev, MIDI::byte additional) case MIDI::on: _parser.channel_note_on[chn_i].connect_same_thread (midi_sense_connection[0], boost::bind (&MIDIInvokable::midi_sense_note_on, this, _1, _2)); break; - + case MIDI::controller: _parser.channel_controller[chn_i].connect_same_thread (midi_sense_connection[0], boost::bind (&MIDIInvokable::midi_sense_controller, this, _1, _2)); break;