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);
197 DCHECK_F(
fPtr !=
nullptr);
213 inline T
const &
value()
const {
return fPtr->getValue(); }
246 [[deprecated(
"Since 4.1.0 - use operator* or value() instead (ex: *fState.fBypass or fState.fBypass.value())")]]
277 DCHECK_F(
fPtr !=
nullptr);
300 inline bool update(ParamValue
const &iNewValue, ProcessData &oData)
322 [[deprecated(
"Since 4.1.0 - use operator* instead")]]
340 #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:223
T const & getValue() const
Definition: RTParameter.h:210
RTVstParam< T > & operator=(ParamType const &iValue)
Allow to write param = 3.0.
Definition: RTParameter.h:256
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:250
RTRawVstParam & operator=(ParamValue const &iValue)
Allow to write param = 0.5.
Definition: RTParameter.h:329
ParamValue const & value() const
Definition: RTParameter.h:287
ParamType denormalize(ParamValue iNormalizedValue) const
Definition: RTParameter.h:207
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:326
ParamType const & previous() const
Definition: RTParameter.h:259
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:25
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:275
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:229
T const & value() const
Definition: RTParameter.h:213
tresult addToOutput(ProcessData &oData)
Add the current normalized value as an output parameter changes which propagates the change to the vs...
Definition: RTParameter.h:243
bool hasChanged() const
Definition: RTParameter.h:238
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:281
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:294
RTRawVstParameter * fPtr
Definition: RTParameter.h:335
ParamValue const & normalizedValue() const
Return the normalized value.
Definition: RTParameter.h:216
constexpr ParamType const * operator->() const
Definition: RTParameter.h:253
ParamType fPreviousValue
Definition: RTParameter.h:137
ParamValue fPreviousNormalizedValue
Definition: RTParameter.h:83
ParamID getParamID() const
Definition: RTParameter.h:201
This is the main class that the plugin should use as it exposes only the necessary methods of the par...
Definition: RTParameter.h:272
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:300
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:204
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:332
bool hasChanged() const
Definition: RTParameter.h:314
tresult addToOutput(ProcessData &oData)
Add the current normalized value as an output parameter changes which propagates the change to the vs...
Definition: RTParameter.h:319
RTVstParameter< T > * fPtr
Definition: RTParameter.h:262
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:284
ParamType fValue
Definition: RTParameter.h:136
ParamValue normalize(ParamType const &iValue) const
Definition: RTParameter.h:111