JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
Steinberg::Vst::IParameterFunctionName Class Referenceabstract

Edit controller component interface extension: Vst::IParameterFunctionName. More...

#include "ivstparameterfunctionname.h"

Inheritance diagram for Steinberg::Vst::IParameterFunctionName:
Steinberg::FUnknown

Public Member Functions

virtual tresult PLUGIN_API getParameterIDFromFunctionName (UnitID unitID, FIDString functionName, ParamID &paramID)=0
 Gets for the given unitID the associated paramID to a function Name.
 
- Public Member Functions inherited from Steinberg::FUnknown
virtual tresult PLUGIN_API queryInterface (const TUID _iid, void **obj)=0
 Query for a pointer to the specified interface.
 
virtual uint32 PLUGIN_API addRef ()=0
 Adds a reference and returns the new reference count.
 
virtual uint32 PLUGIN_API release ()=0
 Releases a reference and returns the new reference count.
 

Static Public Attributes

static const FUID iid
 
- Static Public Attributes inherited from Steinberg::FUnknown
static const FUID iid
 

Detailed Description

Edit controller component interface extension: Vst::IParameterFunctionName.

This interface allows the host to get a parameter associated to a specific meaning (a functionName) for a given unit. The host can use this information, for example, for drawing a Gain Reduction meter in its own UI. In order to get the plain value of this parameter, the host should use the IEditController::normalizedParamToPlain. The host can automatically map parameters to dedicated UI controls, such as the wet-dry mix knob or Randomize button.

Example

//------------------------------------------------------------------------
// here an example of how a VST3 plug-in could support this IParameterFunctionName interface.
// we need to define somewhere the iids:
in MyController class declaration
class MyController : public Vst::EditController, public Vst::IParameterFunctionName
{
...
tresult PLUGIN_API getParameterIDFromFunctionName (UnitID unitID, FIDString functionName,
Vst::ParamID& paramID) override;
...
OBJ_METHODS (MyController, Vst::EditController)
...
DELEGATE_REFCOUNT (Vst::EditController)
...
}
namespace Steinberg {
namespace Vst {
DEF_CLASS_IID (IParameterFunctionName)
}
}
//------------------------------------------------------------------------
tresult PLUGIN_API MyController::getParameterIDFromFunctionName (UnitID unitID, FIDString
functionName, Vst::ParamID& paramID)
{
using namespace Vst;
paramID = kNoParamId;
if (unitID == kRootUnitId && FIDStringsEqual (functionName, kCompGainReduction))
paramID = kMyGainReductionId;
return (paramID != kNoParamId) ? kResultOk : kResultFalse;
}
//--- a host implementation example: --------------------
...
FUnknownPtr<Vst::IParameterFunctionName> functionName (mEditController->getIEditController ());
if (functionName)
{
Vst::ParamID paramID;
if (functionName->getParameterIDFromFunctionName (kRootUnitId,
Vst::FunctionNameType::kCompGainReduction, paramID) == kResultTrue)
{
// paramID could be cached for performance issue
ParamValue norm = mEditController->getIEditController ()->getParamNormalized (paramID);
ParamValue plain = mEditController->getIEditController ()->normalizedParamToPlain (paramID, norm);
// plain is something like -6 (-6dB)
}
}
Default implementation for a VST 3 edit controller.
Edit controller component interface extension: Vst::IParameterFunctionName.
#define DEFINE_INTERFACES
Start defining interfaces.
Definition fobject.h:387
#define DEF_INTERFACE(InterfaceName)
Add a interfaces.
Definition fobject.h:394
#define END_DEFINE_INTERFACES(BaseClass)
End defining interfaces.
Definition fobject.h:400
uint32 ParamID
parameter identifier
Definition vsttypes.h:81
double ParamValue
parameter value type
Definition vsttypes.h:80
int32 UnitID
unit identifier
Definition vsttypes.h:79

Definition at line 131 of file ivstparameterfunctionname.h.

Member Function Documentation

◆ getParameterIDFromFunctionName()

virtual tresult PLUGIN_API Steinberg::Vst::IParameterFunctionName::getParameterIDFromFunctionName ( UnitID  unitID,
FIDString  functionName,
ParamID paramID 
)
pure virtual

Gets for the given unitID the associated paramID to a function Name.

Returns kResultFalse when no found parameter (paramID is set to kNoParamId in this case).

Member Data Documentation

◆ iid

const FUID Steinberg::Vst::IParameterFunctionName::iid
static

Definition at line 140 of file ivstparameterfunctionname.h.


The documentation for this class was generated from the following file: