5IIR::IIR(
const std::shared_ptr<Node>&
input,
const std::vector<double>& a_coef,
const std::vector<double>& b_coef)
10IIR::IIR(
const std::vector<double>& a_coef,
const std::vector<double>& b_coef)
21 double processed_input =
input;
41 for (
size_t i = 0; i < num_feedforward; ++i) {
46 for (
size_t i = 1; i < num_feedback; ++i) {
Core::GlobalInputConfig input
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.
IIR(const std::shared_ptr< Node > &input, const std::vector< double > &a_coef, const std::vector< double > &b_coef)
Creates an IIR filter with specified coefficients.
void save_state() override
Saves the node's current state for later restoration Recursively cascades through all connected modul...
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_state_saved
tracks if the node's state has been saved by a snapshot operation
bool m_networked_node
Flag indicating if the node is part of a NodeNetwork This flag is used to disable event firing when t...
bool m_fire_events_during_snapshot
Internal flag controlling whether notify_tick fires during state snapshots Default: false (events don...
@ PROCESSED
Node has been processed this cycle.
void atomic_add_flag(std::atomic< NodeState > &state, 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.