diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-01-31 11:02:21 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-01-31 11:02:21 -0500 |
commit | b78be4d7050091143d5b5e71681a36995ff3e496 (patch) | |
tree | 29130af8f306135a332f80ffb010204c7423b5b4 | |
parent | af1028bd90785dda5f5067a0f63523cb2760eb56 (diff) |
mackie: hard-code drop+replace buttons to start/finish-range-from-playhead
With some LED action that would even better with blinking
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.cc | 5 | ||||
-rw-r--r-- | libs/surfaces/mackie/mcp_buttons.cc | 11 |
2 files changed, 13 insertions, 3 deletions
diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index c8ae29b6b9..69db5893ce 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -1327,6 +1327,11 @@ MackieControlProtocol::notify_transport_state_changed() update_global_button (Button::Rewind, session->transport_speed() < 0.0); update_global_button (Button::Ffwd, session->transport_speed() > 1.0); + /* turn off any LEDs for range buttons */ + + update_global_button (Button::Drop, off); + update_global_button (Button::Replace, off); + // sometimes a return to start leaves time code at old time _timecode_last = string (10, ' '); diff --git a/libs/surfaces/mackie/mcp_buttons.cc b/libs/surfaces/mackie/mcp_buttons.cc index 0ead9edca1..d06cd2907d 100644 --- a/libs/surfaces/mackie/mcp_buttons.cc +++ b/libs/surfaces/mackie/mcp_buttons.cc @@ -60,6 +60,7 @@ LedState MackieControlProtocol::option_press (Button &) { _modifier_state |= MODIFIER_OPTION; + gui_invoke ("Editor/set-loop-from-edit-range"); return on; } LedState @@ -73,6 +74,7 @@ MackieControlProtocol::control_press (Button &) { _modifier_state |= MODIFIER_CONTROL; DEBUG_TRACE (DEBUG::MackieControl, string_compose ("CONTROL Press: modifier state now set to %1\n", _modifier_state)); + gui_invoke ("Editor/set-punch-from-edit-range"); return on; } LedState @@ -86,6 +88,7 @@ LedState MackieControlProtocol::cmd_alt_press (Button &) { _modifier_state |= MODIFIER_CMDALT; + gui_invoke ("Editor/set-session-from-edit-range"); return on; } LedState @@ -360,14 +363,14 @@ MackieControlProtocol::undo_release (Button&) LedState MackieControlProtocol::drop_press (Button &) { - session->remove_last_capture(); + gui_invoke ("Editor/start-range-from-playhead"); return on; } LedState MackieControlProtocol::drop_release (Button &) { - return off; + return none; } LedState @@ -1025,7 +1028,9 @@ MackieControlProtocol::nudge_release (Mackie::Button&) Mackie::LedState MackieControlProtocol::replace_press (Mackie::Button&) { - return none; + gui_invoke ("Editor/finish-range-from-playhead"); + update_global_button (Button::Drop, off); + return off; } Mackie::LedState MackieControlProtocol::replace_release (Mackie::Button&) |