AudioNodes supports multi-channel Audio (Value) lines, and automatically converts between different channel counts when needed.
Unless stated otherwise on a given Node’s documentation page, an Audio input supports at least 32 channels. Control inputs are always single-channel (mono). If an Audio line with more channels than what is supported is connected, the Audio line will be automatically down-mixed inside the Node.
Channels are identified by a channel index, beginning from 0, and are interpreted depending on expected channel layout.
The single channel with an index of
0 is used for the only mono channel.
Stereo and quad
Channel up-mixing and down-mixing
In AudioNodes, mixing audio connections of different channel counts is supported, and the channel conversion is handled automatically using speaker layout semantics (e.g. when mono and stereo Audio lines, or stereo and quad audio connections are mixed together, the stereo channels will be added to the front channels, but not the surround channels). The actual conversion rules are described in the following table.
This conversion is applicable when two audio connections with different channel counts are mixed (e.g. added together), or when an audio output is connected to an input that does not support the audio connection’s channel count.
|Mono to stereo||The mono channel is used for left and right channels.|
|Mono to quad||The mono channel is used for front left and front right, surround channels are silent.|
|Mono to 5.1||The mono channel is used for the center channel (C), everything else is silent.|
|Stereo to mono||Source channels are equally combined to a single mono channel (added together then divided by 2).|
|Stereo to quad||Left and right channels are kept as-is, surround channels are silent.|
|Stereo to 5.1||Left and right channels are kept as-is, everything else is silent.|
|Quad to mono||Source channels are equally combined to a single mono channel (added together then divided by 4).|
|Quad to stereo||Left and surround left are equally combined to produce the left channel, right and surround right are equally combined to produce the right channel.|
|Quad to 5.1||Left, right, surround left, surround right are used as-is. Center and subwoofer are left silent.|
|5.1 to mono||The mono output is calculated as follows:
The subwoofer channel is ignored.
|5.1 to stereo||The left output is calculated as follows:
Similarly for the right output:
The subwoofer channel is ignored.
|5.1 to quad||Surround left and surround right channels are used as-is.
The left channel is mixed with center in the following way:
Similarly for the right channel:
Everything else is left as-is.
For example, channel 7 is simply kept as channel 7, as AudioNodes makes no assumptions about speaker or studio setup beyond 5.1 (in 5.1, channels 0 to 5 are used, as shown above). In the above table,
0.7 is an estimation of
sqrt(2) / 2 (square root of 2 divided by 2).
If a custom conversion is required, the Channel Merger Node and the Channel Splitter Node can be used (although the individual inputs on these Nodes are still subject to the up-mixing and down-mixing rules stated below).
Audio and control connections are compatible with each other, mixing them is treated as if the result was an audio connection. For example, an audio output can be connected to a control input, and vice-versa, although it not always makes sense to do so.
Control inputs (usually used to automate a parameter on a Node) are always mono, as a multi-channel control input would make no sense at automating a single parameter. When a multi-channel connection is connected to a control input, only the first channel is used (channel index
0), everything else is dropped without down-mixing.