Channel Matching & Mixing

AudioNodes has automatic channel matching for audio and control signals (but it’s mostly relevant to audio signals). It happens when you mix audio signals with different channel counts together in some way, either intentionally or unknowingly, e.g. by connecting a mono audio signal and a stereo audio signal to the same Add (Audio/Control) Node.

Most of the time, this works in a way so that it sounds natural for common speaker layouts (or virtual speaker layouts, such as surround headsets). For this reason, you can usually ignore it without further ado, because the behavior will be as you would expect.


Channel Up-Mixing

Channel up-mixing occurs when you cause multiple input signals, of different channel counts, to be merged into a single signal. A notable example of this is using an Add (Audio/Control) Node to merge a mono input signal and a stereo input signal. The result of this is a stereo output signal, where the mono signal is audible in both stereo channels. The same can happen with the Crossfader Node, for example.

The general rule of thumb of channel up-mixing is this: the signal with the lower channel count will be converted to match the signal with the higher channel count. This conversion follows speaker semantics. For example, a mono channel is up-mixed by assigning it to both stereo channels (left and right) unchanged. But when up-mixed to 5.1, the mono channel is assigned to the center speaker instead.

Mono to Stereo (1 to 2)

The single mono channel is used for both channels (left and right), as-is, without any change.

Mono to Quad (1 to 4)

The single mono channel is used for the 2 front channels (front left and front right), while surround channels (rear left and rear right) are left silent.

Mono to 5.1 (1 to 6)

The single mono channel is used for the center channel, while the rest of the channels (front left, front right, rear left, rear right, sub) are left silent.

Stereo to Quad (2 to 4)

The stereo channels are assigned to the front channels (left to front left, right to front right), while the rear channels (rear left, rear right) are left silent.

Stereo to 5.1 (2 to 6)

The stereo channels are assigned to the front channels (left to front left, right to front right), while the rest of the channels (center, sub, rear left, rear right) are left silent.

Quad to 5.1 (4 to 6)

The front left, front right, rear left, and rear right channels are assigned to the same channels in the 5.1 layout, while center and sub are left silent.

Other

Any other up-mixing not fitting these rules (e.g. stereo to 3 channels) is done on a channel to channel basis. For example, up-mixing a stereo channel to a 3-channel signal will assign the left channel to the “first” channel, the right channel to the “second” channel, and then leave the “third” channel silent. See channel ordering below.


Channel Down-Mixing

Channel down-mixing occurs when you connect a signal to an input, which doesn’t support that high of a channel count. A notable example would be every effect parameter in AudioNodes, which only support a single-channel control signal. If you happen to connect a stereo signal to an effect parameter control input, AudioNodes converts it to a mono signal before processing it.

Additionally, some Nodes have a fixed or limited channel count they support. The Convolver Node, for one, only supports a stereo input.

Stereo to Mono (2 to 1)

The 2 stereo channels are mixed equally into the single mono channel (taking 50% of both).

Quad to Mono (4 to 1)

The 4 channels are mixed equally into the single mono channel (taking 25% of each).

5.1 to Mono (6 to 1)

The sub channel is ignored. The rest of the channels are mixed in a way that approximates the intent of each channel, based on the following formula:

M = 0.7071 x (FL + FR) + C + 0.5 x (RL + RR)
Quad to Stereo (4 to 2)

The front left and rear left channels are equally mixed (50% of each) to produce the left channel. Same for the right channel.

5.1 to Stereo (6 to 2)

The sub channel is ignored. The rest of the channels are mixed in a way that approximates the intent of each channel, based on the following formula:

L = FL + 0.7071 x (C + RL)
R = FR + 0.7071 x (C + RR)
5.1 to Quad (6 to 4)

The rear left and rear right channels are kept as-is, and the sub channel is ignored. The resulting front left and front right channels are a result of the source front left and right channels, as well as the center channel, based on the following formula:

FL = FL + 0.7071 x C
FR = FR + 0.7071 x C
Other

Any other down-mixing not fitting these rules (e.g. 3 channels to stereo) is done on a channel to channel basis. For example, down-mixing a 3-channel signal to stereo will assign the “first” channel to the left channel, the “second” channel to the right channel, and drop the “third” channel. See channel ordering below.


Custom Mixing Behavior

All of the above applies only when you “accidentally”, or “unknowingly” mix signals with different channel counts, and is done as an attempt to keep things consistent.

If you require custom behavior, use the Channel Splitter Node and Channel Merger Node. These special Nodes allow you to not only reassign channels manually as needed, but also to apply per-channel processing (e.g. adding a reverb to the left channel only, or something like that).


Channel Ordering

While channel ordering only matters in some cases, channels are in fact ordered based on their semantical meaning, and depending on the actual channel count. In practice, this only matters when using the Channel Splitter Node or Channel Merger Node, and/or when an audio signal is carrying a non-standard channel count (such as 3 channels):

  • Mono (1): channel 1 is the single mono channel, as is obvious
  • Stereo (2): channel 1 is the left channel, channel 2 is the right channel
  • Quad (4): channel 1 is the front left channel, channel 2 is the front right channel, 3 is rear left, 4 is rear right
  • 5.1 (6): channel 1 is the front left channel, channel 2 is front right, 3 is center, 4 is sub, 5 is rear left, 6 is rear right