**Audiality 2 Audio Processing** [Index](index.html) | Processing | [Voice Management](voice-management.md.html) | [Units](unit-control.md.html) | [Builtin Units](units.md.html) | [Scripting](scripting.md.html) | [Examples](examples.md.html) | [API](api.md.html) # Overview Audio processing in Audiality 2 is performed in a tree graph of voices, where each voice runs a [realtime scripting](scripting.md.html) VM instance, and a graph of [audio processing units](unit-control.md.html). The scripting is done along with the audio processing, and allows for control of Unit parameters with sub-sample accurate timing. Scripts can receive timestamped messages in an interrupt-like fashion, via handlers that can change unit control registers, and interact with the main program via variables, or by directly changing the main program flow. ********************************************************************** * Voice structure * * .---------------------------------------------------------. * * | Voice | * * | .-------. .-------. .-------. | * * | | | | | | | | * * | | Unit +--->| Unit +---> ... --->| Unit +------> * * | | | | | | | | * * | '-------' '-------' '-------' | * * | ^ ^ ^ | * * | | | | | * * | .---+-------------+----------------------+--. | * * | | Scripting VM | | * * | | .----------------------. | | * * | | | Main program +-----------------. | | * * | | | { | Message handler | | | * * | | | ----------------- +-----------------+ | | * * | | | ----------------- | ... | | | * * | | | ----------------- +-----------------+ | | * * | | | ----------------- | Message handler | | | * * | | | } +-----------------' | | * * | | '----------------------' ^ | | * * | '---------------------------------|---------' | * * | | | * * '-------------------------------------------|-------------' * * | * * .---------+---------. * * | Messages | * * | ----------------- | * * | ----------------- | * * | ----------------- | * * '-------------------' * ********************************************************************** The root node of the voice graph interfaces to the outside world through either an actual audio driver for real time operation, or a buffering or streaming driver for asynchronous operation, or offline rendering. ********************************************************************** * Voice graph: "Everything is a Voice" + * * .----. /| * * | | .--+ | * * | Root +--->| | | * * | | '--+ | * * '----' \| * * .-----. ^ + * * | | | * * | Group +---------------------------->* * * | | ^ * * '-----' .-----. | * * .-----. ^ | | | * * | | | | Group +----------->* * * | Voice +--->* | | ^ * * | | ^ '-----' | * * '-----' | .-----. ^ . . * * .-----. | | | | . . * * | | | | Voice +--->* . . * * | Voice +--->* | | ^ .-----. ^ * * | | ^ '-----' | | | | * * '-----' | .-----. | | Group +---' * * . . | | | | | * * . . | Voice +--->* '-----' * * . . | | ^ * * .-----. ^ '-----' | * * | | | . . * * | Voice +---' . . * * | | . . * * '-----' .-----. ^ * * | | | * * | Voice +---' * * | | * * '-----' * ********************************************************************** A voice in the graph can serve as a group, bus, or similar construct. A voice with subvoices can either have the output from those mixed with its own output, or pass it through its graph of Units, as if the subvoices were local oscillators. ********************************************************************** * Default behavior: Subvoices feeding "up the tree". * * .----------------------------------------------------. * * | Voice | * * | .-------. .-------. .-------. | * * | | | | | | | | * * | | (Unit) +--->| (Unit) +---> ... --->| (Unit) +----->*---> * * | | | | | | | | ^ * * | '-------' '-------' '-------' | | * * | | | * * '----------------------------------------------------' | * * .--------. | * * | | | * * | Subvoice +--->* * * | | ^ * * '--------' | * * .--------. | * * | | | * * | Subvoice +--->* * * | | ^ * * '--------' | * * . . * * . . * * . . * * .--------. ^ * * | | | * * | Subvoice +---' * * | | * * '--------' * ********************************************************************** ********************************************************************** * * * Inline mode: Subvoices feeding into their parent's Unit graph. * * .---------------------------------------------------------. * * | Voice | * * | .-------. .-------. .-------. | * * | | | | | | | | * * | | inline +--->| (Unit) +--->| (Unit) +---> ... -----> * * | | | | | | | | * * | '-------' '-------' '-------' | * * | ^ | * * '--------------|------------------------------------------' * * .--------. | * * | | | * * | Subvoice +--->* * * | | ^ * * '--------' | * * .--------. | * * | | | * * | Subvoice +--->* * * | | ^ * * '--------' | * * . . * * . . * * . . * * .--------. ^ * * | | | * * | Subvoice +---' * * | | * * '--------' * ********************************************************************** The leaf nodes of the voice graph are what actually corresponds most closely to what ordinary synths and samplers typically refer to as "voices." Each one of the leaf nodes typically plays a single musical note, or sound effect, while the remaining nodes in the tree [create and manage voices](voice-management.md.html), and route and process audio from them.