summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/automation_line.cc7
-rw-r--r--gtk2_ardour/automation_line.h1
-rw-r--r--libs/ardour/audio_track.cc10
-rw-r--r--libs/ardour/route.cc15
4 files changed, 29 insertions, 4 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc
index 4d39ff9b87..e87dce8367 100644
--- a/gtk2_ardour/automation_line.cc
+++ b/gtk2_ardour/automation_line.cc
@@ -1187,7 +1187,7 @@ AutomationLine::view_to_model_coord_y (double& y) const
}
void
-AutomationLine::model_to_view_coord (double& x, double& y) const
+AutomationLine::model_to_view_coord_y (double& y) const
{
/* TODO: This should be more generic (use ParameterDescriptor) */
if (alist->parameter().type() == GainAutomation ||
@@ -1201,7 +1201,12 @@ AutomationLine::model_to_view_coord (double& x, double& y) const
} else {
y = (y - alist->get_min_y()) / (double)(alist->get_max_y() - alist->get_min_y());
}
+}
+void
+AutomationLine::model_to_view_coord (double& x, double& y) const
+{
+ model_to_view_coord_y (y);
x = _time_converter->to (x) - _offset;
}
diff --git a/gtk2_ardour/automation_line.h b/gtk2_ardour/automation_line.h
index cf940df5be..23fc17617a 100644
--- a/gtk2_ardour/automation_line.h
+++ b/gtk2_ardour/automation_line.h
@@ -122,6 +122,7 @@ public:
void view_to_model_coord (double& x, double& y) const;
void view_to_model_coord_y (double &) const;
void model_to_view_coord (double& x, double& y) const;
+ void model_to_view_coord_y (double &) const;
void set_list(boost::shared_ptr<ARDOUR::AutomationList> list);
boost::shared_ptr<ARDOUR::AutomationList> the_list() const { return alist; }
diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc
index 13d5c43dda..c458668e18 100644
--- a/libs/ardour/audio_track.cc
+++ b/libs/ardour/audio_track.cc
@@ -350,6 +350,16 @@ AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_fram
return dret;
}
+ if (_mute_control->list() && _mute_control->automation_playback()) {
+ bool valid = false;
+ const float mute = _mute_control->list()->rt_safe_eval(transport_frame, valid);
+ if (mute >= 0.5 && !muted()) {
+ _mute_control->set_value(1.0); // mute
+ } else if (mute < 0.5 && muted()) {
+ _mute_control->set_value(0.0); // unmute
+ }
+ }
+
_silent = false;
_amp->apply_gain_automation(false);
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index d67c1bbd86..f35da57b92 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -3392,6 +3392,7 @@ Route::SoloControllable::SoloControllable (std::string name, boost::shared_ptr<R
, _route (r)
{
boost::shared_ptr<AutomationList> gl(new AutomationList(Evoral::Parameter(SoloAutomation)));
+ gl->set_interpolation(Evoral::ControlList::Discrete);
set_list (gl);
}
@@ -3440,6 +3441,7 @@ Route::MuteControllable::MuteControllable (std::string name, boost::shared_ptr<R
, _route (r)
{
boost::shared_ptr<AutomationList> gl(new AutomationList(Evoral::Parameter(MuteAutomation)));
+ gl->set_interpolation(Evoral::ControlList::Discrete);
set_list (gl);
}
@@ -3448,15 +3450,22 @@ Route::MuteControllable::set_value (double val)
{
bool bval = ((val >= 0.5f) ? true: false);
- boost::shared_ptr<RouteList> rl (new RouteList);
+ // boost::shared_ptr<RouteList> rl (new RouteList);
boost::shared_ptr<Route> r = _route.lock ();
if (!r) {
return;
}
- rl->push_back (r);
- _session.set_mute (rl, bval);
+ /* I don't know why this apparently "should" be done via the RT event
+ system, but doing so causes a ton of annoying errors... */
+ // rl->push_back (r);
+ // _session.set_mute (rl, bval);
+
+ /* ... but this seems to work. */
+ r->set_mute (bval, this);
+
+ AutomationControl::set_value(bval);
}
double