VST 3 Interfaces: IParameterFunctionName Class Reference
Author: Steinberg

VST 3 Interfaces VST 3.7 SDK for developing VST plug-in

Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
IParameterFunctionName Class Referenceabstract

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

`#include <ivstparameterfunctionname.h>`

Inheritance diagram for IParameterFunctionName:

## Public Member Functions
virtual tresult | 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 FUnknown
virtual tresult | queryInterface (const TUID _iid, void **obj)=0
virtual uint32 | addRef ()=0
virtual uint32 | release ()=0

## Static Public Attributes
static const FUID | iid
Static Public Attributes inherited from FUnknown
static const FUID | iid

## Detailed Description

Edit controller component interface extension: Vst::IParameterFunctionName.

- [plug imp]
- [extends IEditController]
- [released: 3.7.0]
- [optional]

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)
DEFINE_INTERFACES
// ...
DEF_INTERFACE (Vst::IParameterFunctionName)
END_DEFINE_INTERFACES (Vst::EditController)
DELEGATE_REFCOUNT (Vst::EditController)
// ...
}
#include "ivstparameterfunctionname.h"
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)
}
}
Steinberg::Vst::EditController
Steinberg::Vst::IParameterFunctionName
Edit controller component interface extension: Vst::IParameterFunctionName.
Definition ivstparameterfunctionname.h:132
Steinberg::Vst::IParameterFunctionName::getParameterIDFromFunctionName
virtual tresult getParameterIDFromFunctionName(UnitID unitID, FIDString functionName, ParamID &paramID)=0
Gets for the given unitID the associated paramID to a function Name.
DELEGATE_REFCOUNT
#define DELEGATE_REFCOUNT(ClassName)
DEF_CLASS_IID
#define DEF_CLASS_IID(ClassName)
Steinberg::Vst::ParamValue
double ParamValue
parameter value type: normalized value => [0.0, 1.0]
Definition vsttypes.h:89
Steinberg::Vst::ParamID
uint32 ParamID
parameter identifier: value in range [0, 0x7FFFFFFF].
Definition vsttypes.h:90
Steinberg::Vst::UnitID
int32 UnitID
unit identifier
Definition vsttypes.h:87
ivstparameterfunctionname.h
Steinberg::Vst
All VST specific interfaces are located in Vst namespace.
Steinberg
Steinberg::tresult
int32 tresult
Steinberg::FIDString
const char8 * FIDString

## Member Function Documentation

## ◆ getParameterIDFromFunctionName()

virtual tresult 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).

Note
  [UI-thread & (Initialized | Connected)]

## Member Data Documentation

## ◆ iid

const FUID iid
| static

Empty

Copyright © Steinberg Media Technologies GmbH. All Rights Reserved. This documentation is under this license.