throw failed_constructor();
}
- // set_automatable ();
+ set_automatable ();
{
Glib::Mutex::Lock em (_session.engine().process_lock());
}
void
-PluginInsert::auto_state_changed (Parameter which)
+PluginInsert::auto_state_changed (Evoral::Parameter which)
{
if (which.type() != PluginAutomation)
return;
void
PluginInsert::set_automatable ()
{
- set<Parameter> a = _plugins.front()->automatable ();
+ set<Evoral::Parameter> a = _plugins.front()->automatable ();
Plugin::ParameterDescriptor desc;
- for (set<Parameter>::iterator i = a.begin(); i != a.end(); ++i) {
+ for (set<Evoral::Parameter>::iterator i = a.begin(); i != a.end(); ++i) {
if (i->type() == PluginAutomation) {
can_automate (*i);
_plugins.front()->get_parameter_descriptor(i->id(), desc);
- Parameter param(*i);
+ Evoral::Parameter param(*i);
param.set_range(desc.lower, desc.upper, _plugins.front()->default_value(i->id()));
boost::shared_ptr<AutomationList> list(new AutomationList(param));
- add_control(boost::shared_ptr<AutomationControl>(new PluginControl(*this, list)));
+ add_control(boost::shared_ptr<AutomationControl>(new PluginControl(this, *i, list)));
}
}
}
void
-PluginInsert::parameter_changed (Parameter which, float val)
+PluginInsert::parameter_changed (Evoral::Parameter which, float val)
{
if (which.type() != PluginAutomation)
return;
}
void
-PluginInsert::set_parameter (Parameter param, float val)
+PluginInsert::set_parameter (Evoral::Parameter param, float val)
{
if (param.type() != PluginAutomation)
return;
ac->set_value(val);
} else {
warning << "set_parameter called for nonexistant parameter "
- << param.symbol() << endmsg;
+ << EventTypeMap::instance().to_symbol(param) << endmsg;
}
_session.set_dirty();
}
float
-PluginInsert::get_parameter (Parameter param)
+PluginInsert::get_parameter (Evoral::Parameter param)
{
if (param.type() != PluginAutomation)
return 0.0;
void
PluginInsert::automation_run (BufferSet& bufs, nframes_t nframes, nframes_t offset)
{
- ControlEvent next_event (0, 0.0f);
+ Evoral::ControlEvent next_event (0, 0.0f);
nframes_t now = _session.transport_frame ();
nframes_t end = now + nframes;
/* add port automation state */
XMLNode *autonode = new XMLNode(port_automation_node_name);
- set<Parameter> automatable = _plugins[0]->automatable();
+ set<Evoral::Parameter> automatable = _plugins[0]->automatable();
- for (set<Parameter>::iterator x = automatable.begin(); x != automatable.end(); ++x) {
+ for (set<Evoral::Parameter>::iterator x = automatable.begin(); x != automatable.end(); ++x) {
/*XMLNode* child = new XMLNode("port");
snprintf(buf, sizeof(buf), "%" PRIu32, *x);
}
boost::shared_ptr<AutomationControl> c = boost::dynamic_pointer_cast<AutomationControl>(
- data().control(Parameter(PluginAutomation, port_id), true));
+ data().control(Evoral::Parameter(PluginAutomation, port_id), true));
if (!child->children().empty()) {
c->alist()->set_state (*child->children().front());
}
string
-PluginInsert::describe_parameter (Parameter param)
+PluginInsert::describe_parameter (Evoral::Parameter param)
{
if (param.type() != PluginAutomation)
return Automatable::describe_parameter(param);
}
}
-PluginInsert::PluginControl::PluginControl (PluginInsert& p, boost::shared_ptr<AutomationList> list)
- : AutomationControl (p.session(), list->parameter(), list, p.describe_parameter(list->parameter()))
+PluginInsert::PluginControl::PluginControl (PluginInsert* p, const Evoral::Parameter ¶m, boost::shared_ptr<AutomationList> list)
+ : AutomationControl (p->session(), param, list, p->describe_parameter(param))
, _plugin (p)
- , _list (list)
{
Plugin::ParameterDescriptor desc;
- p.plugin(0)->get_parameter_descriptor (list->parameter().id(), desc);
+ p->plugin(0)->get_parameter_descriptor (param.id(), desc);
_logarithmic = desc.logarithmic;
_toggled = desc.toggled;
}
}
- for (vector<boost::shared_ptr<Plugin> >::iterator i = _plugin._plugins.begin();
- i != _plugin._plugins.end(); ++i) {
+ for (vector<boost::shared_ptr<Plugin> >::iterator i = _plugin->_plugins.begin();
+ i != _plugin->_plugins.end(); ++i) {
(*i)->set_parameter (_list->parameter().id(), val);
}
{
/* FIXME: probably should be taking out some lock here.. */
- float val = _plugin.get_parameter (_list->parameter());
+ float val = _plugin->get_parameter (_list->parameter());
return val;