| @@ -429,9 +429,7 @@ public: | |||||
| info.id = vstParamID; | info.id = vstParamID; | ||||
| info.unitId = vstUnitID; | info.unitId = vstUnitID; | ||||
| toString128 (info.title, param.getName (128)); | |||||
| toString128 (info.shortTitle, param.getName (8)); | |||||
| toString128 (info.units, param.getLabel()); | |||||
| updateParameterInfo(); | |||||
| info.stepCount = (Steinberg::int32) 0; | info.stepCount = (Steinberg::int32) 0; | ||||
| @@ -460,6 +458,13 @@ public: | |||||
| virtual ~Param() override = default; | virtual ~Param() override = default; | ||||
| void updateParameterInfo() | |||||
| { | |||||
| toString128 (info.title, param.getName (128)); | |||||
| toString128 (info.shortTitle, param.getName (8)); | |||||
| toString128 (info.units, param.getLabel()); | |||||
| } | |||||
| bool setNormalized (Vst::ParamValue v) override | bool setNormalized (Vst::ParamValue v) override | ||||
| { | { | ||||
| v = jlimit (0.0, 1.0, v); | v = jlimit (0.0, 1.0, v); | ||||
| @@ -887,6 +892,12 @@ public: | |||||
| void audioProcessorChanged (AudioProcessor*) override | void audioProcessorChanged (AudioProcessor*) override | ||||
| { | { | ||||
| auto numParameters = parameters.getParameterCount(); | |||||
| for (int32 i = 0; i < numParameters; ++i) | |||||
| if (auto* param = dynamic_cast<Param*> (parameters.getParameterByIndex (i))) | |||||
| param->updateParameterInfo(); | |||||
| if (auto* pluginInstance = getPluginInstance()) | if (auto* pluginInstance = getPluginInstance()) | ||||
| { | { | ||||
| if (pluginInstance->getNumPrograms() > 1) | if (pluginInstance->getNumPrograms() > 1) | ||||
| @@ -895,7 +906,7 @@ public: | |||||
| } | } | ||||
| if (componentHandler != nullptr && ! inSetupProcessing) | if (componentHandler != nullptr && ! inSetupProcessing) | ||||
| componentHandler->restartComponent (Vst::kLatencyChanged | Vst::kParamValuesChanged); | |||||
| componentHandler->restartComponent (Vst::kLatencyChanged | Vst::kParamValuesChanged | Vst::kParamTitlesChanged); | |||||
| } | } | ||||
| void parameterValueChanged (int, float newValue) override | void parameterValueChanged (int, float newValue) override | ||||