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

◆ get_node_audio_buffer()

std::optional< std::span< const double > > MayaFlux::Nodes::Network::ResonatorNetwork::get_node_audio_buffer ( size_t  ) const
overridevirtual

Get output of specific internal node as audio buffer (for ONE_TO_ONE mapping)

Parameters
indexIndex of node in network
Returns
Optional span of samples for this node, or nullopt if not applicable

For networks with multiple nodes, this allows external entities to access individual node outputs as separate audio buffers. Useful for granular synthesis, multi-voice processing, etc.

Reimplemented from MayaFlux::Nodes::Network::NodeNetwork.

Definition at line 282 of file ResonatorNetwork.cpp.

283{
284 if (index >= m_node_buffers.size() || m_node_buffers[index].empty())
285 return std::nullopt;
286 return std::span<const double>(m_node_buffers[index]);
287}
uint32_t index
Definition VKDevice.cpp:142
std::vector< std::vector< double > > m_node_buffers
Per-resonator sample buffers populated each process_batch()

References index, and m_node_buffers.