Within an audio graph, subgraphs refer to smaller, self-contained sections that encapsulate a group of interconnected nodes. These subgraphs serve as modular units that can be composed together to form a larger and more complex audio processing system. Subgraphs often represent specific audio processing functionalities, such as audio effects, signal routing, or synthesis modules. They allow for a structured and organized approach to audio graph design, enabling easier management, reusability, and maintainability of audio processing components. By breaking down the audio graph into subgraphs, it becomes possible to focus on individual functional units, making it easier to understand, modify, and optimize the audio processing pipeline.
An example subgraph that implements an FX chain might look like this:
There are three different SubgraphNodes: SubgraphSourceNode, SubgraphProcessorNode, SubgraphSinkNode. These classes work the same way, the only difference is whether they produce, process or consume audio.
|A source node that can produce audio from a nested audio graph.
|A processor node that can process audio with a nested audio graph.
|A sink node that can consume audio with a nested audio graph.