From b6a1144472ebf0c7925aa46b8ce69be6bd72e5f3 Mon Sep 17 00:00:00 2001 From: Caleb Potter Date: Fri, 4 Mar 2022 14:24:37 -0600 Subject: [PATCH] adds a few general purpose MCP button functions Adds a function to go to the next and previous marker. Adds a function to redo (without requiring a shift modifier). Adds a function to open a project. --- .../surfaces/mackie/mackie_control_protocol.h | 8 +++ libs/surfaces/mackie/mcp_buttons.cc | 52 +++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/libs/surfaces/mackie/mackie_control_protocol.h b/libs/surfaces/mackie/mackie_control_protocol.h index f54d099bdb..8563a23c4e 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.h +++ b/libs/surfaces/mackie/mackie_control_protocol.h @@ -511,8 +511,16 @@ class MackieControlProtocol Mackie::LedState view_release (Mackie::Button&); Mackie::LedState bank_release (Mackie::Button&, uint32_t bank_num); + Mackie::LedState redo_press(Mackie::Button &); + Mackie::LedState redo_release(Mackie::Button &); + Mackie::LedState prev_marker_press(Mackie::Button &); + Mackie::LedState prev_marker_release(Mackie::Button &); + Mackie::LedState next_marker_press(Mackie::Button &); + Mackie::LedState next_marker_release(Mackie::Button &); Mackie::LedState flip_window_press (Mackie::Button&); Mackie::LedState flip_window_release (Mackie::Button&); + Mackie::LedState open_press(Mackie::Button &); + Mackie::LedState open_release(Mackie::Button &); }; } // namespace diff --git a/libs/surfaces/mackie/mcp_buttons.cc b/libs/surfaces/mackie/mcp_buttons.cc index 15bfe72e5b..248783ee86 100644 --- a/libs/surfaces/mackie/mcp_buttons.cc +++ b/libs/surfaces/mackie/mcp_buttons.cc @@ -383,6 +383,19 @@ MackieControlProtocol::undo_release (Button&) return none; } +LedState +MackieControlProtocol::redo_press (Button &) +{ + redo (); + return on; +} + +LedState +MackieControlProtocol::redo_release (Button &) +{ + return off; +} + LedState MackieControlProtocol::drop_press (Button &) { @@ -419,6 +432,19 @@ MackieControlProtocol::save_release (Button &) return none; } +LedState +MackieControlProtocol::open_press (Button &) +{ + access_action ("Main/Open"); + return on; +} + +LedState +MackieControlProtocol::open_release (Button &) +{ + return off; +} + LedState MackieControlProtocol::timecode_beats_press (Button &) { @@ -495,6 +521,32 @@ MackieControlProtocol::marker_release (Button &) return off; } +LedState +MackieControlProtocol::prev_marker_press (Button &) +{ + prev_marker (); + return on; +} + +LedState +MackieControlProtocol::prev_marker_release (Button &) +{ + return off; +} + +LedState +MackieControlProtocol::next_marker_press (Button &) +{ + next_marker (); + return on; +} + +LedState +MackieControlProtocol::next_marker_release (Button &) +{ + return off; +} + LedState MackieControlProtocol::flip_window_press (Button &) {