DISTRHO Plugin Framework
Public Member Functions | List of all members
LinearValueSmoother Class Reference

A linear smoother for control values. More...

#include <ValueSmoother.hpp>

Public Member Functions

void setSampleRate (const float newSampleRate) noexcept
 
void setTimeConstant (const float newTau) noexcept
 
float getCurrentValue () const noexcept
 
float getTargetValue () const noexcept
 
void setTargetValue (const float newTarget) noexcept
 
void clearToTargetValue () noexcept
 
float peek () const noexcept
 
float next () noexcept
 

Detailed Description

A linear smoother for control values.

This continually smooths a value towards a defined target, using linear segments.

The duration of the smoothing segment is defined by the given time constant. Every time the target changes, a new segment restarts for the whole duration of the time constant.

Note that this smoother, unlike an exponential smoother, eventually should converge to its target value.


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