mackie: track compressor mode changes in display
This commit is contained in:
parent
1152bf87a2
commit
a9a4cfb166
@ -586,7 +586,7 @@ Strip::notify_eq_change (AutomationType type, uint32_t band, bool force_update)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Strip::notify_dyn_change (AutomationType type, bool force_update)
|
Strip::notify_dyn_change (AutomationType type, bool force_update, bool propagate_mode)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Route> r = _surface->mcp().subview_route();
|
boost::shared_ptr<Route> r = _surface->mcp().subview_route();
|
||||||
|
|
||||||
@ -601,6 +601,7 @@ Strip::notify_dyn_change (AutomationType type, bool force_update)
|
|||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<AutomationControl> control;
|
boost::shared_ptr<AutomationControl> control;
|
||||||
|
bool reset_all = false;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case CompThreshold:
|
case CompThreshold:
|
||||||
@ -611,6 +612,7 @@ Strip::notify_dyn_change (AutomationType type, bool force_update)
|
|||||||
break;
|
break;
|
||||||
case CompMode:
|
case CompMode:
|
||||||
control = r->comp_mode_controllable ();
|
control = r->comp_mode_controllable ();
|
||||||
|
reset_all = true;
|
||||||
break;
|
break;
|
||||||
case CompMakeup:
|
case CompMakeup:
|
||||||
control = r->comp_makeup_controllable ();
|
control = r->comp_makeup_controllable ();
|
||||||
@ -625,6 +627,10 @@ Strip::notify_dyn_change (AutomationType type, bool force_update)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (propagate_mode && reset_all) {
|
||||||
|
_surface->subview_mode_changed ();
|
||||||
|
}
|
||||||
|
|
||||||
if (control) {
|
if (control) {
|
||||||
float val = control->get_value();
|
float val = control->get_value();
|
||||||
queue_parameter_display (type, val);
|
queue_parameter_display (type, val);
|
||||||
@ -764,7 +770,7 @@ Strip::select_event (Button&, ButtonState bs)
|
|||||||
void
|
void
|
||||||
Strip::vselect_event (Button&, ButtonState bs)
|
Strip::vselect_event (Button&, ButtonState bs)
|
||||||
{
|
{
|
||||||
if (_surface->mcp().subview_mode() != None) {
|
if (_surface->mcp().subview_mode() != MackieControlProtocol::None) {
|
||||||
|
|
||||||
/* subview mode: vpot press acts like a button for toggle parameters */
|
/* subview mode: vpot press acts like a button for toggle parameters */
|
||||||
|
|
||||||
@ -1489,11 +1495,19 @@ Strip::subview_mode_changed ()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MackieControlProtocol::EQ:
|
case MackieControlProtocol::EQ:
|
||||||
setup_eq_vpot (r);
|
if (r) {
|
||||||
|
setup_eq_vpot (r);
|
||||||
|
} else {
|
||||||
|
/* leave it as it was */
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MackieControlProtocol::Dynamics:
|
case MackieControlProtocol::Dynamics:
|
||||||
setup_dyn_vpot (r);
|
if (r) {
|
||||||
|
setup_dyn_vpot (r);
|
||||||
|
} else {
|
||||||
|
/* leave it as it was */
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1542,7 +1556,7 @@ Strip::setup_dyn_vpot (boost::shared_ptr<Route> r)
|
|||||||
pc = available[pos];
|
pc = available[pos];
|
||||||
param = params[pos];
|
param = params[pos];
|
||||||
|
|
||||||
pc->Changed.connect (subview_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_dyn_change, this, param, false), ui_context());
|
pc->Changed.connect (subview_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_dyn_change, this, param, false, true), ui_context());
|
||||||
_vpot->set_control (pc);
|
_vpot->set_control (pc);
|
||||||
|
|
||||||
string pot_id;
|
string pot_id;
|
||||||
@ -1552,7 +1566,11 @@ Strip::setup_dyn_vpot (boost::shared_ptr<Route> r)
|
|||||||
pot_id = "Thresh";
|
pot_id = "Thresh";
|
||||||
break;
|
break;
|
||||||
case CompSpeed:
|
case CompSpeed:
|
||||||
pot_id = "Speed";
|
if (mc) {
|
||||||
|
pot_id = r->comp_speed_name (mc->get_value());
|
||||||
|
} else {
|
||||||
|
pot_id = "Speed";
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case CompMode:
|
case CompMode:
|
||||||
pot_id = "Mode";
|
pot_id = "Mode";
|
||||||
@ -1574,7 +1592,7 @@ Strip::setup_dyn_vpot (boost::shared_ptr<Route> r)
|
|||||||
_surface->write (display (0, pot_id));
|
_surface->write (display (0, pot_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
notify_dyn_change (param, true);
|
notify_dyn_change (param, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -174,7 +174,7 @@ private:
|
|||||||
void notify_eq_change (ARDOUR::AutomationType, uint32_t band, bool force);
|
void notify_eq_change (ARDOUR::AutomationType, uint32_t band, bool force);
|
||||||
void setup_eq_vpot (boost::shared_ptr<ARDOUR::Route>);
|
void setup_eq_vpot (boost::shared_ptr<ARDOUR::Route>);
|
||||||
|
|
||||||
void notify_dyn_change (ARDOUR::AutomationType, bool force);
|
void notify_dyn_change (ARDOUR::AutomationType, bool force, bool propagate_mode_change);
|
||||||
void setup_dyn_vpot (boost::shared_ptr<ARDOUR::Route>);
|
void setup_dyn_vpot (boost::shared_ptr<ARDOUR::Route>);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user