DSPark 1.6.1
Header-only audio DSP framework in pure C++20 — zero dependencies
Loading...
Searching...
No Matches
dspark::Smoothers::LinearSmoother Class Reference

Linear ramp smoother for predictable, uniform interpolation. More...

#include <Smoothers.h>

Public Member Functions

void reset (double sampleRate, float rampTimeMilliseconds, float initialValue=0.0f) noexcept
 
void setTargetValue (float newTarget) noexcept
 
float getNextValue () noexcept
 
float getCurrentValue () const noexcept
 
float getTargetValue () const noexcept
 
void setCurrentAndTargetValue (float value) noexcept
 
bool isSmoothing () const noexcept
 
void skip () noexcept
 
void processBlock (float *buffer, int numSamples, bool multiply=false) noexcept
 Block processing for SIMD optimization.
 

Static Public Attributes

static constexpr float epsilon = 1e-6f
 

Detailed Description

Linear ramp smoother for predictable, uniform interpolation.

Use for: Gains, mix/dry-wet, pans, or most faders where exact timing is needed.

Definition at line 55 of file Smoothers.h.

Member Function Documentation

◆ getCurrentValue()

float dspark::Smoothers::LinearSmoother::getCurrentValue ( ) const
inlinenoexcept

Definition at line 64 of file Smoothers.h.

◆ getNextValue()

float dspark::Smoothers::LinearSmoother::getNextValue ( )
inlinenoexcept

Definition at line 347 of file Smoothers.h.

◆ getTargetValue()

float dspark::Smoothers::LinearSmoother::getTargetValue ( ) const
inlinenoexcept

Definition at line 65 of file Smoothers.h.

◆ isSmoothing()

bool dspark::Smoothers::LinearSmoother::isSmoothing ( ) const
inlinenoexcept

Definition at line 364 of file Smoothers.h.

◆ processBlock()

void dspark::Smoothers::LinearSmoother::processBlock ( float *  buffer,
int  numSamples,
bool  multiply = false 
)
inlinenoexcept

Block processing for SIMD optimization.

Parameters
bufferPointer to the audio block float array.
numSamplesNumber of samples to process.
multiplyIf true, acts as a gain multiplier (buffer[i] *= val). Otherwise, offsets (buffer[i] += val).

Definition at line 374 of file Smoothers.h.

◆ reset()

void dspark::Smoothers::LinearSmoother::reset ( double  sampleRate,
float  rampTimeMilliseconds,
float  initialValue = 0.0f 
)
inlinenoexcept

Definition at line 327 of file Smoothers.h.

◆ setCurrentAndTargetValue()

void dspark::Smoothers::LinearSmoother::setCurrentAndTargetValue ( float  value)
inlinenoexcept

Definition at line 356 of file Smoothers.h.

◆ setTargetValue()

void dspark::Smoothers::LinearSmoother::setTargetValue ( float  newTarget)
inlinenoexcept

Definition at line 336 of file Smoothers.h.

◆ skip()

void dspark::Smoothers::LinearSmoother::skip ( )
inlinenoexcept

Definition at line 369 of file Smoothers.h.

Member Data Documentation

◆ epsilon

constexpr float dspark::Smoothers::LinearSmoother::epsilon = 1e-6f
staticconstexpr

Definition at line 58 of file Smoothers.h.


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