Gin
Loading...
Searching...
No Matches
SmoothingType Class Reference

Parameter smoothing configuration for audio-rate interpolation. More...

#include <gin_processor.h>

Public Types

enum  Type { linear , eased }

Public Member Functions

 SmoothingType (float time_=0.1f, Type type_=linear)

Public Attributes

float time
Type type

Detailed Description

Parameter smoothing configuration for audio-rate interpolation.

SmoothingType specifies how parameter changes should be smoothed when applied to audio processing. This prevents zipper noise and clicks when parameters change, particularly important for frequency, gain, and other audio-critical parameters.

Smoothing Types:

  • linear: Simple linear interpolation (faster, good for most uses)
  • eased: Exponential/eased interpolation (smoother, more natural)

The time value specifies how long the parameter takes to reach its new value from the current value. Typical values are 0.02-0.2 seconds.

Usage:

// Fast linear smoothing for non-critical params
// Slower eased smoothing for filter cutoff
// Used when creating parameters
auto cutoff = processor.addExtParam("cutoff", "Cutoff", "", "",
{20.0f, 20000.0f, 1.0f, 0.3f},
1000.0f, 0.0f,
@ linear
Definition gin_processor.h:57
@ eased
Definition gin_processor.h:58
SmoothingType(float time_=0.1f, Type type_=linear)
Definition gin_processor.h:61
See also
Parameter, Processor

Member Enumeration Documentation

◆ Type

Enumerator
linear 
eased 

Constructor & Destructor Documentation

◆ SmoothingType()

SmoothingType::SmoothingType ( float time_ = 0.1f,
Type type_ = linear )

References linear, time, and type.

Member Data Documentation

◆ time

float SmoothingType::time

Referenced by SmoothingType().

◆ type

Type SmoothingType::type

Referenced by SmoothingType().


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