36void* AudioPluginInstance::getPlatformSpecificData() {
return nullptr; }
40String AudioPluginInstance::getParameterID (
int parameterIndex)
42 assertOnceOnDeprecatedMethodUse();
53 return String (parameterIndex);
56float AudioPluginInstance::getParameter (
int parameterIndex)
58 assertOnceOnDeprecatedMethodUse();
61 return param->getValue();
66void AudioPluginInstance::setParameter (
int parameterIndex,
float newValue)
68 assertOnceOnDeprecatedMethodUse();
71 param->setValue (newValue);
74const String AudioPluginInstance::getParameterName (
int parameterIndex)
76 assertOnceOnDeprecatedMethodUse();
79 return param->getName (1024);
86 assertOnceOnDeprecatedMethodUse();
94const String AudioPluginInstance::getParameterText (
int parameterIndex)
96 assertOnceOnDeprecatedMethodUse();
99 return param->getCurrentValueAsText();
106 assertOnceOnDeprecatedMethodUse();
114float AudioPluginInstance::getParameterDefaultValue (
int parameterIndex)
116 assertOnceOnDeprecatedMethodUse();
119 return param->getDefaultValue();
124int AudioPluginInstance::getParameterNumSteps (
int parameterIndex)
126 assertOnceOnDeprecatedMethodUse();
129 return param->getNumSteps();
134bool AudioPluginInstance::isParameterDiscrete (
int parameterIndex)
const
136 assertOnceOnDeprecatedMethodUse();
139 return param->isDiscrete();
144bool AudioPluginInstance::isParameterAutomatable (
int parameterIndex)
const
146 assertOnceOnDeprecatedMethodUse();
149 return param->isAutomatable();
154String AudioPluginInstance::getParameterLabel (
int parameterIndex)
const
156 assertOnceOnDeprecatedMethodUse();
159 return param->getLabel();
164bool AudioPluginInstance::isParameterOrientationInverted (
int parameterIndex)
const
166 assertOnceOnDeprecatedMethodUse();
169 return param->isOrientationInverted();
174bool AudioPluginInstance::isMetaParameter (
int parameterIndex)
const
176 assertOnceOnDeprecatedMethodUse();
179 return param->isMetaParameter();
186 assertOnceOnDeprecatedMethodUse();
189 return param->getCategory();
194void AudioPluginInstance::assertOnceOnDeprecatedMethodUse()
const noexcept
196 if (! deprecationAssertiontriggered)
208 deprecationAssertiontriggered =
true;
211bool AudioPluginInstance::deprecationAssertiontriggered =
false;
213AudioPluginInstance::Parameter::Parameter()
222 return value < 0.5f ?
TRANS (
"Off") :
TRANS (
"On");
233 if (onStrings.contains (text,
true))
236 if (offStrings.contains (text,
true))
239 return floatValue < 0.5f ? 0.0f : 1.0f;
247 addParameter (param.
release());
255 for (
auto* param : group->getParameters (
true))
261 addParameterGroup (std::move (group));
269 for (
auto* param : group.getParameters (
true))
275 setParameterTree (std::move (group));
PluginDescription getPluginDescription() const
Returns a PluginDescription for this plugin.
virtual void getExtensions(ExtensionsVisitor &) const
Allows retrieval of information related to the inner workings of a particular plugin format,...
virtual void fillInPluginDescription(PluginDescription &) const =0
Fills-in the appropriate parts of this plugin description object.
void addHostedParameterGroup(std::unique_ptr< AudioProcessorParameterGroup >)
Adds multiple parameters to this instance.
void addHostedParameter(std::unique_ptr< HostedParameter >)
Adds a parameter to this instance.
void setHostedParameterTree(AudioProcessorParameterGroup)
Adds multiple parameters to this instance.
HostedParameter * getHostedParameter(int index) const
Gets the parameter at a particular index.
A class encapsulating a group of AudioProcessorParameters and nested AudioProcessorParameterGroups.
@ genericParameter
If your parameter is not a meter then you should use this category.
virtual bool isBoolean() const
Returns whether the parameter represents a boolean switch, typically with "On" and "Off" states.
const Array< AudioProcessorParameter * > & getParameters() const
Returns a flat list of the parameters in the current tree.
static int getDefaultNumParameterSteps() noexcept
Returns the default number of steps for a parameter.
A small class to represent some facts about a particular type of plug-in.
float getFloatValue() const noexcept
Parses this string as a floating point number.
String retainCharacters(StringRef charactersToRetain) const
Returns a version of this string that only retains a fixed set of characters.
String substring(int startIndex, int endIndex) const
Returns a subsection of the string.
#define TRANS(stringLiteral)
Uses the LocalisedStrings class to translate the given string literal.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
float getValueForText(const String &text) const override
Should parse a string and return the appropriate value for it.
String getText(float value, int maximumStringLength) const override
Returns a textual version of the supplied normalised parameter value.
Create a derived implementation of this class and pass it to AudioPluginInstance::getExtensions() to ...
virtual void visitUnknown(const Unknown &)
Will be called if there is no platform specific information available.
A parameter with functions that are useful for plugin hosts.