diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-01-31 11:59:55 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-01-31 13:20:18 -0500 |
commit | 3631cc1532341c8f4917a4160f9821fa8aa7e8a8 (patch) | |
tree | 1e9c65c7953e1953bd97b87c2a396341f17f377b | |
parent | e8348ecc1c36160aae32ed02bc53a615c5e849a8 (diff) |
mackie: remove Trim pot mode, and add skeleton for TrackView subview mode
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.cc | 23 | ||||
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.h | 2 | ||||
-rw-r--r-- | libs/surfaces/mackie/mcp_buttons.cc | 2 | ||||
-rw-r--r-- | libs/surfaces/mackie/strip.cc | 65 | ||||
-rw-r--r-- | 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<Route case Dynamics: msg = _("no dynamics in selected track/bus"); break; + case TrackView: + msg = _("no track view possible"); default: break; } @@ -1802,6 +1809,14 @@ MackieControlProtocol::set_subview_mode (SubViewMode sm, boost::shared_ptr<Route update_global_button (Button::Track, off); update_global_button (Button::Pan, off); break; + case MackieControlProtocol::TrackView: + update_global_button (Button::Send, on); + update_global_button (Button::Plugin, off); + update_global_button (Button::Eq, off); + update_global_button (Button::Dyn, off); + update_global_button (Button::Track, on); + update_global_button (Button::Pan, off); + break; } } } @@ -1887,14 +1902,6 @@ void MackieControlProtocol::pot_mode_globals () { switch (_pot_mode) { - case Trim: - update_global_button (Button::Eq, off); - update_global_button (Button::Dyn, off); - update_global_button (Button::Track, on); - update_global_button (Button::Send, off); - update_global_button (Button::Plugin, off); - update_global_button (Button::Pan, off); - break; case Pan: update_global_button (Button::Eq, off); update_global_button (Button::Dyn, off); diff --git a/libs/surfaces/mackie/mackie_control_protocol.h b/libs/surfaces/mackie/mackie_control_protocol.h index 45451e77fe..3b0337e49a 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.h +++ b/libs/surfaces/mackie/mackie_control_protocol.h @@ -120,10 +120,10 @@ class MackieControlProtocol EQ, Dynamics, Sends, + TrackView, }; enum PotMode { - Trim, Pan, }; diff --git a/libs/surfaces/mackie/mcp_buttons.cc b/libs/surfaces/mackie/mcp_buttons.cc index 83dae4c0dd..b24a53f537 100644 --- a/libs/surfaces/mackie/mcp_buttons.cc +++ b/libs/surfaces/mackie/mcp_buttons.cc @@ -886,7 +886,7 @@ MackieControlProtocol::clearsolo_release (Mackie::Button&) Mackie::LedState MackieControlProtocol::track_press (Mackie::Button&) { - set_pot_mode (Trim); + set_subview_mode (TrackView, first_selected_route()); return none; } Mackie::LedState diff --git a/libs/surfaces/mackie/strip.cc b/libs/surfaces/mackie/strip.cc index 245f511241..d7f37da571 100644 --- a/libs/surfaces/mackie/strip.cc +++ b/libs/surfaces/mackie/strip.cc @@ -102,7 +102,6 @@ Strip::Strip (Surface& s, const std::string& name, int index, const map<Button:: , return_to_vpot_mode_display_at (UINT64_MAX) , eq_band (-1) , _pan_mode (PanAzimuthAutomation) - , _trim_mode (TrimAutomation) , vpot_parameter (PanAzimuthAutomation) , _last_gain_position_written (-1.0) , _last_pan_azi_position_written (-1.0) @@ -193,7 +192,6 @@ Strip::set_route (boost::shared_ptr<Route> 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<Route> 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) { @@ -1429,38 +1409,6 @@ Strip::next_pot_mode () } 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,10 +1453,23 @@ 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<Route> r) +{ +} + +void Strip::setup_dyn_vpot (boost::shared_ptr<Route> r) { if (!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<ARDOUR::Route>); + + void setup_trackview_vpot (boost::shared_ptr<ARDOUR::Route>); }; } |