Plug-In Parameters


IPlugController

Inheritance: FUnknown <- IPlugController
Include File:  iplugparams.h

A Plug-In exposes its parameters to the host application with the IPlugController interface. The host asks for parameter objects which are then used e.g. for Automation, Storage and User Interface issues.

In practice, Plug-Ins should implement IGenericPlugController which is derived from IPlugController and provides additional functionality, e.g. to enumerate the available parameters.

Methods:


IPlugController::getParameter

Get a parameter by name. On return, pp has to be set to an IParameter pointer, or NULL if the specified name is invalid.

Remarks:

The Plug-In or host must NOT increment the reference count of the parameter object. Parameters have to exist as long as their controllers exist and must be destroyed afterwards.


IPlugController::parameterChanged

The value of parameter p has changed. The reason may be Plug-In Automation or a control manipulation in the Plug-In Editor by the user. tag is the identifier assigned to this parameter with IParameter::connect.


IGenericPlugController

Inheritance: FUnknown <- IPlugController <- IGenericPlugController
Include File:  iplugparams.h

The IGenericPlugController interface allows the host to enumerate the available parameters of a Plug-In.

Methods:


IGenericPlugController::countParameters

long PLUGIN_API countParameters ()

Returns the number of available parameters.


IGenericPlugController::getParameterName

tresult PLUGIN_API getParameterName (long index, char str[128])

Copy the name of a parameter at position index into buffer str.


IGenericPlugController::getParameterIndexed

Get the parameter object at the specified index. On return, pp has to be set to an IParameter pointer, or NULL if the specified index is invalid.

  See remarks for IPlugController::getParameter


IParameter

Inheritance: FUnknown <- IParameter
Include File:  iplugparams.h

This interface represents a parameter object. It has methods to manipulate its current value, string conversion, etc.

The SDK provides implementations of basic parameter types (integer, string, list) which should meet most requirements.

Methods:


IParameter::toString

void PLUGIN_API toString (char str[128])

Converts the current value to its string representation e.g. a value of zero can produce strings like "0", "Zero", "Off", ...


IParameter::fromString

void PLUGIN_API fromString (const char* str)

Sets the current value from a string e.g. the string is "Off", could mean a parameter value of zero.


IParameter::getValue

long PLUGIN_API getValue ()

Returns the current integer value of a parameter.


IParameter::setValue

void PLUGIN_API setValue (long value)

Sets the current parameter value.


IParameter::getMinValue

long PLUGIN_API getMinValue ()

Returns the minimum integer value of a parameter.


IParameter::getMaxValue

long PLUGIN_API getMaxValue ()

Returns the maximum integer value of a parameter.


IParameter::connect

Connects a parameter to a controller object, using the specified identifier tag. The specified controller c then will be notified on value changes through its IPlugController::parameterChanged method.

Remarks:

Initially, all public parameter objects must be connected to the controller which exposes those parameters to the host application. The host does NOT modify parameter connections!



Copyright ©2004 Steinberg Media Technologies GmbH. All Rights Reserved.
Last Modified: