From: Robin Gareus Date: Tue, 21 Feb 2017 14:24:02 +0000 (+0100) Subject: Implementations for Plugin-Preset-Load to set automation X-Git-Tag: 5.7~68 X-Git-Url: https://main.carlh.net/gitweb/?p=ardour.git;a=commitdiff_plain;h=bdf41b0bf5b2c5f43572550f9b538ea652a6a9e7 Implementations for Plugin-Preset-Load to set automation --- diff --git a/libs/ardour/ladspa_plugin.cc b/libs/ardour/ladspa_plugin.cc index b5106cb4ca..075dc4b579 100644 --- a/libs/ardour/ladspa_plugin.cc +++ b/libs/ardour/ladspa_plugin.cc @@ -808,6 +808,7 @@ LadspaPlugin::load_preset (PresetRecord r) for (uint32_t i = 0; i < (uint32_t) defs->count; ++i) { if (parameter_is_input (defs->items[i].pid)) { set_parameter(defs->items[i].pid, defs->items[i].value); + PresetPortSetValue (defs->items[i].pid, defs->items[i].value); /* EMIT SIGNAL */ } } lrdf_free_setting_values(defs); diff --git a/libs/ardour/luaproc.cc b/libs/ardour/luaproc.cc index 4bc2c00c8b..9b51565b9c 100644 --- a/libs/ardour/luaproc.cc +++ b/libs/ardour/luaproc.cc @@ -1125,7 +1125,10 @@ LuaProc::load_preset (PresetRecord r) assert (index); assert (value); LocaleGuard lg; - set_parameter (atoi (index->value().c_str()), atof (value->value().c_str ())); + const uint32_t p = atoi (index->value().c_str()); + const float v = atof (value->value().c_str ()); + set_parameter (p, v); + PresetPortSetValue (p, v); /* EMIT SIGNAL */ } } return Plugin::load_preset(r); diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc index a1a7ce860a..7923bb66a1 100644 --- a/libs/ardour/lv2_plugin.cc +++ b/libs/ardour/lv2_plugin.cc @@ -1434,6 +1434,7 @@ set_port_value(const char* port_symbol, const uint32_t port_index = self->port_index(port_symbol); if (port_index != (uint32_t)-1) { self->set_parameter(port_index, *(const float*)value); + self->PresetPortSetValue (port_index, *(const float*)value); /* EMIT SIGNAL */ } } diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc index 2b3a98d3c8..44972151f0 100644 --- a/libs/ardour/vst_plugin.cc +++ b/libs/ardour/vst_plugin.cc @@ -446,8 +446,10 @@ VSTPlugin::load_user_preset (PresetRecord r) assert (index); assert (value); - - set_parameter (atoi (index->value().c_str()), atof (value->value().c_str ())); + const uint32_t p = atoi (index->value().c_str()); + const float v = atof (value->value().c_str ()); + set_parameter (p, v); + PresetPortSetValue (p, v); /* EMIT SIGNAL */ } } return true;