From 3631cc1532341c8f4917a4160f9821fa8aa7e8a8 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 31 Jan 2016 11:59:55 -0500 Subject: mackie: remove Trim pot mode, and add skeleton for TrackView subview mode --- libs/surfaces/mackie/mackie_control_protocol.cc | 23 ++++++--- libs/surfaces/mackie/mackie_control_protocol.h | 2 +- libs/surfaces/mackie/mcp_buttons.cc | 2 +- libs/surfaces/mackie/strip.cc | 65 +++++-------------------- libs/surfaces/mackie/strip.h | 2 + 5 files changed, 32 insertions(+), 62 deletions(-) diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index 260fe9a26e..63f527457a 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -1681,6 +1681,11 @@ MackieControlProtocol::subview_mode_would_be_ok (SubViewMode mode, boost::shared return true; } break; + + case TrackView: + if (r) { + return true; + } } return false; @@ -1730,6 +1735,8 @@ MackieControlProtocol::set_subview_mode (SubViewMode sm, boost::shared_ptr r, bool /*with_messages*/) control_by_parameter[PanFrontBackAutomation] = (Control*) 0; control_by_parameter[PanLFEAutomation] = (Control*) 0; control_by_parameter[GainAutomation] = (Control*) 0; - control_by_parameter[TrimAutomation] = (Control*) 0; control_by_parameter[PhaseAutomation] = (Control*) 0; reset_saved_values (); @@ -269,23 +267,9 @@ Strip::set_route (boost::shared_ptr r, bool /*with_messages*/) possible_pot_parameters.push_back (PanLFEAutomation); } - if (_route->trim() && route()->trim()->active()) { - possible_pot_parameters.push_back (TrimAutomation); - } - - possible_trim_parameters.clear(); - - if (_route->trim() && route()->trim()->active()) { - possible_trim_parameters.push_back (TrimAutomation); - _trim_mode = TrimAutomation; - } - if (_route->phase_invert().size()) { possible_trim_parameters.push_back (PhaseAutomation); _route->phase_control()->set_channel(0); - if (_trim_mode != TrimAutomation) { - _trim_mode = PhaseAutomation; - } } _current_send = 0; /* Update */ @@ -1343,10 +1327,6 @@ Strip::potmode_changed (bool notify) DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Assign pot to Pan mode %1\n", enum_2_string (_pan_mode))); set_vpot_parameter (_pan_mode); break; - case MackieControlProtocol::Trim: - DEBUG_TRACE (DEBUG::MackieControl, "Assign pot to Trim mode.\n"); - set_vpot_parameter (_trim_mode); - break; } if (notify) { @@ -1428,38 +1408,6 @@ Strip::next_pot_mode () i = possible_pot_parameters.begin(); } - set_vpot_parameter (*i); - } else if (_surface->mcp().pot_mode() == MackieControlProtocol::Trim) { - if (possible_trim_parameters.empty() || (possible_trim_parameters.size() == 1 && possible_trim_parameters.front() == ac->parameter().type())) { - return; - } - - for (i = possible_trim_parameters.begin(); i != possible_trim_parameters.end(); ++i) { - if ((*i) == ac->parameter().type()) { - break; - } - } - if ((*i) == PhaseAutomation && _route->phase_invert().size() > 1) { - // There are more than one channel of phase - if ((_route->phase_control()->channel() + 1) < _route->phase_invert().size()) { - _route->phase_control()->set_channel(_route->phase_control()->channel() + 1); - set_vpot_parameter (*i); - return; - } else { - _route->phase_control()->set_channel(0); - } - } - /* move to the next mode in the list, or back to the start (which will - also happen if the current mode is not in the current pot mode list) - */ - - if (i != possible_trim_parameters.end()) { - ++i; - } - - if (i == possible_trim_parameters.end()) { - i = possible_trim_parameters.begin(); - } set_vpot_parameter (*i); } } @@ -1505,9 +1453,22 @@ Strip::subview_mode_changed () } eq_band = -1; break; + case MackieControlProtocol::TrackView: + if (r) { + setup_trackview_vpot (r); + } else { + /* leave it as it was */ + } + eq_band = -1; + break; } } +void +Strip::setup_trackview_vpot (boost::shared_ptr r) +{ +} + void Strip::setup_dyn_vpot (boost::shared_ptr r) { diff --git a/libs/surfaces/mackie/strip.h b/libs/surfaces/mackie/strip.h index 626389c2fe..f1bf6d758d 100644 --- a/libs/surfaces/mackie/strip.h +++ b/libs/surfaces/mackie/strip.h @@ -177,6 +177,8 @@ private: void notify_send_level_change (ARDOUR::AutomationType, uint32_t band, bool force); void setup_sends_vpot (boost::shared_ptr); + + void setup_trackview_vpot (boost::shared_ptr); }; } -- cgit v1.2.3