Public Member Functions | List of all members
DownsampledSmoother< DownsamplingFactor > Class Template Reference

A lowpass filter that can be used to smooth parameter changes. More...

Public Member Functions

 DownsampledSmoother ()
 Creates a new smoother. More...
 
float getSmoothingTime () const
 Returns the smoothing time in seconds. More...
 
void prepareToPlay (double sampleRate_)
 Sets the internal sample rate. More...
 
void setDefaultValue (float value)
 Sets the internal value to the given number. More...
 
void setSmoothingTime (float newSmoothTime)
 Sets the smoothing time in seconds. More...
 
float smooth (float newValue)
 smooth the next sample. More...
 

Detailed Description

template<int DownsamplingFactor>
class hise::DownsampledSmoother< DownsamplingFactor >

A lowpass filter that can be used to smooth parameter changes.

Constructor & Destructor Documentation

DownsampledSmoother ( )
inline

Creates a new smoother.

If you use this manually, you have to call prepareToPlay() and setSmoothingTime() before using it.

Member Function Documentation

float getSmoothingTime ( ) const
inline

Returns the smoothing time in seconds.

void prepareToPlay ( double  sampleRate_)
inline

Sets the internal sample rate.

Call this method before setting the smooth time.

void setDefaultValue ( float  value)
inline

Sets the internal value to the given number.

Use this to prevent clicks for the first smoothing operation (default is 0.0)

void setSmoothingTime ( float  newSmoothTime)
inline

Sets the smoothing time in seconds.

If you pass 0.0 as parameter, the smoother gets deactivated and saves precious CPU cycles.

float smooth ( float  newValue)
inline

smooth the next sample.

©2017 HISE. This documentation is autogenerated from the HISE source code using Doxygen.