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
This commit is contained in:
David Robillard 2007-06-29 04:02:58 +00:00
parent f8697ed223
commit 24ccaac67e
80 changed files with 1202 additions and 811 deletions

View file

@ -91,11 +91,11 @@ ProcessorAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item,
/* map to model space */
if (!lines.empty()) {
AutomationList* alist (_processor.automation_list(_param, true));
boost::shared_ptr<AutomationList> alist (_processor.control(_param, true)->list());
string description = _("add automation event to ");
description += _processor.describe_parameter (_param);
lines.front()->view_to_model_y (y);
lines.front().first->view_to_model_y (y);
_session.begin_reversible_command (description);
XMLNode &before = alist->get_state();
@ -168,7 +168,33 @@ void
ProcessorAutomationTimeAxisView::set_automation_state (AutoState state)
{
if (!ignore_state_request) {
_processor.automation_list (_param, true)->set_automation_state (state);
_processor.control (_param, true)->list()->set_automation_state (state);
}
}
void
ProcessorAutomationTimeAxisView::add_line (AutomationLine& line)
{
bool get = false;
if (lines.empty()) {
/* first line is the Model for automation state */
automation_connection = line.the_list()->automation_state_changed.connect
(mem_fun(*this, &ProcessorAutomationTimeAxisView::automation_state_changed));
get = true;
}
lines.push_back (std::make_pair(&line,
AutomationController::create(_session, line.the_list(),
_processor.control(line.the_list()->param_id()))));
line.set_y_position_and_height (0, height);
if (get) {
/* pick up the current state */
automation_state_changed ();
}
line.show();
}