AudioChannelMix

AudioChannelMix[audio]

mixes channels of audio by averaging and returns a center-panned stereo audio object.

AudioChannelMix[audio,desttype]

mixes audio channels into the specified desttype.

Details

  • The following destination type desttype can be specified for an m channel audio object:
  • "Mono"mono signal, using the average channel value
    {"Mono",{w1,,wm}}mono signal, using a weighted average
    "Stereo"stereo signal, using the average value and center panning
    {"Stereo",{w1,,wm}}stereo signal, using weighted average and center panning
    {"Stereo",{w1,,wm},{p1,,pm}}stereo signal, using weighted average and specified panning
    nn-channel signal, evenly distributing the m input channels
    {n,mat}n-channel signal, using an arbitrary m×n distribution matrix mat
  • In the distribution matrix mat, the element wij is the amount of input channel i that goes into the output channel j.
  • The given weights wi can be given as scalar multipliers or in decibels.
  • A scalar multiplier wi is equivalent to in decibels.
  • For "Stereo" mixing, sinusoidal panning is used.
  • The AudioType of the returned object is either "Real32" or "Real".

Examples

open allclose all

Basic Examples  (1)

Convert mono audio to stereo:

Downmix stereo audio to mono:

Scope  (4)

When downmixing to mono, the average of all input channels is used by default:

Specify the weights assigned to the input channels:

When mixing to stereo, the average of all input channels is replicated on both output channels by default:

Use different weights for each input channel:

By default, all input channels are center panned. Specify the amount of panning for each input channel:

Create a three-channel signal by evenly mixing all input channels:

Specify all weights using a distribution matrix:

Specify weights in decibels:

Applications  (2)

Conform the number of channels of a list of audio objects without using padding:

Distribute a mono Audio object to an arbitrary number of output channels:

Properties & Relations  (3)

Downmix a signal to a single channel using audio arithmetics:

If no weights are specified, the average of the input channels is replicated on all output channels:

Relation with Dot:

Wolfram Research (2016), AudioChannelMix, Wolfram Language function, https://reference.wolfram.com/language/ref/AudioChannelMix.html.

Text

Wolfram Research (2016), AudioChannelMix, Wolfram Language function, https://reference.wolfram.com/language/ref/AudioChannelMix.html.

CMS

Wolfram Language. 2016. "AudioChannelMix." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AudioChannelMix.html.

APA

Wolfram Language. (2016). AudioChannelMix. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AudioChannelMix.html

BibTeX

@misc{reference.wolfram_2023_audiochannelmix, author="Wolfram Research", title="{AudioChannelMix}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/AudioChannelMix.html}", note=[Accessed: 29-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_audiochannelmix, organization={Wolfram Research}, title={AudioChannelMix}, year={2016}, url={https://reference.wolfram.com/language/ref/AudioChannelMix.html}, note=[Accessed: 29-March-2024 ]}