84 virtual void process(
int num_samples)
override;
90 void setupFilter(
const FilterState& filter_state)
override;
139 void setStageScales(
const FilterState& filter_state);
A classic transistor ladder-style filter for the Vital synthesizer.
Definition ladder_filter.h:19
static constexpr mono_float kMinResonance
Minimum resonance value.
Definition ladder_filter.h:34
poly_float getResonance()
Retrieves the current resonance setting.
Definition ladder_filter.h:125
static constexpr int kNumStages
Number of filter stages in the ladder (4-pole ladder).
Definition ladder_filter.h:24
void reset(poly_mask reset_mask) override
Resets internal states of each filter stage according to the given mask.
Definition ladder_filter.cpp:18
static constexpr mono_float kMaxResonance
Maximum resonance value.
Definition ladder_filter.h:39
static constexpr mono_float kMinCutoff
Minimum cutoff frequency in Hz (used internally).
Definition ladder_filter.h:54
virtual ~LadderFilter()
Destructor for the LadderFilter.
Definition ladder_filter.h:69
static constexpr mono_float kMaxCoefficient
Maximum main filter coefficient value (clamps the cutoff).
Definition ladder_filter.h:44
static constexpr mono_float kDriveResonanceBoost
Boost factor added to the resonance based on drive.
Definition ladder_filter.h:49
poly_float getStageScale(int index)
Retrieves the scale value for one of the filter’s output stages.
Definition ladder_filter.h:132
static constexpr mono_float kResonanceTuning
Resonance tuning factor to align the filter’s internal response with musical expectations.
Definition ladder_filter.h:29
void setupFilter(const FilterState &filter_state) override
Configures the filter parameters based on a FilterState.
Definition ladder_filter.cpp:126
virtual Processor * clone() const override
Creates a clone (deep copy) of this LadderFilter instance.
Definition ladder_filter.h:75
force_inline void tick(poly_float audio_in, poly_float coefficient, poly_float resonance, poly_float drive)
Processes a single sample through the ladder filter stages.
Definition ladder_filter.cpp:254
LadderFilter()
Constructs a new LadderFilter.
Definition ladder_filter.cpp:10
static constexpr mono_float kMaxCutoff
Maximum cutoff frequency in Hz (used internally).
Definition ladder_filter.h:59
virtual void process(int num_samples) override
Processes the input audio buffer through this ladder filter.
Definition ladder_filter.cpp:44
poly_float getDrive()
Retrieves the current drive setting.
Definition ladder_filter.h:119
void hardReset() override
Performs a hard reset of all filter states.
Definition ladder_filter.cpp:30
A one-pole filter implementation with optional nonlinear saturation.
Definition one_pole_filter.h:22
Base class for all signal-processing units in Vital.
Definition processor.h:212
Abstract base class for Vital’s synthesizer filters.
Definition synth_filter.h:19
#define force_inline
Definition common.h:23
Contains faster but less accurate versions of utility math functions, such as exponential,...
Contains classes and functions used within the Vital synthesizer framework.
float mono_float
Definition common.h:33
Declares the Processor class and related structures for handling audio processing in a polyphonic con...
Represents a vector of floating-point values using SIMD instructions.
Definition poly_values.h:600
Represents a vector of integer values using SIMD instructions.
Definition poly_values.h:56