Jamba C++ API  5.1.1
RTVstParameter< T > Class Template Reference

The typed version. More...

#include <RTParameter.h>

Inherits RTRawVstParameter.

Public Types

using ParamType = T
 

Public Member Functions

ParamType denormalize (ParamValue iNormalizedValue) const
 
VstParamDef< T > const * getParamDefT () const
 
ParamType const & getPreviousValue () const
 
ParamType const & getValue () const
 
ParamValue normalize (ParamType const &iValue) const
 
 RTVstParameter (VstParam< T > iParamDef)
 
void update (ParamType const &iNewValue)
 This method is typically called during the processing method when the plugin needs to update the value. More...
 
- Public Member Functions inherited from RTRawVstParameter
tresult addToOutput (ProcessData &oData)
 Add the current normalized value as an output parameter changes. More...
 
ParamValue const & getNormalizedValue () const
 
RawVstParamDef const * getParamDef () const
 
ParamID getParamID () const
 
ParamValue const & getPreviousNormalizedValue () const
 
bool hasChanged () const
 
 RTRawVstParameter (std::shared_ptr< RawVstParamDef > iParamDef)
 

Protected Member Functions

bool resetPreviousValue () override
 Called at the end of the frame so that previous value is set to current value for the next frame. More...
 
bool updateNormalizedValue (ParamValue iNormalizedValue) override
 Update the parameter with a new normalized value. More...
 

Protected Attributes

ParamType fPreviousValue
 
ParamType fValue
 
- Protected Attributes inherited from RTRawVstParameter
ParamValue fNormalizedValue
 
std::shared_ptr< RawVstParamDef > fParamDef
 
ParamValue fPreviousNormalizedValue
 

Detailed Description

template<typename T>
class pongasoft::VST::RT::RTVstParameter< T >

The typed version.

Maintains the denormalized (aka "typed") version of the value and previous value.

Template Parameters
Tthe underlying type of the param

Member Typedef Documentation

◆ ParamType

using ParamType = T

Constructor & Destructor Documentation

◆ RTVstParameter()

RTVstParameter ( VstParam< T >  iParamDef)
inlineexplicit

Member Function Documentation

◆ denormalize()

ParamType denormalize ( ParamValue  iNormalizedValue) const
inline

◆ getParamDefT()

VstParamDef<T> const* getParamDefT ( ) const
inline

◆ getPreviousValue()

ParamType const& getPreviousValue ( ) const
inline

◆ getValue()

ParamType const& getValue ( ) const
inline

◆ normalize()

ParamValue normalize ( ParamType const &  iValue) const
inline

◆ resetPreviousValue()

bool resetPreviousValue ( )
overrideprotectedvirtual

Called at the end of the frame so that previous value is set to current value for the next frame.

Returns
true if previous value was different than current value

Reimplemented from RTRawVstParameter.

◆ update()

void update ( ParamType const &  iNewValue)

This method is typically called during the processing method when the plugin needs to update the value.

In general the change needs to be propagated to the VST sdk (using addToOutput).

◆ updateNormalizedValue()

bool updateNormalizedValue ( ParamValue  iNormalizedValue)
overrideprotectedvirtual

Update the parameter with a new normalized value.

This is typically called after the VST parameter managed by the VST sdk changes (for example, moving a knob or loading a previously saved plugin)

Returns
true if the value was actually updated, false if it is the same

Reimplemented from RTRawVstParameter.

Member Data Documentation

◆ fPreviousValue

ParamType fPreviousValue
protected

◆ fValue

ParamType fValue
protected

The documentation for this class was generated from the following file: