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

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
RangeParameter Class Reference
VST Implementation Helper Classes

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=nullptr, ParamValue minPlain=0., ParamValue maxPlain=1., ParamValue defaultValuePlain=0., int32 stepCount=0, int32 flags=ParameterInfo::kCanAutomate, UnitID unitID=kRootUnitId, const TChar *shortTitle=nullptr)
virtual ParamValue | getMin () const
| Gets the minimum plain value, same as toPlain (0).
virtual void | setMin (ParamValue value)
| Sets the minimum plain value.
virtual ParamValue | getMax () const
| Gets the maximum plain value, same as toPlain (1).
virtual void | setMax (ParamValue value)
| Sets the maximum plain value.
void | toString (ParamValue _valueNormalized, String128 string) const SMTG_OVERRIDE
| Converts a normalized value to a string.
bool | fromString (const TChar *string, ParamValue &_valueNormalized) const SMTG_OVERRIDE
| Converts a string to a normalized value.
ParamValue | toPlain (ParamValue _valueNormalized) const SMTG_OVERRIDE
| Converts a normalized value to plain value (e.g.
ParamValue | toNormalized (ParamValue plainValue) const SMTG_OVERRIDE
| Converts a plain value to a normalized value (e.g.
Public Member Functions inherited from Parameter
| 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 ParameterInfo & | getInfo () const
| Returns its read only info.
virtual ParameterInfo & | getInfo ()
| Returns its writable info.
virtual void | setUnitID (UnitID id)
| Sets its associated UnitId.
virtual UnitID | getUnitID ()
| Gets its associated UnitId.
ParamValue | getNormalized () const
| Gets its normalized value [0.0, 1.0].
virtual bool | setNormalized (ParamValue v)
| Sets its normalized value [0.0, 1.0].
virtual int32 | getPrecision () const
| Gets the current precision (used for string representation of float).
virtual void | setPrecision (int32 val)
| Sets the precision for string representation of float value (for example 4.34 with 2 as precision).

## Public Attributes
OBJ_METHODS(RangeParameter, Parameter) protected ParamValue | minPlain
ParamValue | maxPlain
Public Attributes inherited from Parameter
OBJ_METHODS(Parameter, FObject) protected ParamValue | valueNormalized {0.}
int32 | precision {4}

## Detailed Description

Description of a RangeParameter.

## Constructor & Destructor Documentation

## ◆ RangeParameter() [1/2]

RangeParameter | ( | const ParameterInfo & | paramInfo,
|  | ParamValue | min,
|  | ParamValue | max )

## ◆ RangeParameter() [2/2]

RangeParameter | ( | const TChar * | title,
|  | ParamID | tag,
|  | const TChar * | units = nullptr,
|  | ParamValue | minPlain = 0.,
|  | ParamValue | maxPlain = 1.,
|  | ParamValue | defaultValuePlain = 0.,
|  | int32 | stepCount = 0,
|  | int32 | flags = ParameterInfo::kCanAutomate,
|  | UnitID | unitID = kRootUnitId,
|  | const TChar * | shortTitle = nullptr )

## Member Function Documentation

## ◆ getMin()

virtual ParamValue getMin | ( |  | ) | const
| inline virtual

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

## ◆ setMin()

virtual void setMin | ( | ParamValue | value | ) |
| inline virtual

Sets the minimum plain value.

## ◆ getMax()

virtual ParamValue getMax | ( |  | ) | const
| inline virtual

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

## ◆ setMax()

virtual void setMax | ( | ParamValue | value | ) |
| inline virtual

Sets the maximum plain value.

## ◆ toString()

void toString | ( | ParamValue | _valueNormalized,
|  | String128 | string ) const
| virtual

Converts a normalized value to a string.

Reimplemented from Parameter.

## ◆ fromString()

bool fromString | ( | const TChar * | string,
|  | ParamValue & | _valueNormalized ) const
| virtual

Converts a string to a normalized value.

Reimplemented from Parameter.

## ◆ toPlain()

ParamValue toPlain | ( | ParamValue | _valueNormalized | ) | const
| virtual

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

0.5 to 10000.0Hz).

Reimplemented from Parameter.

## ◆ toNormalized()

ParamValue toNormalized | ( | ParamValue | plainValue | ) | const
| virtual

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

10000 to 0.5).

Reimplemented from Parameter.

## Member Data Documentation

## ◆ minPlain

OBJ_METHODS (RangeParameter, Parameter) protected ParamValue minPlain

## ◆ maxPlain

ParamValue maxPlain

Empty

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