|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
Buffer processor that applies polynomial transformations to audio data. More...
#include <PolynomialProcessor.hpp>
Inheritance diagram for MayaFlux::Buffers::PolynomialProcessor:
Collaboration diagram for MayaFlux::Buffers::PolynomialProcessor:Public Types | |
| enum class | ProcessMode : uint8_t { SAMPLE_BY_SAMPLE , BATCH , WINDOWED , BUFFER_CONTEXT } |
| Processing mode for the polynomial processor. More... | |
Public Member Functions | |
| PolynomialProcessor ()=default | |
| template<typename... Args> requires std::constructible_from<Nodes::Generator::Polynomial, Args...> | |
| PolynomialProcessor (ProcessMode mode=ProcessMode::SAMPLE_BY_SAMPLE, size_t window_size=64, Args &&... args) | |
| Creates a new processor that applies polynomial transformations. | |
| PolynomialProcessor (const std::shared_ptr< Nodes::Generator::Polynomial > &polynomial, ProcessMode mode=ProcessMode::SAMPLE_BY_SAMPLE, size_t window_size=64) | |
| Creates a new processor that applies polynomial transformations. | |
| void | processing_function (std::shared_ptr< Buffer > buffer) override |
| Processes an audio buffer using the polynomial function. | |
| void | on_attach (std::shared_ptr< Buffer > buffer) override |
| Called when the processor is attached to a buffer. | |
| void | on_detach (std::shared_ptr< Buffer >) override |
| Called when the processor is detached from a buffer. | |
| void | set_process_mode (ProcessMode mode) |
| Sets the processing mode. | |
| ProcessMode | get_process_mode () const |
| Gets the current processing mode. | |
| void | set_window_size (size_t size) |
| Sets the window size for windowed processing. | |
| size_t | get_window_size () const |
| Gets the current window size. | |
| std::shared_ptr< Nodes::Generator::Polynomial > | get_polynomial () const |
| Gets the polynomial node used for processing. | |
| bool | is_using_internal () const |
| Checks if the processor is using the internal polynomial node. | |
| template<typename... Args> requires std::constructible_from<Nodes::Generator::Polynomial, Args...> | |
| void | force_use_internal (Args &&... args) |
| Forces the processor to use the internal polynomial node. | |
| void | update_polynomial_node (const std::shared_ptr< Nodes::Generator::Polynomial > &polynomial) |
| Updates the polynomial node used for processing. | |
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 Member Functions | |
| void | process_span (std::span< double > data) |
| Processes a span of data using the polynomial function. | |
Private Attributes | |
| std::shared_ptr< Nodes::Generator::Polynomial > | m_polynomial |
| Polynomial node for processing. | |
| ProcessMode | m_process_mode {} |
| Current processing mode. | |
| size_t | m_window_size {} |
| Window size for windowed processing. | |
| bool | m_use_internal {} |
| Whether to use the buffer's internal previous state. | |
| std::shared_ptr< Nodes::Generator::Polynomial > | m_pending_polynomial |
| Internal polynomial node. | |
Additional Inherited Members | |
Protected Attributes inherited from MayaFlux::Buffers::BufferProcessor | |
| ProcessingToken | m_processing_token { ProcessingToken::AUDIO_BACKEND } |
Buffer processor that applies polynomial transformations to audio data.
This processor connects a Polynomial node to an AudioBuffer, allowing polynomial functions to be applied to buffer data. It supports all three polynomial modes (direct, recursive, and feedforward) and provides configuration options for how the polynomial is applied.
Definition at line 17 of file PolynomialProcessor.hpp.