5IIR::IIR(
const std::shared_ptr<Node>& input,
const std::string& zindex_shifts)
6 :
Filter(input, zindex_shifts)
10IIR::IIR(
const std::shared_ptr<Node>& input,
const std::vector<double>& a_coef,
const std::vector<double>& b_coef)
11 :
Filter(input, a_coef, b_coef)
15IIR::IIR(
const std::vector<double>& a_coef,
const std::vector<double>& b_coef)
26 double processed_input = input;
46 for (
size_t i = 0; i < num_feedforward; ++i) {
51 for (
size_t i = 1; i < num_feedback; ++i) {
std::vector< double > m_saved_output_history
void build_input_history(double current_sample)
Builds input history from external context or internal accumulation.
std::vector< double > m_coef_b
Feedforward (numerator) coefficients.
std::vector< double > m_output_history
Buffer storing previous output samples.
virtual void update_outputs(double current_sample)
Updates the output history buffer with a new sample.
bool is_bypass_enabled() const
Checks if bypass is currently enabled.
std::shared_ptr< Node > m_input_node
The most recent sample value generated by this oscillator.
std::vector< double > m_saved_input_history
bool m_use_external_input_context
double get_gain() const
Gets the current gain value.
std::vector< double > m_input_history
Buffer storing previous input samples.
virtual void update_inputs(double current_sample)
Updates the input history buffer with a new sample.
void notify_tick(double value) override
Notifies all registered callbacks with the current filter context.
std::vector< double > m_coef_a
Feedback (denominator) coefficients.
Base class for computational signal transformers implementing difference equations.
void save_state() override
Saves the node's current state for later restoration Recursively cascades through all connected modul...
IIR(const std::shared_ptr< Node > &input, const std::string &zindex_shifts)
Creates an IIR filter with specified order.
double process_sample(double input=0.) override
Processes a single sample through the IIR filter.
void restore_state() override
Restores the node's state from the last save Recursively cascades through all connected modulator nod...
bool m_fire_events_during_snapshot
Internal flag controlling whether notify_tick fires during state snapshots Default: false (events don...
void atomic_add_flag(std::atomic< Utils::NodeState > &state, Utils::NodeState flag)
Atomically adds a flag to a node state.
void try_reset_processed_state(std::shared_ptr< Node > node)
Attempts to reset the processed state of a node.
void atomic_inc_modulator_count(std::atomic< uint32_t > &count, int amount)
Atomically increments the modulator count by a specified amount.
void atomic_dec_modulator_count(std::atomic< uint32_t > &count, int amount)
Atomically decrements the modulator count by a specified amount.
@ PROCESSED
Node has been processed this cycle.