VST 3 SDK  VST 3.6.7
SDK for developing VST Plug-in
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups Pages
Public Member Functions | Data Fields
RangeParameter Class Reference

Description of a RangeParameter. More...

#include <vstparameters.h>

+ Inheritance diagram for RangeParameter:

Public Member Functions

 RangeParameter (const ParameterInfo &paramInfo, ParamValue min, ParamValue max)
 
 RangeParameter (const TChar *title, ParamID tag, const TChar *units=0, ParamValue minPlain=0., ParamValue maxPlain=1., ParamValue defaultValuePlain=0., int32 stepCount=0, int32 flags=ParameterInfo::kCanAutomate, UnitID unitID=kRootUnitId)
 
virtual ParamValue getMin () const
 Gets the minimum plain value, same as toPlain (0). More...
 
virtual void setMin (ParamValue value)
 Sets the minimum plain value. More...
 
virtual ParamValue getMax () const
 Gets the maximum plain value, same as toPlain (1). More...
 
virtual void setMax (ParamValue value)
 Sets the maximum plain value. More...
 
virtual void toString (ParamValue _valueNormalized, String128 string) const SMTG_OVERRIDE
 Converts a normalized value to a string. More...
 
virtual bool fromString (const TChar *string, ParamValue &_valueNormalized) const SMTG_OVERRIDE
 Converts a string to a normalized value. More...
 
virtual ParamValue toPlain (ParamValue _valueNormalized) const SMTG_OVERRIDE
 Converts a normalized value to plain value (e.g. More...
 
virtual ParamValue toNormalized (ParamValue plainValue) const SMTG_OVERRIDE
 Converts a plain value to a normalized value (e.g. More...
 
- Public Member Functions inherited from Parameter
 Parameter ()
 
 Parameter (const ParameterInfo &)
 
 Parameter (const TChar *title, ParamID tag, const TChar *units=0, ParamValue defaultValueNormalized=0., int32 stepCount=0, int32 flags=ParameterInfo::kCanAutomate, UnitID unitID=kRootUnitId)
 
virtual ~Parameter ()
 
const ParameterInfogetInfo () const
 Returns its readonly info. More...
 
ParameterInfogetInfo ()
 Returns its writeable info. More...
 
void setUnitID (UnitID id)
 Sets its associated UnitId. More...
 
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...
 
int32 getPrecision () const
 Gets the current precision (used for string representation of float). More...
 
void setPrecision (int32 val)
 Sets the precision for string representation of float value (for example 4.34 with 2 as precision). More...
 

Data Fields

OBJ_METHODS(RangeParameter,
Parameter) protected
ParamValue 
minPlain
 
ParamValue maxPlain
 
- Data Fields inherited from Parameter
OBJ_METHODS(Parameter, FObject)
protected ParamValue 
valueNormalized
 
int32 precision
 

Detailed Description

Description of a RangeParameter.

Constructor & Destructor Documentation

RangeParameter ( const ParameterInfo paramInfo,
ParamValue  min,
ParamValue  max 
)
RangeParameter ( const TChar title,
ParamID  tag,
const TChar units = 0,
ParamValue  minPlain = 0.,
ParamValue  maxPlain = 1.,
ParamValue  defaultValuePlain = 0.,
int32  stepCount = 0,
int32  flags = ParameterInfo::kCanAutomate,
UnitID  unitID = kRootUnitId 
)

Member Function Documentation

virtual ParamValue getMin ( ) const
inlinevirtual

Gets the minimum plain value, same as toPlain (0).

virtual void setMin ( ParamValue  value)
inlinevirtual

Sets the minimum plain value.

virtual ParamValue getMax ( ) const
inlinevirtual

Gets the maximum plain value, same as toPlain (1).

virtual void setMax ( ParamValue  value)
inlinevirtual

Sets the maximum plain value.

void toString ( ParamValue  _valueNormalized,
String128  string 
) const
virtual

Converts a normalized value to a string.

Reimplemented from Parameter.

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

Converts a string to a normalized value.

Reimplemented from Parameter.

ParamValue toPlain ( ParamValue  _valueNormalized) const
virtual

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

0.5 to 10000.0Hz).

Reimplemented from Parameter.

ParamValue toNormalized ( ParamValue  plainValue) const
virtual

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

10000 to 0.5).

Reimplemented from Parameter.

Field Documentation

OBJ_METHODS (RangeParameter, Parameter) protected ParamValue minPlain
ParamValue maxPlain
Empty

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