VST 3 SDK  VST 3.6.14
SDK for developing VST Plug-in
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups Pages
Parameter Class Reference

Description of a Parameter. More...

#include <vstparameters.h>

+ Inheritance diagram for Parameter:

Public Member Functions

 Parameter ()
 
 Parameter (const ParameterInfo &)
 
 Parameter (const TChar *title, ParamID tag, const TChar *units=nullptr, ParamValue defaultValueNormalized=0., int32 stepCount=0, int32 flags=ParameterInfo::kCanAutomate, UnitID unitID=kRootUnitId, const TChar *shortTitle=nullptr)
 
 ~Parameter () override
 
virtual const ParameterInfogetInfo () const
 Returns its read only info. More...
 
virtual ParameterInfogetInfo ()
 Returns its writable info. More...
 
virtual void setUnitID (UnitID id)
 Sets its associated UnitId. More...
 
virtual UnitID getUnitID ()
 Gets its associated UnitId. More...
 
ParamValue getNormalized () const
 Gets its normalized value [0.0, 1.0]. More...
 
virtual bool setNormalized (ParamValue v)
 Sets its normalized value [0.0, 1.0]. More...
 
virtual void toString (ParamValue valueNormalized, String128 string) const
 Converts a normalized value to a string. More...
 
virtual bool fromString (const TChar *string, ParamValue &valueNormalized) const
 Converts a string to a normalized value. More...
 
virtual ParamValue toPlain (ParamValue valueNormalized) const
 Converts a normalized value to plain value (e.g. More...
 
virtual ParamValue toNormalized (ParamValue plainValue) const
 Converts a plain value to a normalized value (e.g. More...
 
virtual int32 getPrecision () const
 Gets the current precision (used for string representation of float). More...
 
virtual void setPrecision (int32 val)
 Sets the precision for string representation of float value (for example 4.34 with 2 as precision). More...
 

Public Attributes

OBJ_METHODS(Parameter, FObject)
protected ParamValue 
valueNormalized
 
int32 precision
 

Detailed Description

Description of a Parameter.

Constructor & Destructor Documentation

Parameter ( )
Parameter ( const ParameterInfo info)
Parameter ( const TChar title,
ParamID  tag,
const TChar units = nullptr,
ParamValue  defaultValueNormalized = 0.,
int32  stepCount = 0,
int32  flags = ParameterInfo::kCanAutomate,
UnitID  unitID = kRootUnitId,
const TChar shortTitle = nullptr 
)
~Parameter ( )
override

Member Function Documentation

virtual const ParameterInfo& getInfo ( ) const
inlinevirtual

Returns its read only info.

virtual ParameterInfo& getInfo ( )
inlinevirtual

Returns its writable info.

virtual void setUnitID ( UnitID  id)
inlinevirtual

Sets its associated UnitId.

virtual UnitID getUnitID ( )
inlinevirtual

Gets its associated UnitId.

ParamValue getNormalized ( ) const
inline

Gets its normalized value [0.0, 1.0].

bool setNormalized ( ParamValue  v)
virtual

Sets its normalized value [0.0, 1.0].

void toString ( ParamValue  valueNormalized,
String128  string 
) const
virtual

Converts a normalized value to a string.

Reimplemented in StringListParameter, and RangeParameter.

bool fromString ( const TChar string,
ParamValue valueNormalized 
) const
virtual

Converts a string to a normalized value.

Reimplemented in StringListParameter, and RangeParameter.

ParamValue toPlain ( ParamValue  valueNormalized) const
virtual

Converts a normalized value to plain value (e.g.

0.5 to 10000.0Hz).

Reimplemented in StringListParameter, and RangeParameter.

ParamValue toNormalized ( ParamValue  plainValue) const
virtual

Converts a plain value to a normalized value (e.g.

10000 to 0.5).

Reimplemented in StringListParameter, and RangeParameter.

virtual int32 getPrecision ( ) const
inlinevirtual

Gets the current precision (used for string representation of float).

virtual void setPrecision ( int32  val)
inlinevirtual

Sets the precision for string representation of float value (for example 4.34 with 2 as precision).

Member Data Documentation

OBJ_METHODS (Parameter, FObject) protected ParamValue valueNormalized
int32 precision
Empty

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