diff options
author | Robin Gareus <robin@gareus.org> | 2017-06-13 18:09:22 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-06-13 18:09:59 +0200 |
commit | c1912b6d516b69db67757687de38a115b3b6ab69 (patch) | |
tree | cf1e91a94e56d6973a4acffe2c930bf8db60ab64 /libs/ardour/automation_watch.cc | |
parent | b34d891b23e0268f50e171a2149f425987598902 (diff) |
Write inverse master automation.
* The UI and ctrl-surface controls use and display the combined value,
including control-masters.
* The Automation lane of a control is the raw value of the control
without masters.
When touching (or writing) automation, the control-master needs to be
factored out (or subtracted). e.g press+hold a control -> write inverse
master automation.
Diffstat (limited to 'libs/ardour/automation_watch.cc')
-rw-r--r-- | libs/ardour/automation_watch.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/ardour/automation_watch.cc b/libs/ardour/automation_watch.cc index 954b65120b..21d1b6a49d 100644 --- a/libs/ardour/automation_watch.cc +++ b/libs/ardour/automation_watch.cc @@ -149,7 +149,12 @@ AutomationWatch::timer () if (time > _last_time) { //we only write automation in the forward direction; this fixes automation-recording in a loop for (AutomationWatches::iterator aw = automation_watches.begin(); aw != automation_watches.end(); ++aw) { if ((*aw)->alist()->automation_write()) { - (*aw)->list()->add (time, (*aw)->user_double(), true); + double val = (*aw)->user_double(); + boost::shared_ptr<SlavableAutomationControl> sc = boost::dynamic_pointer_cast<SlavableAutomationControl> (*aw); + if (sc) { + val = sc->reduce_by_masters (val, true); + } + (*aw)->list()->add (time, val, true); } } } else if (time != _last_time) { //transport stopped or reversed. stop the automation pass and start a new one (for bonus points, someday store the previous pass in an undo record) |