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

◆ clone()

std::shared_ptr< LogicProcessor > MayaFlux::Buffers::LogicProcessor::clone ( ) const

An independent processor over a clone of the node.

Same reset policy, modulation type, custom modulation function and remap values; the node is cloned, so its history and coefficient array are not shared. Attach one clone per channel instead of one processor to several.

Definition at line 373 of file LogicProcessor.cpp.

374{
375 if (!m_logic) {
376 return std::make_shared<LogicProcessor>(std::shared_ptr<Nodes::Generator::Logic> {}, m_reset_between_buffers);
377 }
378
379 auto copy = std::make_shared<LogicProcessor>(m_logic->clone(), m_reset_between_buffers);
380 copy->m_use_internal = true;
381 copy->m_modulation_type = m_modulation_type;
382 copy->m_modulation_function = m_modulation_function;
383 copy->m_high_value = m_high_value;
384 copy->m_low_value = m_low_value;
385 copy->m_keys = m_keys;
386 copy->m_plane_bits = m_plane_bits;
387 copy->m_radius = m_radius;
388 copy->m_generations = m_generations;
389 copy->m_wrap = m_wrap;
390 copy->m_memory = m_memory;
391 return copy;
392}
ModulationFunction m_modulation_function
Custom transformation function.
size_t m_generations
Automaton steps per block, 0 when off.
bool m_wrap
Whether the automaton's block ends meet.
double m_high_value
High value for THRESHOLD_REMAP.
size_t m_radius
Neighbourhood radius of the automaton.
uint32_t m_plane_bits
Word width when processing bit planes, 0 when off.
double m_low_value
Low value for THRESHOLD_REMAP.
std::shared_ptr< Nodes::Generator::Logic > m_logic
Logic node for processing.
ModulationType m_modulation_type
How logic values modulate buffer content.
bool m_memory
Whether blocks perturb the previous automaton result.
std::vector< std::weak_ptr< AudioBuffer > > m_keys
Buffers read as extra input slots.
bool m_reset_between_buffers
Whether to reset logic between buffers.
CopiedText copy(std::string_view text, const LayoutResult &layout, size_t a, size_t b)
Copy a byte range: the text it spans, and the quads that render it.

References m_generations, m_high_value, m_keys, m_logic, m_low_value, m_memory, m_modulation_function, m_modulation_type, m_plane_bits, m_radius, m_reset_between_buffers, and m_wrap.