- case TrimAutomation:
- _trim_mode = TrimAutomation;
- vpot_parameter = TrimAutomation;
- if (_surface->mcp().flip_mode() != MackieControlProtocol::Normal) {
- /* gain to vpot, trim to fader */
- _vpot->set_control (_route->group_gain_control());
- control_by_parameter[GainAutomation] = _vpot;
- if (_route->trim() && route()->trim()->active()) {
- _fader->set_control (_route->trim_control());
- control_by_parameter[TrimAutomation] = _fader;
- } else {
- _fader->set_control (boost::shared_ptr<AutomationControl>());
- control_by_parameter[TrimAutomation] = 0;
- }
- } else {
- /* gain to fader, trim to vpot */
- _fader->set_control (_route->group_gain_control());
- control_by_parameter[GainAutomation] = _fader;
- if (_route->trim() && route()->trim()->active()) {
- _vpot->set_control (_route->trim_control());
- control_by_parameter[TrimAutomation] = _vpot;
- } else {
- _vpot->set_control (boost::shared_ptr<AutomationControl>());
- control_by_parameter[TrimAutomation] = 0;
- }
- }
- break;
- case PhaseAutomation:
- _trim_mode = PhaseAutomation;
- vpot_parameter = PhaseAutomation;
- if (_surface->mcp().flip_mode() != MackieControlProtocol::Normal) {
- /* gain to vpot, phase to fader */
- _vpot->set_control (_route->group_gain_control());
- control_by_parameter[GainAutomation] = _vpot;
- if (_route->phase_invert().size()) {
- _fader->set_control (_route->phase_control());
- control_by_parameter[PhaseAutomation] = _fader;
- } else {
- _fader->set_control (boost::shared_ptr<AutomationControl>());
- control_by_parameter[PhaseAutomation] = 0;
- }
- } else {
- /* gain to fader, phase to vpot */
- _fader->set_control (_route->group_gain_control());
- control_by_parameter[GainAutomation] = _fader;
- if (_route->phase_invert().size()) {
- _vpot->set_control (_route->phase_control());
- control_by_parameter[PhaseAutomation] = _vpot;
- } else {
- _vpot->set_control (boost::shared_ptr<AutomationControl>());
- control_by_parameter[PhaseAutomation] = 0;
- }
- }
- break;
- case SendAutomation:
- if (!Profile->get_mixbus()) {
- if (_surface->mcp().flip_mode() != MackieControlProtocol::Normal) {
- // gain to vpot, send to fader
- _vpot->set_control (_route->group_gain_control());
- control_by_parameter[GainAutomation] = _vpot;
- // test for send to control
- boost::shared_ptr<Processor> p = _route->nth_send (_current_send);
- if (p && p->name() != "Monitor 1") {
- boost::shared_ptr<Send> s = boost::dynamic_pointer_cast<Send>(p);
- boost::shared_ptr<Amp> a = s->amp();
- _fader->set_control (a->gain_control());
- // connect to signal
- send_connections.drop_connections ();
- a->gain_control()->Changed.connect(send_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_processor_changed, this, false), ui_context());
- control_by_parameter[SendAutomation] = _fader;
- } else {
- _fader->set_control (boost::shared_ptr<AutomationControl>());
- control_by_parameter[SendAutomation] = 0;
- }
- } else {
- // gain to fader, send to vpot
- _fader->set_control (_route->group_gain_control());
- control_by_parameter[GainAutomation] = _fader;
- boost::shared_ptr<Processor> p = _route->nth_send (_current_send);
- if (p && p->name() != "Monitor 1") {
- boost::shared_ptr<Send> s = boost::dynamic_pointer_cast<Send>(p);
- boost::shared_ptr<Amp> a = s->amp();
- _vpot->set_control (a->gain_control());
- // connect to signal
- send_connections.drop_connections ();
- a->gain_control()->Changed.connect(send_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_processor_changed, this, false), ui_context());
- control_by_parameter[SendAutomation] = _vpot;
- } else {
- // gain to fader, send to vpot
- _fader->set_control (_route->group_gain_control());
- control_by_parameter[GainAutomation] = _fader;
- boost::shared_ptr<Processor> p = _route->nth_send (_current_send);
- if (p && p->name() != "Monitor 1") {
- boost::shared_ptr<Send> s = boost::dynamic_pointer_cast<Send>(p);
- boost::shared_ptr<Amp> a = s->amp();
- _vpot->set_control (a->gain_control());
- // connect to signal
- send_connections.drop_connections ();
- a->gain_control()->Changed.connect(send_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_processor_changed, this, false), ui_context());
- control_by_parameter[SendAutomation] = _vpot;
- } else {
- _vpot->set_control (boost::shared_ptr<AutomationControl>());
- control_by_parameter[SendAutomation] = 0;
- }
- }
- }
- }
- break;