diff options
author | David Robillard <d@drobilla.net> | 2008-09-19 00:47:49 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-09-19 00:47:49 +0000 |
commit | d357eca668044badcb4bab318e2e74cfffa9a0b0 (patch) | |
tree | eab9bf33b194f9e37c20f84375e5caa748ee994a /libs/ardour/ardour/automation_control.h | |
parent | 3d976c5b727e4d55ce439b1d7c055a814477fa1a (diff) |
Factor out sequencing related things into an independant new library: "evoral".
Anything related to the storage of events/values over a range of time lives in evoral.
This includes MidiModel (Evoral::Sequence) and automation data (AutomationList (Evoral::ControlList),
Automatable (Evoral::ControlSet), etc).
libs/evoral synced with http://svn.drobilla.net/lad/trunk/evoral r1511.
git-svn-id: svn://localhost/ardour2/branches/3.0@3754 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/automation_control.h')
-rw-r--r-- | libs/ardour/ardour/automation_control.h | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/libs/ardour/ardour/automation_control.h b/libs/ardour/ardour/automation_control.h index 68ac5797dc..c414f7bc40 100644 --- a/libs/ardour/ardour/automation_control.h +++ b/libs/ardour/ardour/automation_control.h @@ -24,6 +24,8 @@ #include <boost/shared_ptr.hpp> #include <pbd/controllable.h> #include <ardour/parameter.h> +#include <evoral/Control.hpp> +#include <ardour/automation_event.h> namespace ARDOUR { @@ -34,28 +36,42 @@ class Automatable; /** A PBD:Controllable with associated automation data (AutomationList) */ -class AutomationControl : public PBD::Controllable +class AutomationControl : public PBD::Controllable, public Evoral::Control { public: AutomationControl(ARDOUR::Session&, boost::shared_ptr<ARDOUR::AutomationList>, std::string name="unnamed controllable"); + + boost::shared_ptr<AutomationList> alist() { return boost::dynamic_pointer_cast<AutomationList>(_list); } + + void set_list(boost::shared_ptr<Evoral::ControlList>); + + inline bool automation_playback() const { + return ((ARDOUR::AutomationList*)_list.get())->automation_playback(); + } + + inline bool automation_write() const { + return ((ARDOUR::AutomationList*)_list.get())->automation_write(); + } + + inline AutoState automation_state() { + return ((ARDOUR::AutomationList*)_list.get())->automation_state(); + } + + inline void start_touch() { + return ((ARDOUR::AutomationList*)_list.get())->start_touch(); + } + + inline void stop_touch() { + return ((ARDOUR::AutomationList*)_list.get())->stop_touch(); + } void set_value(float val); float get_value() const; - float user_value() const; - - void set_list(boost::shared_ptr<ARDOUR::AutomationList>); - - boost::shared_ptr<ARDOUR::AutomationList> list() { return _list; } - boost::shared_ptr<const ARDOUR::AutomationList> list() const { return _list; } - - Parameter parameter() const; protected: - ARDOUR::Session& _session; - boost::shared_ptr<ARDOUR::AutomationList> _list; - float _user_value; + ARDOUR::Session& _session; }; |