Processes a single data sample.
- Parameters
-
| input | The input sample value |
- Returns
- The processed output sample value
This is the core processing method that all nodes must implement. It takes a single input value, applies the node's transformation algorithm, and returns the resulting output value.
For generator nodes that don't require input (like oscillators or stochastic generators), the input parameter may be ignored. Note: This method does NOT mark the node as processed. That responsibility belongs to the caller, typically a chained parent node or the root node.
Implements MayaFlux::Nodes::Node.
Definition at line 425 of file NodeCombine.hpp.
426 {
429
432 }
433
434 for (
size_t i = 0; i <
m_inputs.size(); ++i) {
435 uint32_t state =
m_inputs[i]->m_state.load();
438 } else {
441 }
442 }
443
445
448
451 }
452
455 }
456
458 }
Core::GlobalInputConfig input
std::vector< double > m_input_values
void notify_tick(double value) override
Notifies all registered callbacks with the current context.
bool is_initialized() const
std::vector< std::shared_ptr< Node > > m_inputs
double m_last_output
The most recent sample value generated by this oscillator.
std::atomic< NodeState > m_state
Atomic state flag tracking the node's processing status.
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.
References MayaFlux::Nodes::atomic_add_flag(), MayaFlux::Nodes::atomic_dec_modulator_count(), MayaFlux::Nodes::atomic_inc_modulator_count(), initialize(), input, MayaFlux::is_initialized(), and MayaFlux::Nodes::try_reset_processed_state().