Copyright © 2005-2019 MultiMedia Soft

VST.ProgramParamGetValue method

Previous pageReturn to chapter overviewNext page

Remarks

 

Obtains the current value for the specific parameter related to the given program.

 

For further details about methods related to the use of VST effects refer to the VSTs class.

For further details about managing a VST effect refer to the How to manage VST effects tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function ProgramParamGetValue (

nPlayerIndex as Int16,

nIdVST as Int32,

nProgramIndex as Int16,

nParamIndex as Int16,

fValue as Single

) as enumErrorCodes


 

[C#]

public enumErrorCodes ProgramParamGetValue (

Int16 nPlayerIndex,

Int32 nIdVST,

Int16 nProgramIndex,

Int16 nParamIndex,

ref float fValue

);


 

[C++]

public: enumErrorCodes ProgramParamGetValue (

Int16 nPlayerIndex,

Int32 nIdVST,

Int16 nProgramIndex,

Int16 nParamIndex,

float __gc *fValue

);


 

 

Parameter

Description

 

 

nPlayerIndex

Number representing the zero-based index of the involved player

nIdVST

Unique identifier of the VST effect as returned by the VST.EffectLoad or VST.InstrumentLoad methods.

nProgramIndex

Zero-based index of the program

nParamIndex

Zero-based index of the parameter

fValue

Reference that, after returning from the method call, will contain the current value of the given parameter.

Values returned by this method are always in the range between 0.0 and 1.0, however, from the view of a VST effect, they may represent completely different values. In general, this value represents the ratio between the minimum and maximum values that the parameter could assume and not the "real" value of the parameter; if for example a certain parameter should have values inside the range 0-256, a value of 128 would be returned as 0.5.

Unfortunately the VST SDK doesn't provide information about "real" minimum and maximum values but only the ratio or, in alternative, the current value in a readable format through a string returned by the call to the VST.ProgramParamGetInfo method having the nInfo parameter set to VST_PARAM_INFO_DISPLAY.

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.NOERROR (0)

The method call was successful.