MayaFlux 0.2.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 297 of file Logic.cpp.

298{
299 std::ranges::fill(m_history_ring, false);
300 m_history_head = 0;
302 m_edge_detected = false;
303 m_last_output = 0.0;
304 m_hysteresis_state = false;
305 m_temporal_time = 0.0;
306 m_input_buffer.assign(m_input_count, 0.0);
307}
size_t m_history_size
Maximum size of the history buffer.
Definition Logic.hpp:574
double m_temporal_time
Time tracking for temporal mode.
Definition Logic.hpp:582
std::vector< double > m_input_buffer
Definition Logic.hpp:584
bool m_edge_detected
Whether an edge was detected in the last processing.
Definition Logic.hpp:580
std::vector< uint8_t > m_history_ring
Ring buffer for history storage.
Definition Logic.hpp:586
bool m_hysteresis_state
State for hysteresis operator.
Definition Logic.hpp:581
size_t m_history_count
Number of valid entries in the history buffer.
Definition Logic.hpp:573
size_t m_history_head
Head index for the history ring buffer.
Definition Logic.hpp:572
size_t m_input_count
Expected number of inputs for multi-input mode.
Definition Logic.hpp:575
double m_last_output
The most recent sample value generated by this oscillator.
Definition Node.hpp:374

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.