From 24ccaac67e9d416b3f3c564a441934313f3e9a21 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 29 Jun 2007 04:02:58 +0000 Subject: Further automation refactoring - bring in the concept of Controllable, work towards making automation + GUI + play/write/touch generic and easily reusable. Added bar controller to automation track controls (mostly relevant for MIDI CC, but added for gain and pan too Just Because). Fixed glaring "redirect" list errors. Fix plugin controls/automation loading. git-svn-id: svn://localhost/ardour2/trunk@2080 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/automation_control.h | 59 +++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 libs/ardour/ardour/automation_control.h (limited to 'libs/ardour/ardour/automation_control.h') diff --git a/libs/ardour/ardour/automation_control.h b/libs/ardour/ardour/automation_control.h new file mode 100644 index 0000000000..d9e7a232af --- /dev/null +++ b/libs/ardour/ardour/automation_control.h @@ -0,0 +1,59 @@ +/* + Copyright (C) 2007 Paul Davis + Author: Dave Robillard + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifndef __ardour_automation_control_h__ +#define __ardour_automation_control_h__ + +#include +#include + +namespace ARDOUR { + +class AutomationList; +class Session; + + +/** A PBD:Controllable with associated automation data (AutomationList) + */ +class AutomationControl : public PBD::Controllable +{ +public: + AutomationControl(ARDOUR::Session&, boost::shared_ptr, + std::string name="unnamed controllable"); + + void set_value(float val); + float get_value() const; + float user_value() const; + + void set_list(boost::shared_ptr); + + boost::shared_ptr list() { return _list; } + boost::shared_ptr list() const { return _list; } + +protected: + ARDOUR::Session& _session; + boost::shared_ptr _list; + float _user_value; +}; + + +} // namespace ARDOUR + +#endif /* __ardour_automation_control_h__ */ -- cgit v1.2.3