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

Processor that implements recursive computational algorithms. More...

#include <FeedbackBuffer.hpp>

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

Public Member Functions

 FeedbackProcessor (float feedback=0.5F, uint32_t feed_samples=512)
 Creates a new feedback processor.
 
void processing_function (std::shared_ptr< Buffer > buffer) override
 Processes a buffer by applying the recursive algorithm.
 
void on_attach (std::shared_ptr< Buffer > buffer) override
 Called when this processor is attached to a buffer.
 
void on_detach (std::shared_ptr< Buffer > buffer) override
 Called when this processor is detached from a buffer.
 
void set_feedback (float amount)
 Sets the feedback coefficient.
 
float get_feedback () const
 Gets the current feedback coefficient.
 
uint32_t get_feed_samples () const
 Gets the number of samples to feed back.
 
void set_feed_samples (uint32_t samples)
 Sets the number of samples to feed back.
 
- 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 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 Attributes

float m_feedback_amount
 Feedback coefficient (0.0-1.0)
 
uint32_t m_feed_samples
 Number of samples to feed back.
 
std::vector< double > m_previous_buffer
 Storage for the previous system state.
 
bool m_using_internal_buffer
 Flag indicating whether to use the buffer's internal previous state.
 
size_t m_buffer_index {}
 

Additional Inherited Members

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

Detailed Description

Processor that implements recursive computational algorithms.

FeedbackProcessor is a specialized buffer processor that implements discrete-time recursive algorithms by combining a system's current state with its previous state. It can be applied to any AudioBuffer, not just FeedbackBuffer, allowing recursive properties to be added to existing computational pipelines.

Unlike stateless processors, FeedbackProcessor maintains memory between processing cycles, storing the previous system state for use in the next cycle. This memory-based behavior enables the emergence of complex temporal patterns and evolutionary behaviors.

Applications:

  • Generative algorithms with memory and evolution
  • Simulation of complex dynamical systems
  • Creation of emergent, self-modifying behaviors
  • Implementation of recursive mathematical functions
  • Cross-domain feedback systems (audio influencing visual, data influencing audio, etc.)

Definition at line 139 of file FeedbackBuffer.hpp.


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