for (p = params.begin(); p != params.end(); ++p) {
boost::shared_ptr<ARDOUR::AutomationControl> pan_control
= boost::dynamic_pointer_cast<ARDOUR::AutomationControl>(
- _route->panner()->data().control(*p));
+ _route->panner()->control(*p));
if (pan_control->parameter().type() == NullAutomation) {
error << "Pan control has NULL automation type!" << endmsg;
boost::shared_ptr<ARDOUR::AutomationControl> c
= boost::dynamic_pointer_cast<ARDOUR::AutomationControl>(
- insert->data().control(Evoral::Parameter(PluginAutomation, 0, i)));
+ insert->control(Evoral::Parameter(PluginAutomation, 0, i)));
if ((cui = build_control_ui (i, c)) == 0) {
error << string_compose(_("Plugin Editor: could not build control element for port %1"), i) << endmsg;
boost::shared_ptr<ARDOUR::AutomationControl> pan_control
= boost::dynamic_pointer_cast<ARDOUR::AutomationControl>(
- _route->panner()->data().control(Evoral::Parameter(PanAutomation)));
+ _route->panner()->control(Evoral::Parameter(PanAutomation)));
if (pan_control) {
pan_control->alist()->automation_state_changed.connect (panstate_connection, boost::bind (&PannerUI::pan_automation_state_changed, &panners), gui_context());
for (list<ProcessorAutomationInfo*>::iterator i = processor_automation.begin(); i != processor_automation.end(); ++i) {
for (vector<ProcessorAutomationNode*>::iterator ii = (*i)->lines.begin(); ii != (*i)->lines.end(); ++ii) {
- if ((*ii)->view != 0 && (*i)->processor->data().control((*ii)->what)->list()->size() > 0) {
+ if ((*ii)->view != 0 && (*i)->processor->control((*ii)->what)->list()->size() > 0) {
(*ii)->menu_item->set_active (true);
}
}
snprintf (state_name, sizeof (state_name), "Redirect-%s-%" PRIu32, legalize_for_xml_node (processor->name()).c_str(), what.id());
boost::shared_ptr<AutomationControl> control
- = boost::dynamic_pointer_cast<AutomationControl>(processor->data().control(what, true));
+ = boost::dynamic_pointer_cast<AutomationControl>(processor->control(what, true));
pan->view = boost::shared_ptr<AutomationTimeAxisView>(
new AutomationTimeAxisView (_session, _route, processor, control,
void
Amp::setup_gain_automation (sframes_t start_frame, sframes_t end_frame, nframes_t nframes)
{
- Glib::Mutex::Lock am (data().control_lock(), Glib::TRY_LOCK);
+ Glib::Mutex::Lock am (control_lock(), Glib::TRY_LOCK);
if (am.locked() && _session.transport_rolling() && _gain_control->automation_playback()) {
_apply_gain_automation = _gain_control->list()->curve().rt_safe_get_vector (
boost::shared_ptr<Evoral::Control>
control(const Evoral::Parameter& id, bool create=false) {
- return _automatable.data().control(id, create);
+ return _automatable.control(id, create);
}
virtual boost::shared_ptr<const Evoral::Control>
control(const Evoral::Parameter& id) const {
- return _automatable.data().control(id);
+ return _automatable.control(id);
}
/* export */
typedef Evoral::ControlSet::Controls Controls;
- Evoral::ControlSet& data() { return *dynamic_cast<Evoral::ControlSet*>(this); }
- const Evoral::ControlSet& data() const { return *dynamic_cast<const Evoral::ControlSet*>(this); }
-
int set_automation_state (const XMLNode&, Evoral::Parameter default_param);
XMLNode& get_automation_state();
boost::shared_ptr<Evoral::Control>
control(const Evoral::Parameter& id, bool create=false) {
- return model()->data().control(id, create);
+ return model()->control(id, create);
}
virtual boost::shared_ptr<const Evoral::Control>
control(const Evoral::Parameter& id) const {
- return model()->data().control(id);
+ return model()->control(id);
}
/* export */
return;
boost::shared_ptr<AutomationControl> c
- = boost::dynamic_pointer_cast<AutomationControl>(data().control (which));
+ = boost::dynamic_pointer_cast<AutomationControl>(control (which));
if (c && ((AutomationList*)c->list().get())->automation_state() != Off) {
_plugins[0]->set_parameter (which.id(), c->list()->eval (_session.transport_frame()));
uint32_t n = 0;
- for (Controls::iterator li = data().controls().begin(); li != data().controls().end(); ++li, ++n) {
+ for (Controls::iterator li = controls().begin(); li != controls().end(); ++li, ++n) {
boost::shared_ptr<AutomationControl> c
= boost::dynamic_pointer_cast<AutomationControl>(li->second);
_plugins[0]->set_parameter (param.id(), val);
boost::shared_ptr<AutomationControl> ac
- = boost::dynamic_pointer_cast<AutomationControl>(data().control(param));
+ = boost::dynamic_pointer_cast<AutomationControl>(control(param));
if (ac) {
ac->set_value(val);
nframes_t end = now + nframes;
nframes_t offset = 0;
- Glib::Mutex::Lock lm (data().control_lock(), Glib::TRY_LOCK);
+ Glib::Mutex::Lock lm (control_lock(), Glib::TRY_LOCK);
if (!lm.locked()) {
connect_and_run (bufs, nframes, offset, false);
return;
}
- if (!data().find_next_event (now, end, next_event)) {
+ if (!find_next_event (now, end, next_event)) {
/* no events have a time within the relevant range */
offset += cnt;
now += cnt;
- if (!data().find_next_event (now, end, next_event)) {
+ if (!find_next_event (now, end, next_event)) {
break;
}
}
child->add_child_nocopy (automation_list (*x).state (full));
autonode->add_child_nocopy (*child);
*/
- autonode->add_child_nocopy (((AutomationList*)data().control(*x)->list().get())->state (full));
+ AutomationList* list = dynamic_cast<AutomationList*>(control(*x)->list().get());
+ autonode->add_child_nocopy (list->state (full));
}
node.add_child_nocopy (*autonode);
}
boost::shared_ptr<AutomationControl> c = boost::dynamic_pointer_cast<AutomationControl>(
- data().control(Evoral::Parameter(PluginAutomation, 0, port_id), true));
+ control(Evoral::Parameter(PluginAutomation, 0, port_id), true));
if (c) {
c->alist()->set_state (*child, version);
}
boost::shared_ptr<AutomationControl> c = boost::dynamic_pointer_cast<AutomationControl>(
- data().control(Evoral::Parameter(PluginAutomation, 0, port_id), true));
+ control(Evoral::Parameter(PluginAutomation, 0, port_id), true));
if (c) {
if (!child->children().empty()) {
{
/* either we own the control or .... */
- boost::shared_ptr<AutomationControl> c = boost::dynamic_pointer_cast<AutomationControl>(data().control (param));
+ boost::shared_ptr<AutomationControl> c = boost::dynamic_pointer_cast<AutomationControl>(control (param));
if (!c) {
Glib::RWLock::ReaderLock rm (_processor_lock, Glib::TRY_LOCK);
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
- if ((c = boost::dynamic_pointer_cast<AutomationControl>((*i)->data().control (param))) != 0) {
+ if ((c = boost::dynamic_pointer_cast<AutomationControl>((*i)->control (param))) != 0) {
break;
}
}
if (p) {
c = boost::dynamic_pointer_cast<ARDOUR::AutomationControl>(
- p->data().control(Evoral::Parameter(PluginAutomation, 0, parameter_index)));
+ p->control(Evoral::Parameter(PluginAutomation, 0, parameter_index)));
}
break;
}