void AudioPluginInstance::setParameter (int parameterIndex, float newValue) { assertOnceOnDeprecatedMethodUse(); if (auto* param = getParameters()[parameterIndex]) param->setValue (newValue); }
const String AudioPluginInstance::getParameterText (int parameterIndex) { assertOnceOnDeprecatedMethodUse(); if (auto* param = getParameters()[parameterIndex]) return param->getCurrentValueAsText(); return {}; }
String AudioPluginInstance::getParameterName (int parameterIndex, int maximumStringLength) { assertOnceOnDeprecatedMethodUse(); if (auto* param = getParameters()[parameterIndex]) return param->getName (maximumStringLength); return {}; }
const String AudioPluginInstance::getParameterName (int parameterIndex) { assertOnceOnDeprecatedMethodUse(); if (auto* param = getParameters()[parameterIndex]) return param->getName (1024); return {}; }
bool AudioPluginInstance::isMetaParameter (int parameterIndex) const { assertOnceOnDeprecatedMethodUse(); if (auto* param = getParameters()[parameterIndex]) return param->isMetaParameter(); return false; }
float AudioPluginInstance::getParameter (int parameterIndex) { assertOnceOnDeprecatedMethodUse(); if (auto* param = getParameters()[parameterIndex]) return param->getValue(); return 0.0f; }
AudioProcessorParameter::Category AudioPluginInstance::getParameterCategory (int parameterIndex) const { assertOnceOnDeprecatedMethodUse(); if (auto* param = getParameters()[parameterIndex]) return param->getCategory(); return AudioProcessorParameter::genericParameter; }
String AudioPluginInstance::getParameterLabel (int parameterIndex) const { assertOnceOnDeprecatedMethodUse(); if (auto* param = getParameters()[parameterIndex]) return param->getLabel(); return {}; }
bool AudioPluginInstance::isParameterAutomatable (int parameterIndex) const { assertOnceOnDeprecatedMethodUse(); if (auto* param = getParameters()[parameterIndex]) return param->isAutomatable(); return true; }
int AudioPluginInstance::getParameterNumSteps (int parameterIndex) { assertOnceOnDeprecatedMethodUse(); if (auto* param = getParameters()[parameterIndex]) return param->getNumSteps(); return AudioProcessor::getDefaultNumParameterSteps(); }
String AudioPluginInstance::getParameterText (int parameterIndex, int maximumStringLength) { assertOnceOnDeprecatedMethodUse(); if (auto* param = getParameters()[parameterIndex]) return param->getCurrentValueAsText().substring (0, maximumStringLength); return {}; }
String AudioPluginInstance::getParameterID (int parameterIndex) { assertOnceOnDeprecatedMethodUse(); // Currently there is no corresponding method available in the // AudioProcessorParameter class, and the previous behaviour of JUCE's // plug-in hosting code simply returns a string version of the index; to // maintain backwards compatibility you should perform the operation below // this comment. However the caveat is that for plug-ins which change their // number of parameters dynamically at runtime you cannot rely upon the // returned parameter ID mapping to the correct parameter. A comprehensive // solution to this problem requires some additional work in JUCE's hosting // code. return String (parameterIndex); }
String AudioPluginInstance::getParameterID (int parameterIndex) { assertOnceOnDeprecatedMethodUse(); return String (parameterIndex); }