5FIR::FIR(
const std::shared_ptr<Node>& input,
const std::vector<double>& coeffs)
6 :
Filter(input,
std::vector<double> { 1.0F }, coeffs)
10FIR::FIR(
const std::shared_ptr<Node>& input,
const std::string& zindex_shifts)
11 :
Filter(input, zindex_shifts)
16 :
FIR(nullptr, coeffs)
26 double processed_input = input;
47 for (
size_t i = 0; i < num_taps; ++i) {
double process_sample(double input=0.) override
Processes a single sample through the FIR filter.
void save_state() override
Saves the node's current state for later restoration Recursively cascades through all connected modul...
void restore_state() override
Restores the node's state from the last save Recursively cascades through all connected modulator nod...
FIR(const std::shared_ptr< Node > &input, const std::string &zindex_shifts)
Creates an FIR filter with specified order.
Finite Impulse Response filter implementation.
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.
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.
Base class for computational signal transformers implementing difference equations.
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.