Skip to content

Class daisysp::LadderFilter

ClassList > daisysp > LadderFilter

More...

  • #include <ladder.h>

Public Types

Type Name
enum FilterMode

Public Functions

Type Name
void Init (float sample_rate)
LadderFilter () = default
float Process (float in)
void ProcessBlock (float * buf, size_t size)
void SetFilterMode (FilterMode mode)
void SetFreq (float freq)
void SetInputDrive (float drv)
void SetPassbandGain (float pbg)
void SetRes (float res)
~LadderFilter () = default

Detailed Description

4-pole ladder filter model with selectable filter type (LP/BP/HP 12 or 24 dB/oct), drive, passband gain compensation, and stable self-oscillation.

Public Types Documentation

enum FilterMode

enum daisysp::LadderFilter::FilterMode {
    LP24,
    LP12,
    BP24,
    BP12,
    HP24,
    HP12
};

Public Functions Documentation

function Init

void daisysp::LadderFilter::Init (
    float sample_rate
) 

Initializes the ladder filter module.


function LadderFilter

daisysp::LadderFilter::LadderFilter () = default

function Process

float daisysp::LadderFilter::Process (
    float in
) 

Process single sample


function ProcessBlock

void daisysp::LadderFilter::ProcessBlock (
    float * buf,
    size_t size
) 

Process mono buffer/block of samples in place


function SetFilterMode

inline void daisysp::LadderFilter::SetFilterMode (
    FilterMode mode
) 

Sets the filter mode/response Defaults to classic lowpass 24dB/oct


function SetFreq

void daisysp::LadderFilter::SetFreq (
    float freq
) 

Sets the cutoff frequency of the filter. Units of hz, valid in range 5 - ~nyquist (samp_rate / 2) Internally clamped to this range.


function SetInputDrive

void daisysp::LadderFilter::SetInputDrive (
    float drv
) 

Sets drive of the input stage into the tanh clipper Valid in range 0 - 4.0


function SetPassbandGain

void daisysp::LadderFilter::SetPassbandGain (
    float pbg
) 

Set "passband gain" compensation factor to mitigate loss of energy in passband at higher resonance values. Drive and passband gain have a dependent relationship. Valid in range 0 - 0.5 Internally clamped to this range.


function SetRes

void daisysp::LadderFilter::SetRes (
    float res
) 

Sets the resonance of the filter. Filter will stably self oscillate at higher values. Valid in range 0 - 1.8 Internally clamped to this range.


function ~LadderFilter

daisysp::LadderFilter::~LadderFilter () = default


The documentation for this class was generated from the following file external-docs/DaisySP/Source/Filters/ladder.h