MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ reset()

void MayaFlux::Nodes::Generator::Logic::reset ( )

Resets internal state to initial conditions.

Clears history buffers, resets state variables, and returns the node to its initial configuration. Essential for restarting sequential processing or clearing accumulated state.

Definition at line 424 of file Logic.cpp.

425{
426 std::ranges::fill(m_history_ring, false);
427 m_history_head = 0;
429 m_edge_detected = false;
430 m_last_output = 0.0;
431 m_hysteresis_state = false;
432 m_temporal_time = 0.0;
433 m_input_buffer.assign(m_input_count, 0.0);
434}
size_t m_history_size
Maximum size of the history buffer.
Definition Logic.hpp:702
double m_temporal_time
Time tracking for temporal mode.
Definition Logic.hpp:710
std::vector< double > m_input_buffer
Definition Logic.hpp:712
bool m_edge_detected
Whether an edge was detected in the last processing.
Definition Logic.hpp:708
std::vector< uint8_t > m_history_ring
Ring buffer for history storage.
Definition Logic.hpp:716
bool m_hysteresis_state
State for hysteresis operator.
Definition Logic.hpp:709
size_t m_history_count
Number of valid entries in the history buffer.
Definition Logic.hpp:701
size_t m_history_head
Head index for the history ring buffer.
Definition Logic.hpp:700
size_t m_input_count
Expected number of inputs for multi-input mode.
Definition Logic.hpp:703
double m_last_output
The most recent sample value generated by this oscillator.
Definition Node.hpp:441

References m_edge_detected, m_history_count, m_history_head, m_history_ring, m_history_size, m_hysteresis_state, m_input_buffer, m_input_count, MayaFlux::Nodes::Node::m_last_output, and m_temporal_time.