SynthLab SDK
SynthLab::Limiter Class Reference

Implements a custom peak limiter designed especially for self oscillating filters whose outputs are > 0dBFS. More...

#include <limiter.h>

Public Member Functions

void reset (double _sampleRate)
 reset internal detector
 
void setThreshold_dB (double _threshold_dB)
 set threshold in dB
 
void setThreshold (double _threshold)
 set threshold in dB
 
double calcLimiterGaindB (float fDetectorValue, float fThreshold)
 calculate limiter gain using dB values for threshold and detection More...
 
double calcLimiterGain (float fDetectorValue, float fThreshold)
 calculate limiter gain using dB values for threshold and detection More...
 
double process (double input)
 process one sample through limiter More...
 

Protected Attributes

LogPeakDetector logDetector
 the peak detector
 
double threshold_dB = -1.5
 hardcoded threshold in dB
 
LinPeakDetector linDetector
 the peak detector
 
double threshold = 0.8413
 hardcoded threshold for -1.5dB
 

Detailed Description

Implements a custom peak limiter designed especially for self oscillating filters whose outputs are > 0dBFS.

Author
Will Pirkle http://www.willpirkle.com
Remarks
This object is included and described in further detail in Designing Software Synthesizer Plugins in C++ 2nd Ed. by Will Pirkle
Version
Revision : 1.0
Date
Date : 2021 / 04 / 26

Member Function Documentation

◆ calcLimiterGain()

double SynthLab::Limiter::calcLimiterGain ( float  fDetectorValue,
float  fThreshold 
)
inline

calculate limiter gain using dB values for threshold and detection

Parameters
fDetectorValuedetected value in dB
fThresholdthreshold of limiting in dB

◆ calcLimiterGaindB()

double SynthLab::Limiter::calcLimiterGaindB ( float  fDetectorValue,
float  fThreshold 
)
inline

calculate limiter gain using dB values for threshold and detection

Parameters
fDetectorValuedetected value in dB
fThresholdthreshold of limiting in dB

◆ process()

double SynthLab::Limiter::process ( double  input)
inline

process one sample through limiter

Returns
limited output value

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