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.
AudioChannelMix[video,…]
mixes audio channels of video.
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.
AudioChannelMix[video,…]
mixes audio channels of video.
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 n n-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 all close allBasic Examples (1)
Scope (5)
When downmixing to mono, the average of all input channels is used by default:
a = AudioChannelCombine[
{AudioGenerator["Sine", .01],
AudioGenerator["White", .01]}
];AudioChannelMix[a, "Mono"]//AudioPlotSpecify the weights assigned to the input channels:
AudioChannelMix[a, {"Mono", {.8, .2}}]//AudioPlotWhen mixing to stereo, the average of all input channels is replicated on both output channels by default:
a = AudioChannelCombine[
{AudioGenerator["Sine", .01],
AudioGenerator["White", .01]}
];AudioChannelMix[a, "Stereo"]//AudioPlotUse different weights for each input channel:
AudioChannelMix[a, {"Stereo", {.8, .2}}]//AudioPlotBy default, all input channels are center panned. Specify the amount of panning for each input channel:
AudioChannelMix[a, {"Stereo", {.5, .5}, {-.8, .5}}]//AudioPlotCreate a three-channel signal by evenly mixing all input channels:
a = AudioChannelCombine[
{AudioGenerator["Sine", .01],
AudioGenerator["White", .01]}
];AudioChannelMix[a, 3]//AudioPlotSpecify all weights using a distribution matrix:
AudioChannelMix[a, {3, (| | |
| -- | -- |
| 1 | 0 |
| 0 | 1 |
| .5 | .5 |)}]//AudioPlotAudioChannelMix[ExampleData[{"Audio", "Piano"}], {"Mono", {Quantity[-10, IndependentUnit["decibels"]], Quantity[10, IndependentUnit["decibels"]]}}]//AudioPlotProcess the audio track of a video:
AudioChannelMix[Video["ExampleData/fish.mp4"], "Mono"]//AudioChannelsApplications (2)
Conform the number of channels of a list of audio objects without using padding:
a1 = Import["ExampleData/rule30.wav"];
a2 = AudioPan@AudioGenerator["Sin"];AudioChannels /@ {a1, a2}AudioChannelMix[#, 2]& /@ {a1, a2}AudioChannels /@ %Distribute a mono Audio object to an arbitrary number of output channels:
a = Import["ExampleData/rule30.wav"];AudioChannelMix[a, 7]//AudioChannelsProperties & Relations (4)
Downmix a signal to a single channel using audio arithmetics:
a = ExampleData[{"Audio", "Piano"}, "Audio"]//AudioNormalize;Mean[AudioChannelSeparate[a]] == AudioChannelMix[a, 1]If no weights are specified, the average of the input channels is replicated on all output channels:
a = ExampleData[{"Audio", "Piano"}, "Audio"]//AudioNormalize;AudioChannelMix[a, 4] == AudioChannelCombine@Table[Mean@AudioChannelSeparate[a], 4]Relation with Dot:
a = ExampleData[{"Audio", "Piano"}, "Audio"]//AudioNormalize;AudioChannelMix[a, {3, (| | |
| --- | --- |
| 1 | 2 |
| 0.2 | 0.5 |
| 0.3 | 0.7 |)}] == AudioChannelCombine[(| | |
| --- | --- |
| 1 | 2 |
| 0.2 | 0.5 |
| 0.3 | 0.7 |).AudioChannelSeparate[a]]If the destination is "Stereo", the panning specification is equivalent to an AudioPan operation:
a = Import["ExampleData/rule30.wav"];AudioChannelMix[a, {"Stereo", {1}, {.7}}] == AudioPan[a, .7]Related Guides
Text
Wolfram Research (2016), AudioChannelMix, Wolfram Language function, https://reference.wolfram.com/language/ref/AudioChannelMix.html (updated 2024).
CMS
Wolfram Language. 2016. "AudioChannelMix." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. 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_2026_audiochannelmix, author="Wolfram Research", title="{AudioChannelMix}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/AudioChannelMix.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_audiochannelmix, organization={Wolfram Research}, title={AudioChannelMix}, year={2024}, url={https://reference.wolfram.com/language/ref/AudioChannelMix.html}, note=[Accessed: 12-June-2026]}