summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2015-10-03 05:08:26 +1000
committernick_m <mainsbridge@gmail.com>2015-10-20 00:53:28 +1100
commitffed94d89bbc279561e8d670b4aec1a068d7e9a9 (patch)
tree8ef84f10f394f99c6052e6ddc0efc0e20c357014 /libs/ardour
parent16480001082168a25af12239bb43baa7991a99c0 (diff)
Automation - more toggled controller twiddling.
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/automatable.cc10
-rw-r--r--libs/ardour/route.cc26
2 files changed, 19 insertions, 17 deletions
diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc
index cfe2d7a853..0fb048b9ef 100644
--- a/libs/ardour/automatable.cc
+++ b/libs/ardour/automatable.cc
@@ -397,17 +397,19 @@ Automatable::transport_stopped (framepos_t now)
const bool list_did_write = !l->in_new_write_pass ();
l->stop_touch (true, now);
+
if (list_did_write) {
c->commit_transaction ();
}
- l->write_pass_finished (now, Config->get_automation_thinning_factor());
- if (l->automation_state() == Write) {
+ l->write_pass_finished (now, Config->get_automation_thinning_factor ());
+
+ if (l->automation_state () == Write) {
l->set_automation_state (Touch);
}
- if (l->automation_playback()) {
- c->set_value(c->list()->eval(now));
+ if (l->automation_playback ()) {
+ c->set_value (c->list ()->eval (now));
}
}
}
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index adbfefb829..60f4908768 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -3900,22 +3900,22 @@ Route::MuteControllable::set_superficial_value(bool muted)
/* Note we can not use AutomationControl::set_value here since it will emit
Changed(), but the value will not be correct to the observer. */
- /* this is a tweak of ControlList::automation_write ()
- as currently MuteControllable can't be touching.
- bool to_list = _list && ((AutomationList*)_list.get())->automation_write();
- */
- AutomationList* alist = (AutomationList*)_list.get();
- const AutoState as = alist->automation_state ();
- const bool to_list = _list && _session.transport_rolling () && (as == Touch || as == Write);
-
+ const bool to_list = _list && ((AutomationList*)_list.get ())->automation_write ();
+ const double where = _session.audible_frame ();
if (to_list) {
- if (as == Touch && _list->in_new_write_pass ()) {
- alist->start_write_pass (_session.audible_frame ());
- }
- _list->set_in_write_pass (true, false, _session.audible_frame ());
+ /* Note that we really need this:
+ * if (as == Touch && _list->in_new_write_pass ()) {
+ * alist->start_write_pass (_session.audible_frame ());
+ * }
+ * here in the case of the user calling from a GUI or whatever.
+ * Without the ability to distinguish between user and
+ * automation-initiated changes, we lose the "touch mute"
+ * behaviour we have in AutomationController::toggled ().
+ */
+ _list->set_in_write_pass (true, false, where);
}
- Control::set_double (muted, _session.transport_frame(), to_list);
+ Control::set_double (muted, where, to_list);
}
void