DaisySP
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
daisysp::LadderFilter Class Reference

#include <ladder.h>

Public Types

enum class  FilterMode {
  LP24 , LP12 , BP24 , BP12 ,
  HP24 , HP12
}
 

Public Member Functions

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

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.

Member Function Documentation

◆ Init()

void LadderFilter::Init ( float sample_rate)

Initializes the ladder filter module.

◆ Process()

float LadderFilter::Process ( float in)

Process single sample

◆ ProcessBlock()

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

Process mono buffer/block of samples in place

◆ SetFilterMode()

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

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

◆ SetFreq()

void 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.

◆ SetInputDrive()

void LadderFilter::SetInputDrive ( float drv)

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

◆ SetPassbandGain()

void 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.

◆ SetRes()

void 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.


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