|
DaisySP
|
#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) |
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.
| void LadderFilter::Init | ( | float | sample_rate | ) |
Initializes the ladder filter module.
| float LadderFilter::Process | ( | float | in | ) |
Process single sample
| void daisysp::LadderFilter::ProcessBlock | ( | float * | buf, |
| size_t | size ) |
Process mono buffer/block of samples in place
|
inline |
Sets the filter mode/response Defaults to classic lowpass 24dB/oct
| 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.
| void LadderFilter::SetInputDrive | ( | float | drv | ) |
Sets drive of the input stage into the tanh clipper Valid in range 0 - 4.0
| 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.
| 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.