summaryrefslogtreecommitdiff
path: root/libs/ardour/automation_control.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-08-23 16:31:34 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-08-23 16:31:34 +0000
commit6e904b1e1600f4ccc0338d0b0864f7e02d417b13 (patch)
treea224669b7ff25e3f680a68920701e4498d495793 /libs/ardour/automation_control.cc
parent6b6e6f49b4840183f29dfa1e74483c52603bffc1 (diff)
3.0 version of rev 5564 from 2.x - basic boolean plugin parameter automation (no graphical editing intended). this involved adding a new "toggled" property to Evoral::Parameter
git-svn-id: svn://localhost/ardour2/branches/3.0@7670 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/automation_control.cc')
-rw-r--r--libs/ardour/automation_control.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/ardour/automation_control.cc b/libs/ardour/automation_control.cc
index a4e0a7bbc0..2989d82818 100644
--- a/libs/ardour/automation_control.cc
+++ b/libs/ardour/automation_control.cc
@@ -52,8 +52,16 @@ AutomationControl::set_value(double value)
{
bool to_list = _list && _session.transport_stopped()
&& ((AutomationList*)_list.get())->automation_write();
+
+ if (to_list && parameter().toggled()) {
- Control::set_double(value, to_list, _session.transport_frame());
+ //store the previous value just before this so any
+ // interpolation works right
+
+ _list->add (get_double(), _session.transport_frame()-1);
+ }
+
+ Control::set_double (value, to_list, _session.transport_frame());
Changed(); /* EMIT SIGNAL */
}