summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/slavable_automation_control.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-06-13 18:09:22 +0200
committerRobin Gareus <robin@gareus.org>2017-06-13 18:09:59 +0200
commitc1912b6d516b69db67757687de38a115b3b6ab69 (patch)
treecf1e91a94e56d6973a4acffe2c930bf8db60ab64 /libs/ardour/ardour/slavable_automation_control.h
parentb34d891b23e0268f50e171a2149f425987598902 (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/ardour/slavable_automation_control.h')
-rw-r--r--libs/ardour/ardour/slavable_automation_control.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/ardour/ardour/slavable_automation_control.h b/libs/ardour/ardour/slavable_automation_control.h
index b24409b0a5..3cfc22405c 100644
--- a/libs/ardour/ardour/slavable_automation_control.h
+++ b/libs/ardour/ardour/slavable_automation_control.h
@@ -45,11 +45,18 @@ public:
void clear_masters ();
bool slaved_to (boost::shared_ptr<AutomationControl>) const;
bool slaved () const;
+
double get_masters_value () const {
Glib::Threads::RWLock::ReaderLock lm (master_lock);
return get_masters_value_locked ();
}
+ /* factor out get_masters_value() */
+ double reduce_by_masters (double val, bool ignore_automation_state = false) const {
+ Glib::Threads::RWLock::ReaderLock lm (master_lock);
+ return reduce_by_masters_locked (val, ignore_automation_state);
+ }
+
bool get_masters_curve (framepos_t s, framepos_t e, float* v, framecnt_t l) const {
Glib::Threads::RWLock::ReaderLock lm (master_lock);
return get_masters_curve_locked (s, e, v, l);
@@ -130,6 +137,8 @@ protected:
virtual bool get_masters_curve_locked (framepos_t, framepos_t, float*, framecnt_t) const;
bool masters_curve_multiply (framepos_t, framepos_t, float*, framecnt_t) const;
+ virtual double reduce_by_masters_locked (double val, bool) const;
+
virtual bool handle_master_change (boost::shared_ptr<AutomationControl>);
virtual bool boolean_automation_run_locked (framepos_t start, pframes_t len);
bool boolean_automation_run (framepos_t start, pframes_t len);