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

◆ create_context()

std::unique_ptr< NodeContext > MayaFlux::Nodes::Generator::Logic::create_context ( double  value)
overrideprotectedvirtual

Creates a context object for callbacks.

Parameters
valueThe current generated sample
Returns
A unique pointer to a GeneratorContext object

This method creates a specialized context object containing the current sample value and all oscillator parameters, providing callbacks with rich information about the oscillator's state.

Reimplemented from MayaFlux::Nodes::Generator::Generator.

Definition at line 486 of file Logic.cpp.

487{
488 if (m_gpu_compatible) {
489 return std::make_unique<LogicContextGpu>(
490 value,
491 m_mode,
493 m_history,
499 }
500
501 return std::make_unique<LogicContext>(
502 value,
503 m_mode,
505 m_history,
510}
EdgeType m_edge_type
Type of edge to detect.
Definition Logic.hpp:571
double m_threshold
Threshold for boolean conversion.
Definition Logic.hpp:568
std::deque< bool > m_history
Buffer of input values for feedforward mode.
Definition Logic.hpp:565
std::vector< double > m_input_buffer
Definition Logic.hpp:575
LogicOperator m_operator
Current logic operator.
Definition Logic.hpp:560
bool m_edge_detected
Whether an edge was detected in the last processing.
Definition Logic.hpp:572
LogicMode m_mode
Current processing mode.
Definition Logic.hpp:559
bool m_gpu_compatible
Flag indicating if the node supports GPU processing This flag is set by derived classes to indicate w...
Definition Node.hpp:387
std::span< const float > get_gpu_data_buffer() const
Provides access to the GPU data buffer.
Definition Node.cpp:78

References MayaFlux::Nodes::Node::get_gpu_data_buffer(), m_edge_detected, m_edge_type, MayaFlux::Nodes::Node::m_gpu_compatible, m_history, m_input_buffer, m_mode, m_operator, and m_threshold.

Referenced by notify_tick().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: