Gin
Loading...
Searching...
No Matches
Public Member Functions | List of all members
EasedValueSmoother< T, EasingFunction > Class Template Reference

Smooths a value using an easing function for natural-feeling transitions. More...

#include <gin_easedvaluesmoother.h>

Public Member Functions

void setSampleRate (double sr)
 
void setTime (double t)
 
bool isSmoothing ()
 
void reset ()
 
getCurrentValue ()
 
T * getValuePtr ()
 
void snapToValue ()
 
void process (int n)
 
void setValue (T v)
 
void updateValue ()
 
getNextValue ()
 
void setValueUnsmoothed (T v)
 

Detailed Description

template<class T, class EasingFunction = QuadraticInOutEasing>
class EasedValueSmoother< T, EasingFunction >

Smooths a value using an easing function for natural-feeling transitions.

EasedValueSmoother provides smooth parameter transitions using easing curves instead of linear interpolation. This creates more natural, aesthetically pleasing animations and parameter changes.

The easing function is specified as a template parameter, allowing for compile-time selection of the curve shape. Any of the easing function objects defined in this file can be used.

Template Parameters
TThe numeric type for values (typically float or double)
EasingFunctionFunction object providing the easing curve (defaults to QuadraticInOutEasing)

Example:

// Default quadratic in/out easing
// Elastic easing for bouncy effect
// Exponential easing for sharp transitions
A lightweight 2D point class for projects that don't use juce_graphics.
Definition gin_point.h:25

Member Function Documentation

◆ setSampleRate()

template<class T , class EasingFunction = QuadraticInOutEasing>
void EasedValueSmoother< T, EasingFunction >::setSampleRate ( double  sr)

◆ setTime()

template<class T , class EasingFunction = QuadraticInOutEasing>
void EasedValueSmoother< T, EasingFunction >::setTime ( double  t)

◆ isSmoothing()

template<class T , class EasingFunction = QuadraticInOutEasing>
bool EasedValueSmoother< T, EasingFunction >::isSmoothing ( )

◆ reset()

template<class T , class EasingFunction = QuadraticInOutEasing>
void EasedValueSmoother< T, EasingFunction >::reset ( )

◆ getCurrentValue()

template<class T , class EasingFunction = QuadraticInOutEasing>
T EasedValueSmoother< T, EasingFunction >::getCurrentValue ( )

◆ getValuePtr()

template<class T , class EasingFunction = QuadraticInOutEasing>
T * EasedValueSmoother< T, EasingFunction >::getValuePtr ( )

◆ snapToValue()

template<class T , class EasingFunction = QuadraticInOutEasing>
void EasedValueSmoother< T, EasingFunction >::snapToValue ( )

◆ process()

template<class T , class EasingFunction = QuadraticInOutEasing>
void EasedValueSmoother< T, EasingFunction >::process ( int  n)

◆ setValue()

template<class T , class EasingFunction = QuadraticInOutEasing>
void EasedValueSmoother< T, EasingFunction >::setValue ( v)

◆ updateValue()

template<class T , class EasingFunction = QuadraticInOutEasing>
void EasedValueSmoother< T, EasingFunction >::updateValue ( )

◆ getNextValue()

template<class T , class EasingFunction = QuadraticInOutEasing>
T EasedValueSmoother< T, EasingFunction >::getNextValue ( )

◆ setValueUnsmoothed()

template<class T , class EasingFunction = QuadraticInOutEasing>
void EasedValueSmoother< T, EasingFunction >::setValueUnsmoothed ( v)

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