Jamba C++ API  4.1.0
RTRawVstParameter Class Reference

Base class which deals with the "raw"/untyped parameter and keep the normalized value (ParamValue in the range [0.0,1.0]). More...

#include <RTParameter.h>

Inherited by RTVstParameter< T >.

Public Member Functions

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
 
virtual bool resetPreviousValue ()
 Called at the end of the frame so that previous value is set to current value for the next frame. More...
 
 RTRawVstParameter (std::shared_ptr< RawVstParamDef > iParamDef)
 
virtual bool updateNormalizedValue (ParamValue iNormalizedValue)
 Update the parameter with a new normalized value. More...
 

Protected Attributes

ParamValue fNormalizedValue
 
std::shared_ptr< RawVstParamDef > fParamDef
 
ParamValue fPreviousNormalizedValue
 

Detailed Description

Base class which deals with the "raw"/untyped parameter and keep the normalized value (ParamValue in the range [0.0,1.0]).

Also keeps the "previous" value which is the value the param had in the previous frame/call to process.

Constructor & Destructor Documentation

◆ RTRawVstParameter()

RTRawVstParameter ( std::shared_ptr< RawVstParamDef >  iParamDef)
inlineexplicit

Member Function Documentation

◆ addToOutput()

tresult addToOutput ( ProcessData &  oData)

Add the current normalized value as an output parameter changes.

◆ getNormalizedValue()

ParamValue const& getNormalizedValue ( ) const
inline

◆ getParamDef()

RawVstParamDef const* getParamDef ( ) const
inline

◆ getParamID()

ParamID getParamID ( ) const
inline

◆ getPreviousNormalizedValue()

ParamValue const& getPreviousNormalizedValue ( ) const
inline

◆ hasChanged()

bool hasChanged ( ) const
inline
Returns
true if the parameter has changed within the frame (previous and current are different)

◆ resetPreviousValue()

bool resetPreviousValue ( )
virtual

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 in RTVstParameter< T >.

◆ updateNormalizedValue()

bool updateNormalizedValue ( ParamValue  iNormalizedValue)
virtual

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 in RTVstParameter< T >.

Member Data Documentation

◆ fNormalizedValue

ParamValue fNormalizedValue
protected

◆ fParamDef

std::shared_ptr<RawVstParamDef> fParamDef
protected

◆ fPreviousNormalizedValue

ParamValue fPreviousNormalizedValue
protected

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