JUCE
Public Member Functions | List of all members
LinearSmoothedValue< FloatType > Class Template Reference

Utility class for linearly smoothed values like volume etc. More...

Public Member Functions

 LinearSmoothedValue () noexcept
 Constructor. More...
 
 LinearSmoothedValue (FloatType initialValue) noexcept
 Constructor. More...
 
void reset (double sampleRate, double rampLengthInSeconds) noexcept
 Reset to a new sample rate and ramp length. More...
 
void setValue (FloatType newValue) noexcept
 Set a new target value. More...
 
FloatType getNextValue () noexcept
 Compute the next value. More...
 

Detailed Description

template<typename FloatType>
class LinearSmoothedValue< FloatType >

Utility class for linearly smoothed values like volume etc.

that should not change abruptly but as a linear ramp, to avoid audio glitches.

Constructor & Destructor Documentation

template<typename FloatType>
LinearSmoothedValue< FloatType >::LinearSmoothedValue ( )
noexcept

Constructor.

template<typename FloatType>
LinearSmoothedValue< FloatType >::LinearSmoothedValue ( FloatType  initialValue)
noexcept

Constructor.

Member Function Documentation

template<typename FloatType>
void LinearSmoothedValue< FloatType >::reset ( double  sampleRate,
double  rampLengthInSeconds 
)
noexcept

Reset to a new sample rate and ramp length.

template<typename FloatType>
void LinearSmoothedValue< FloatType >::setValue ( FloatType  newValue)
noexcept

Set a new target value.

template<typename FloatType>
FloatType LinearSmoothedValue< FloatType >::getNextValue ( )
noexcept

Compute the next value.


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