MayaFlux 0.4.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 293 of file Logic.cpp.

294{
295 std::ranges::fill(m_history_ring, false);
296 m_history_head = 0;
298 m_edge_detected = false;
299 m_last_output = 0.0;
300 m_hysteresis_state = false;
301 m_temporal_time = 0.0;
302 m_input_buffer.assign(m_input_count, 0.0);
303}
size_t m_history_size
Maximum size of the history buffer.
Definition Logic.hpp:600
double m_temporal_time
Time tracking for temporal mode.
Definition Logic.hpp:608
std::vector< double > m_input_buffer
Definition Logic.hpp:610
bool m_edge_detected
Whether an edge was detected in the last processing.
Definition Logic.hpp:606
std::vector< uint8_t > m_history_ring
Ring buffer for history storage.
Definition Logic.hpp:612
bool m_hysteresis_state
State for hysteresis operator.
Definition Logic.hpp:607
size_t m_history_count
Number of valid entries in the history buffer.
Definition Logic.hpp:599
size_t m_history_head
Head index for the history ring buffer.
Definition Logic.hpp:598
size_t m_input_count
Expected number of inputs for multi-input mode.
Definition Logic.hpp:601
double m_last_output
The most recent sample value generated by this oscillator.
Definition Node.hpp:405

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.