13
0

mackie: hard-code drop+replace buttons to start/finish-range-from-playhead

With some LED action that would even better with blinking
This commit is contained in:
Paul Davis 2016-01-31 11:02:21 -05:00
parent af1028bd90
commit b78be4d705
2 changed files with 13 additions and 3 deletions

View File

@ -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, ' ');

View File

@ -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&)