X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=libs%2Fardour%2Fardour%2Fautomation_control.h;h=3f22e6d57fd295460de12aeadd92636cbc7e60a0;hb=022818b4a796f52c0a91eea42e65aec0bc7bed43;hp=c414f7bc40a741ec099322a428e9dd6c00959ecf;hpb=d357eca668044badcb4bab318e2e74cfffa9a0b0;p=ardour.git diff --git a/libs/ardour/ardour/automation_control.h b/libs/ardour/ardour/automation_control.h index c414f7bc40..3f22e6d57f 100644 --- a/libs/ardour/ardour/automation_control.h +++ b/libs/ardour/ardour/automation_control.h @@ -23,27 +23,26 @@ #include #include -#include #include -#include +#include namespace ARDOUR { -class AutomationList; class Session; class Automatable; -/** A PBD:Controllable with associated automation data (AutomationList) +/** A PBD::Controllable with associated automation data (AutomationList) */ class AutomationControl : public PBD::Controllable, public Evoral::Control { public: AutomationControl(ARDOUR::Session&, - boost::shared_ptr, - std::string name="unnamed controllable"); + const Evoral::Parameter& parameter, + boost::shared_ptr l=boost::shared_ptr(), + const string& name=""); - boost::shared_ptr alist() { return boost::dynamic_pointer_cast(_list); } + boost::shared_ptr alist() const { return boost::dynamic_pointer_cast(_list); } void set_list(boost::shared_ptr); @@ -55,10 +54,14 @@ public: return ((ARDOUR::AutomationList*)_list.get())->automation_write(); } - inline AutoState automation_state() { + inline AutoState automation_state() const { return ((ARDOUR::AutomationList*)_list.get())->automation_state(); } + inline void set_automation_state(AutoState as) { + return ((ARDOUR::AutomationList*)_list.get())->set_automation_state(as); + } + inline void start_touch() { return ((ARDOUR::AutomationList*)_list.get())->start_touch(); } @@ -67,7 +70,13 @@ public: return ((ARDOUR::AutomationList*)_list.get())->stop_touch(); } + /** Set the value and do the right thing based on automation state + * (e.g. record if necessary, etc.) + */ void set_value(float val); + + /** Get the current effective value based on automation state. + */ float get_value() const; protected: