ASPiK SDK
Loading...
Searching...
No Matches
ParamSmoother< T > Class Template Reference

The ParamSmoother object performs parameter smoothing on GUI control information. You can choose linear or exponential smoothing. More...

#include <guiconstants.h>

Public Member Functions

void setSampleRate (T samplingRate)
 
void initParamSmoother (T smoothingTimeInMs, T samplingRate, T initValue, T minControlValue, T maxControlValue, smoothingMethod smoother=smoothingMethod::kLPFSmoother)
 
bool smoothParameter (T in, T &out)
 

Detailed Description

template<class T>
class ParamSmoother< T >

The ParamSmoother object performs parameter smoothing on GUI control information. You can choose linear or exponential smoothing.

Author
Will Pirkle http://www.willpirkle.com
Remarks
This object is included in Designing Audio Effects Plugins in C++ 2nd Ed. by Will Pirkle
Version
Revision : 1.0
Date
Date : 2018 / 09 / 7

Member Function Documentation

◆ initParamSmoother()

template<class T >
void ParamSmoother< T >::initParamSmoother ( smoothingTimeInMs,
samplingRate,
initValue,
minControlValue,
maxControlValue,
smoothingMethod  smoother = smoothingMethod::kLPFSmoother 
)
inline

initialize the smoother; this recalculates internal coefficients

Parameters
smoothingTimeInMsthe smoothing time in mSec to move from the two control extrema (min and max values)
samplingRatethe new sampling rate
initValueinitial (pre-smoothed) value
minControlValueminimum numerical value control takes
maxControlValuemaximum numerical value control takes
smoothertype of smoothing

◆ setSampleRate()

template<class T >
void ParamSmoother< T >::setSampleRate ( samplingRate)
inline

set a new sample rate; this recalculates internal coefficients

Parameters
samplingRatethe new sampling rate

◆ smoothParameter()

template<class T >
bool ParamSmoother< T >::smoothParameter ( in,
T &  out 
)
inline

perform smoothing operation

Parameters
ininput sample
outsmoothed value
Returns
true if smoothing occurred, false otherwise (e.g. once control has assumed final value, smoothing is turned off)

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