|
| | OtaCascadeFilterT () noexcept |
| | Constructs a 44.1 kHz, 2x, 24 dB/octave low-pass filter.
|
| void | set_sample_rate (double sample_rate) noexcept |
| | Sets the base sample rate in Hz and resets all DSP history.
|
| void | set_oversampling (int factor) noexcept |
| | Sets the oversampling factor to 1, 2, 4, 8, or 16.
|
| void | set_pole_frequency (double pole_hz) noexcept |
| | Sets the one-pole corner frequency in Hz.
|
| void | set_resonance (double normalized) noexcept |
| | Sets normalized resonance in [0, 1].
|
| void | set_k_max (double k_max) noexcept |
| | Sets the non-negative maximum feedback coefficient.
|
| void | set_drive_db (double drive_db) noexcept |
| | Sets input drive in decibels, clamped to [-96, 72] dB.
|
| void | set_saturation_headroom (double headroom) noexcept |
| | Sets nonlinear-junction headroom, clamped to [0.25, 16].
|
| void | set_bias (double bias) noexcept |
| | Sets dimensionless asymmetric saturation bias, clamped to [-2, 2].
|
| void | set_compensation (double amount) noexcept |
| | Sets resonance-dependent passband compensation in [0, 1].
|
| void | set_output_gain (double gain) noexcept |
| | Sets a non-negative linear output-gain multiplier.
|
| void | set_cross_modulation (double depth, double drive=2.0) noexcept |
| | Sets nonlinear output cross-modulation.
|
| void | set_mode (Mode mode) noexcept |
| | Selects the output tap combination without resetting cascade history.
|
| void | set_smoothing_time_ms (double milliseconds) noexcept |
| | Sets the base-rate coefficient-smoothing time in milliseconds.
|
| void | set_drift (double cutoff_cents, double resonance_fraction, double cutoff_rate_hz=1.5, double resonance_rate_hz=0.0) noexcept |
| | Configures deterministic low-rate cutoff and resonance drift.
|
| SampleType | process (SampleType input) noexcept |
| | Processes one base-rate sample and returns one base-rate sample.
|
| void | process (SampleType *buffer, int num_samples) noexcept |
| | Processes num_samples base-rate samples in place.
|
| void | reset () noexcept |
| | Clears cascade and oversampler history while preserving configuration.
|
| int | latency_samples () const noexcept |
| | Returns the current round-trip oversampling latency in base-rate samples.
|
| int | oversampling () const noexcept |
| | Returns the active oversampling factor: 1, 2, 4, 8, or 16.
|
| double | sample_rate () const noexcept |
| | Returns the active base sample rate in Hz, after the 64 Hz floor.
|
template<typename SampleType = float>
class pulp::signal::OtaCascadeFilterT< SampleType >
Voicing-neutral four-pole nonlinear cascade with fixed-storage oversampling.
Configuration, reset, and processing are allocation-free and noexcept. An instance is suitable for an audio thread, but provides no synchronization; do not mutate it concurrently from another thread. SampleType selects the public sample type while internal state and coefficient calculations use double precision.
template<typename SampleType = float>
Constructs a 44.1 kHz, 2x, 24 dB/octave low-pass filter.
Defaults are a 1 kHz pole, zero resonance, a 4.3 feedback ceiling, unity drive/headroom/output gain, zero bias/compensation/cross-modulation/ drift, and zero smoothing time. Coefficients start snapped to those targets. Construction allocates no memory.
template<typename SampleType = float>
| void pulp::signal::OtaCascadeFilterT< SampleType >::set_drift |
( |
double | cutoff_cents, |
|
|
double | resonance_fraction, |
|
|
double | cutoff_rate_hz = 1.5, |
|
|
double | resonance_rate_hz = 0.0 ) |
|
inlinenoexcept |
Configures deterministic low-rate cutoff and resonance drift.
cutoff_cents is clamped to [0, 100]; resonance_fraction to [0, 0.1]; and cutoff_rate_hz to [0.05, 20] Hz. A positive resonance_rate_hz is clamped to [0.05, 40] Hz, while zero or a negative value makes resonance drift follow the cutoff rate. Both depths at zero disable drift and restore unity drift multipliers. Randomness is instance-local and reproducible after reset().
template<typename SampleType = float>
Sets the oversampling factor to 1, 2, 4, 8, or 16.
Any other value selects 2x. An effective factor change recomputes the internal rate and pole target and resets filter, FIR, smoothing, and drift state. Selecting the already-active effective factor is a no-op.