MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Buffers::NodeSourceProcessor Class Reference

Processor that bridges computational nodes and data buffers. More...

#include <NodeBuffer.hpp>

+ Inheritance diagram for MayaFlux::Buffers::NodeSourceProcessor:
+ Collaboration diagram for MayaFlux::Buffers::NodeSourceProcessor:

Public Member Functions

 NodeSourceProcessor (std::shared_ptr< Nodes::Node > node, float mix=0.5f, bool clear_before_process=true)
 Creates a new processor that connects a computational node to data buffers.
 
void processing_function (std::shared_ptr< Buffer > buffer) override
 Captures node computation output into a buffer.
 
void set_mix (float mix)
 Sets the interpolation coefficient between existing and incoming data.
 
float get_mix () const
 Gets the current interpolation coefficient.
 
- Public Member Functions inherited from MayaFlux::Buffers::BufferProcessor
virtual ~BufferProcessor ()=default
 Virtual destructor for proper cleanup of derived classes.
 
void process (std::shared_ptr< Buffer > buffer)
 Applies a computational transformation to the data in the provided buffer.
 
virtual void on_attach (std::shared_ptr< Buffer >)
 Called when this processor is attached to a buffer.
 
virtual void on_detach (std::shared_ptr< Buffer >)
 Called when this processor is detached from a buffer.
 
virtual void set_processing_token (ProcessingToken token)
 Gets the preferred processing backend for this processor.
 
virtual ProcessingToken get_processing_token () const
 Gets the current processing token for this buffer.
 
virtual bool is_compatible_with (std::shared_ptr< Buffer >) const
 Checks if this processor can handle the specified buffer type.
 

Private Member Functions

std::vector< double > get_node_data (uint32_t num_samples)
 Gets a batch of data from the node.
 
void update_buffer (std::vector< double > &buffer_data)
 Updates the buffer data with node output.
 

Private Attributes

std::shared_ptr< Nodes::Nodem_node
 Source node that generates sequential data values.
 
float m_mix
 Interpolation coefficient between existing and incoming data (0.0-1.0)
 
bool m_clear_before_process
 Whether to reset the buffer before adding node output.
 

Additional Inherited Members

- Protected Attributes inherited from MayaFlux::Buffers::BufferProcessor
ProcessingToken m_processing_token { ProcessingToken::AUDIO_BACKEND }
 

Detailed Description

Processor that bridges computational nodes and data buffers.

NodeSourceProcessor serves as a data flow connector between the node computation system and the buffer storage system, enabling the capture and persistence of dynamically generated values. This component is fundamental for integrating real-time, sample-by-sample computational processes with block-based data storage and transformation.

Key capabilities:

  • Captures sequential output from computational nodes into structured data buffers
  • Provides configurable interpolation between existing and incoming data streams
  • Supports both accumulative and replacement data flow patterns

This processor enables powerful computational patterns such as:

  • Capturing generative algorithm outputs for analysis or visualization
  • Creating persistent records of ephemeral computational processes
  • Implementing hybrid computational models that combine continuous and discrete processing
  • Building feedback loops between different computational domains

Definition at line 32 of file NodeBuffer.hpp.


The documentation for this class was generated from the following files: