18 #include <pluginterfaces/vst/ivstaudioprocessor.h> 20 #ifndef __PONGASOFT_VST_RT_PARAMETER_H__ 21 #define __PONGASOFT_VST_RT_PARAMETER_H__ 24 #include <pongasoft/logging/logging.h> 107 return static_cast<VstParamDef<T>
const *
>(
getParamDef());
148 fValue = denormalize(iNormalizedValue);
163 fPreviousValue = fValue;
177 fNormalizedValue = normalize(fValue);
211 inline T
const &
value()
const {
return fPtr->getValue(); }
244 [[deprecated(
"Since 4.1.0 - use operator* or value() instead (ex: *fState.fBypass or fState.fBypass.value())")]]
296 inline bool update(ParamValue
const &iNewValue, ProcessData &oData)
318 [[deprecated(
"Since 4.1.0 - use operator* instead")]]
336 #endif // __PONGASOFT_VST_RT_PARAMETER_H__ RTVstParameter(VstParam< T > iParamDef)
Definition: RTParameter.h:97
void update(ParamType const &iNewValue)
This method is typically called during the processing method when the plugin needs to update the valu...
Definition: RTParameter.h:174
ParamType denormalize(ParamValue iNormalizedValue) const
Definition: RTParameter.h:114
This is the main class that the plugin should use as it exposes only the necessary methods of the par...
Definition: RTParameter.h:190
ParamValue fNormalizedValue
Definition: RTParameter.h:82
void update(ParamType const &iNewValue)
This method is typically called during the processing method when the plugin needs to update the valu...
Definition: RTParameter.h:221
T const & getValue() const
Definition: RTParameter.h:208
RTVstParam< T > & operator=(ParamType const &iValue)
Allow to write param = 3.0.
Definition: RTParameter.h:254
constexpr ParamType const & operator *() const
allow writing *param to access the underlying value (or in other words, *param is the same param....
Definition: RTParameter.h:248
RTRawVstParam & operator=(ParamValue const &iValue)
Allow to write param = 0.5.
Definition: RTParameter.h:325
ParamValue const & value() const
Definition: RTParameter.h:283
ParamType denormalize(ParamValue iNormalizedValue) const
Definition: RTParameter.h:205
RawVstParamDef const * getParamDef() const
Definition: RTParameter.h:48
ParamValue operator *() const
allow writing *param to access the underlying value (or in other words, *param is the same param....
Definition: RTParameter.h:322
ParamType const & previous() const
Definition: RTParameter.h:257
Implements all the various equality and relational operators for the type T which is assumed to encap...
Definition: Operators.h:54
VstParamDef< T > const * getParamDefT() const
Definition: RTParameter.h:105
T ParamType
Definition: RTParameter.h:94
Definition: RTJmbInParameter.h:27
bool resetPreviousValue() override
Called at the end of the frame so that previous value is set to current value for the next frame.
Definition: RTParameter.h:159
ParamType const & getValue() const
Definition: RTParameter.h:123
RTRawVstParam(RTRawVstParameter *iPtr)
Definition: RTParameter.h:273
void update(ParamType const &iNewValue, ProcessData &oData)
This method is typically called during the processing method when the plugin needs to update the valu...
Definition: RTParameter.h:227
T const & value() const
Definition: RTParameter.h:211
tresult addToOutput(ProcessData &oData)
Add the current normalized value as an output parameter changes which propagates the change to the vs...
Definition: RTParameter.h:241
bool hasChanged() const
Definition: RTParameter.h:236
RTVstParam(RTVstParameter< T > *iPtr)
Definition: RTParameter.h:195
bool updateNormalizedValue(ParamValue iNormalizedValue) override
Update the parameter with a new normalized value.
Definition: RTParameter.h:144
tresult addToOutput(ProcessData &oData)
Add the current normalized value as an output parameter changes.
Definition: RTParameter.cpp:29
ParamID getParamID() const
Definition: RTParameter.h:277
bool hasChanged() const
Definition: RTParameter.h:72
ParamType const & getPreviousValue() const
Definition: RTParameter.h:126
ParamValue const & getPreviousNormalizedValue() const
Definition: RTParameter.h:62
bool update(ParamValue const &iNewValue)
This method is typically called during the processing method when the plugin needs to update the valu...
Definition: RTParameter.h:290
RTRawVstParameter * fPtr
Definition: RTParameter.h:331
ParamValue const & normalizedValue() const
Return the normalized value.
Definition: RTParameter.h:214
constexpr ParamType const * operator->() const
Definition: RTParameter.h:251
ParamType fPreviousValue
Definition: RTParameter.h:137
ParamValue fPreviousNormalizedValue
Definition: RTParameter.h:83
ParamID getParamID() const
Definition: RTParameter.h:199
This is the main class that the plugin should use as it exposes only the necessary methods of the par...
Definition: RTParameter.h:270
RTRawVstParameter(std::shared_ptr< RawVstParamDef > iParamDef)
Definition: RTParameter.h:38
bool update(ParamValue const &iNewValue, ProcessData &oData)
This method is typically called during the processing method when the plugin needs to update the valu...
Definition: RTParameter.h:296
virtual bool updateNormalizedValue(ParamValue iNormalizedValue)
Update the parameter with a new normalized value.
Definition: RTParameter.cpp:49
virtual bool resetPreviousValue()
Called at the end of the frame so that previous value is set to current value for the next frame.
Definition: RTParameter.cpp:65
ParamValue normalize(ParamType const &iValue) const
Definition: RTParameter.h:202
Base class which deals with the "raw"/untyped parameter and keep the normalized value (ParamValue in ...
Definition: RTParameter.h:34
ParamValue const & getNormalizedValue() const
Definition: RTParameter.h:59
The typed version.
Definition: RTParameter.h:91
ParamValue const & previous() const
Definition: RTParameter.h:328
bool hasChanged() const
Definition: RTParameter.h:310
tresult addToOutput(ProcessData &oData)
Add the current normalized value as an output parameter changes which propagates the change to the vs...
Definition: RTParameter.h:315
RTVstParameter< T > * fPtr
Definition: RTParameter.h:260
T ParamType
Definition: RTParameter.h:192
std::shared_ptr< RawVstParamDef > fParamDef
Definition: RTParameter.h:81
ParamID getParamID() const
Definition: RTParameter.h:45
ParamValue const & getValue() const
Definition: RTParameter.h:280
ParamType fValue
Definition: RTParameter.h:136
ParamValue normalize(ParamType const &iValue) const
Definition: RTParameter.h:111