diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2016-01-14 16:37:47 -0600 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2016-01-14 16:37:54 -0600 |
commit | ddb362fe170ce7c86c2e7504196b6b2959c374d7 (patch) | |
tree | c8279a8b1f7729a161f2a2eec1b2a52e6eb9e021 /libs/surfaces/generic_midi | |
parent | 368be3585e0e3e06b6a07db79c4161afc707c86a (diff) |
Generic MIDI: add ToggleRecEnable action, and change all maps to use that instead of separate rec-enable, rec-disable, which didnt work
Diffstat (limited to 'libs/surfaces/generic_midi')
-rw-r--r-- | libs/surfaces/generic_midi/midicontrollable.cc | 2 | ||||
-rw-r--r-- | libs/surfaces/generic_midi/midifunction.cc | 7 | ||||
-rw-r--r-- | libs/surfaces/generic_midi/midifunction.h | 1 |
3 files changed, 9 insertions, 1 deletions
diff --git a/libs/surfaces/generic_midi/midicontrollable.cc b/libs/surfaces/generic_midi/midicontrollable.cc index 8945463e97..b036a9d30f 100644 --- a/libs/surfaces/generic_midi/midicontrollable.cc +++ b/libs/surfaces/generic_midi/midicontrollable.cc @@ -374,7 +374,7 @@ MIDIControllable::midi_sense_controller (Parser &, EventTwoBytes *msg) } } else { - if (msg->value > 64.0f) { + if ( msg->value > 0x40 ) { controllable->set_value (1, Controllable::NoGroup); DEBUG_TRACE (DEBUG::GenericMidi, string_compose ("Midi CC %1 value 1 %2\n", (int) msg->controller_number, current_uri())); } else { diff --git a/libs/surfaces/generic_midi/midifunction.cc b/libs/surfaces/generic_midi/midifunction.cc index e9e875b702..1f3535f22c 100644 --- a/libs/surfaces/generic_midi/midifunction.cc +++ b/libs/surfaces/generic_midi/midifunction.cc @@ -58,6 +58,8 @@ MIDIFunction::setup (GenericMidiControlProtocol& ui, const std::string& invokabl _function = TransportEnd; } else if (strcasecmp (_invokable_name.c_str(), "loop-toggle") == 0) { _function = TransportLoopToggle; + } else if (strcasecmp (_invokable_name.c_str(), "toggle-rec-enable") == 0) { + _function = TransportRecordToggle; } else if (strcasecmp (_invokable_name.c_str(), "rec-enable") == 0) { _function = TransportRecordEnable; } else if (strcasecmp (_invokable_name.c_str(), "rec-disable") == 0) { @@ -146,6 +148,11 @@ MIDIFunction::execute () DEBUG_TRACE (DEBUG::GenericMidi, "Function: loop_toggle\n"); break; + case TransportRecordToggle: + _ui->rec_enable_toggle (); + DEBUG_TRACE (DEBUG::GenericMidi, "Function: toggle_record_enable\n"); + break; + case TransportRecordEnable: _ui->set_record_enable (true); DEBUG_TRACE (DEBUG::GenericMidi, "Function: set_record_enable = true\n"); diff --git a/libs/surfaces/generic_midi/midifunction.h b/libs/surfaces/generic_midi/midifunction.h index 948775c843..12340174d4 100644 --- a/libs/surfaces/generic_midi/midifunction.h +++ b/libs/surfaces/generic_midi/midifunction.h @@ -50,6 +50,7 @@ class MIDIFunction : public MIDIInvokable TransportStart, TransportEnd, TransportLoopToggle, + TransportRecordToggle, TransportRecordEnable, TransportRecordDisable, /* 1 argument functions: RID */ |