VST 3 SDK: Parameter Class Reference
Author: Steinberg

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

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

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=kStepCountContinuous, 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 void | toString (ParamValue valueNormalized, String128 string) const
| Converts a normalized value to a string.
virtual bool | fromString (const TChar *string, ParamValue &valueNormalized) const
| Converts a string to a normalized value.
virtual ParamValue | toPlain (ParamValue valueNormalized) const
| Converts a normalized value to plain value (e.g.
virtual ParamValue | toNormalized (ParamValue plainValue) const
| Converts a plain value to a normalized value (e.g.
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(Parameter, FObject) protected ParamValue | valueNormalized {0.}
int32 | precision {4}

## Detailed Description

Description of a Parameter.

## Constructor & Destructor Documentation

## ◆ Parameter() [1/3]

Parameter | ( |  | ) |

## ◆ Parameter() [2/3]

Parameter | ( | const ParameterInfo & | info | ) |

## ◆ Parameter() [3/3]

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

## ◆ ~Parameter()

~Parameter | ( |  | ) |
| override

## Member Function Documentation

## ◆ getInfo() [1/2]

virtual const ParameterInfo & getInfo | ( |  | ) | const
| inlinevirtual

Returns its read only info.

## ◆ getInfo() [2/2]

virtual ParameterInfo & getInfo | ( |  | ) |
| inlinevirtual

Returns its writable info.

## ◆ setUnitID()

virtual void setUnitID | ( | UnitID | id | ) |
| inlinevirtual

Sets its associated UnitId.

## ◆ getUnitID()

virtual UnitID getUnitID | ( |  | ) |
| inlinevirtual

Gets its associated UnitId.

## ◆ getNormalized()

ParamValue getNormalized | ( |  | ) | const
| inline

Gets its normalized value [0.0, 1.0].

## ◆ setNormalized()

bool setNormalized | ( | ParamValue | v | ) |
| virtual

Sets its normalized value [0.0, 1.0].

## ◆ toString()

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

Converts a normalized value to a string.

Reimplemented in RangeParameter, and StringListParameter.

## ◆ fromString()

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

Converts a string to a normalized value.

Reimplemented in RangeParameter, and StringListParameter.

## ◆ toPlain()

ParamValue toPlain | ( | ParamValue | valueNormalized | ) | const
| virtual

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

0.5 to 10000.0Hz).

Reimplemented in RangeParameter, and StringListParameter.

## ◆ toNormalized()

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

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

10000 to 0.5).

Reimplemented in RangeParameter, and StringListParameter.

## ◆ getPrecision()

virtual int32 getPrecision | ( |  | ) | const
| inlinevirtual

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

## ◆ setPrecision()

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

## ◆ valueNormalized

OBJ_METHODS (Parameter, FObject) protected ParamValue valueNormalized {0.}

## ◆ precision

int32 precision {4}

Empty

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