Processes a buffer through the logic node.
- Parameters
-
| buffer | The audio buffer to process |
Processing steps:
- Iterates through each sample in the buffer
- Calls Logic node's process_sample() for each sample to get logic value
- Applies the selected modulation strategy to combine logic with buffer data
The Logic node handles all temporal state, callbacks, and logic computation. The processor only manages iteration and modulation application.
Implements MayaFlux::Buffers::BufferProcessor.
Definition at line 170 of file LogicProcessor.cpp.
171{
173 return;
174 }
175
176 auto audio_buffer = std::dynamic_pointer_cast<AudioBuffer>(buffer);
177 if (!audio_buffer || audio_buffer->get_data().empty()) {
178 return;
179 }
180
181 generate(audio_buffer->get_num_samples(), audio_buffer->get_data());
183}
bool generate(size_t num_samples, const std::vector< double > &input_data)
Generates discrete logic data from input without modifying any buffer.
std::shared_ptr< Nodes::Generator::Logic > m_logic
Logic node for processing.
bool apply(const std::shared_ptr< Buffer > &buffer, ModulationFunction modulation_func=nullptr)
Applies stored logic data to the given buffer.
References apply(), generate(), and m_logic.