diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-07-13 21:05:45 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-07-13 21:05:45 +0000 |
commit | 0532e2063b73ec32d4dd108b58e90a0f20ae91b3 (patch) | |
tree | f9728e4b57f260fd5d468a9c3dd2b2dd2d97e7d7 /libs/ardour/ardour | |
parent | b04cd7d7045dd40a1e3ae819ad3a2f9bb08a01f1 (diff) |
dramatic overhaul of automation. too long to explain here. this work is not finished - write/touch passes do not correctly overwrite existing data because the semantics of ControlList::insert_iterator need clarification. more to follow
git-svn-id: svn://localhost/ardour2/branches/3.0@13038 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/automatable.h | 4 | ||||
-rw-r--r-- | libs/ardour/ardour/automation_control.h | 31 | ||||
-rw-r--r-- | libs/ardour/ardour/debug.h | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/rc_configuration_vars.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/route.h | 2 |
5 files changed, 20 insertions, 20 deletions
diff --git a/libs/ardour/ardour/automatable.h b/libs/ardour/ardour/automatable.h index dc86c0cddd..6e0f7a97b5 100644 --- a/libs/ardour/ardour/automatable.h +++ b/libs/ardour/ardour/automatable.h @@ -45,7 +45,7 @@ public: Automatable(Session&); Automatable (const Automatable& other); - virtual ~Automatable() {} + virtual ~Automatable(); boost::shared_ptr<Evoral::Control> control_factory(const Evoral::Parameter& id); @@ -59,7 +59,7 @@ public: virtual void add_control(boost::shared_ptr<Evoral::Control>); void clear_controls (); - virtual void automation_snapshot (framepos_t now, bool force); + virtual void transport_located (framepos_t now); virtual void transport_stopped (framepos_t now); virtual std::string describe_parameter(Evoral::Parameter param); diff --git a/libs/ardour/ardour/automation_control.h b/libs/ardour/ardour/automation_control.h index 2c15a1b1b0..10194b3f9b 100644 --- a/libs/ardour/ardour/automation_control.h +++ b/libs/ardour/ardour/automation_control.h @@ -22,6 +22,8 @@ #define __ardour_automation_control_h__ #include <boost/shared_ptr.hpp> +#include <boost/enable_shared_from_this.hpp> + #include "pbd/controllable.h" #include "evoral/Control.hpp" #include "ardour/automation_list.h" @@ -34,7 +36,7 @@ class Automatable; /** A PBD::Controllable with associated automation data (AutomationList) */ -class AutomationControl : public PBD::Controllable, public Evoral::Control +class AutomationControl : public PBD::Controllable, public Evoral::Control, public boost::enable_shared_from_this<AutomationControl> { public: AutomationControl(ARDOUR::Session&, @@ -42,37 +44,34 @@ public: boost::shared_ptr<ARDOUR::AutomationList> l=boost::shared_ptr<ARDOUR::AutomationList>(), const std::string& name=""); + ~AutomationControl (); + boost::shared_ptr<AutomationList> alist() const { return boost::dynamic_pointer_cast<AutomationList>(_list); } - void set_list(boost::shared_ptr<Evoral::ControlList>); + void set_list (boost::shared_ptr<Evoral::ControlList>); inline bool automation_playback() const { - return ((ARDOUR::AutomationList*)_list.get())->automation_playback(); + return alist()->automation_playback(); } inline bool automation_write() const { - return ((ARDOUR::AutomationList*)_list.get())->automation_write(); + return alist()->automation_write(); } inline AutoState automation_state() const { - return ((ARDOUR::AutomationList*)_list.get())->automation_state(); + return alist()->automation_state(); } - inline void set_automation_state(AutoState as) { - return ((ARDOUR::AutomationList*)_list.get())->set_automation_state(as); + inline AutoStyle automation_style() const { + return alist()->automation_style(); } - inline void start_touch(double when) { - set_touching (true); - return ((ARDOUR::AutomationList*)_list.get())->start_touch(when); - } - - inline void stop_touch(bool mark, double when) { - set_touching (false); - return ((ARDOUR::AutomationList*)_list.get())->stop_touch(mark, when); - } + void set_automation_state(AutoState as); + void set_automation_style(AutoStyle as); + void start_touch (double when); + void stop_touch (bool mark, double when); void set_value (double); double get_value () const; diff --git a/libs/ardour/ardour/debug.h b/libs/ardour/ardour/debug.h index 5c72c9236f..334aac53e6 100644 --- a/libs/ardour/ardour/debug.h +++ b/libs/ardour/ardour/debug.h @@ -60,6 +60,7 @@ namespace PBD { extern uint64_t TempoMath; extern uint64_t TempoMap; extern uint64_t OrderKeys; + extern uint64_t Automation; } } diff --git a/libs/ardour/ardour/rc_configuration_vars.h b/libs/ardour/ardour/rc_configuration_vars.h index 37599b0ac6..09b0c55a74 100644 --- a/libs/ardour/ardour/rc_configuration_vars.h +++ b/libs/ardour/ardour/rc_configuration_vars.h @@ -152,7 +152,7 @@ CONFIG_VARIABLE (int32_t, history_depth, "history-depth", 20) CONFIG_VARIABLE (bool, use_overlap_equivalency, "use-overlap-equivalency", false) CONFIG_VARIABLE (bool, periodic_safety_backups, "periodic-safety-backups", true) CONFIG_VARIABLE (uint32_t, periodic_safety_backup_interval, "periodic-safety-backup-interval", 120) -CONFIG_VARIABLE (float, automation_interval, "automation-interval", 50) +CONFIG_VARIABLE (float, automation_interval, "automation-interval", 500) CONFIG_VARIABLE (bool, sync_all_route_ordering, "sync-all-route-ordering", true) CONFIG_VARIABLE (bool, only_copy_imported_files, "only-copy-imported-files", false) CONFIG_VARIABLE (bool, keep_tearoffs, "keep-tearoffs", false) diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index f6c737d766..22ecb19123 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -131,6 +131,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember, virtual void nonrealtime_handle_transport_stopped (bool abort, bool did_locate, bool flush_processors); virtual void realtime_handle_transport_stopped () {} virtual void realtime_locate () {} + virtual void non_realtime_locate (framepos_t); virtual void set_pending_declick (int); /* end of vfunc-based API */ @@ -409,7 +410,6 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember, boost::shared_ptr<Processor> the_instrument() const; InstrumentInfo& instrument_info() { return _instrument_info; } - void automation_snapshot (framepos_t now, bool force=false); void protect_automation (); enum { |