AME
ame::Slide< FloatType > Class Template Reference

Smooth values logarithmically. More...

#include <ame_Util.hpp>

Public Member Functions

 Slide (FloatType slownessOfIncrease, FloatType slownessOfDecrease) noexcept
 Create an Slide object. More...
 
void setSlownessOfIncrease (FloatType slownessIncrease)
 Set the slowness of the increase. More...
 
void setSlownessOfDecrease (FloatType slownessDecrease)
 Set the slowness of the decrease. More...
 
FloatType process (FloatType input) noexcept
 Filter an input value
More...
 

Detailed Description

template<std::floating_point FloatType>
class ame::Slide< FloatType >

Smooth values logarithmically.

y (n) = y (n-1) + ((x (n) - y (n-1))/slide)

Note
SlideUp and SlideDown are affected by the update interval of the process.

Constructor & Destructor Documentation

◆ Slide()

template<std::floating_point FloatType>
ame::Slide< FloatType >::Slide ( FloatType  slownessOfIncrease,
FloatType  slownessOfDecrease 
)
inlinenoexcept

Create an Slide object.

Parameters
slownessOfIncreaseThe larger the value, the more slowly the increase. If 1, no effect is applied to the increase.
slownessOfDecreaseThe larger the value, the more slowly the decrease. If 1, no effect is applied to the decrease.
Attention
DO NOT set less than 1.

Member Function Documentation

◆ process()

template<std::floating_point FloatType>
FloatType ame::Slide< FloatType >::process ( FloatType  input)
inlinenoexcept

Filter an input value

Parameters
inputValue to smooth
Returns
Smoothed value

◆ setSlownessOfDecrease()

template<std::floating_point FloatType>
void ame::Slide< FloatType >::setSlownessOfDecrease ( FloatType  slownessDecrease)
inline

Set the slowness of the decrease.

Parameters
slownessDecreaseThe larger the value, the more slowly the decrease. If 1, no effect is applied to the decrease.
Attention
DO NOT set newSlideDown to less than 1.

◆ setSlownessOfIncrease()

template<std::floating_point FloatType>
void ame::Slide< FloatType >::setSlownessOfIncrease ( FloatType  slownessIncrease)
inline

Set the slowness of the increase.

Parameters
slownessIncreaseThe larger the value, the more slowly the increase. If 1, no effect is applied to the increase.
Attention
DO NOT set newSlideUp to less than 1.

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