AudioPan
Examples
open all close allBasic Examples (2)
Transform a mono audio object to a stereo one:
a = Audio["ExampleData/rule30.wav"];
AudioPlot@aAudioPan[a]//AudioPlotModify the left–right balance of a stereo object:
a = ExampleData[{"Sound", "Piano"}, "Audio"];
AudioPlot@aAudioPan[a, -.5]//AudioPlotScope (3)
The panning can be controlled dynamically with a pure function:
a = AudioGenerator["Sin"]AudioPan[a, Sin[2Pi#]&]//AudioPlotWith a TimeSeries:
pan = TimeSeries[{{0.03, -1}, {0.5, 0.7}, {1, 0}}];AudioPan[a, pan]//AudioPlotWith an Audio object:
pan = AudioGenerator[{"Sawtooth", 2}];AudioPan[a, pan]//AudioPlotProcess the audio track of a video:
AudioPan[\!\(\*VideoBox[""]\), -.8]//AudioPlotAudioPan is listable:
a1 = AudioGenerator["White"];
a2 = AudioGenerator["Sine"];AudioPan[{a1, a2}]Properties & Relations (3)
AudioPan uses a sinusoidal panning algorithm to keep the sum of the powers of the output channels constant:
a = Audio[{1}];
values = Table[Flatten@AudioData[AudioPan[a, pan]], {pan, -1, 1, .1}]//Transpose;ListLinePlot[Join[values ^ 2, {Total[values ^ 2]}], DataRange -> {-1, 1}, PlotLegends -> {{"Left Channel Power", "Right Channel Power", "Total Power"}}]With a mono input, AudioPan duplicates the signal on the two output channels, and the pan parameter controls the left–right balance of the resulting audio object:
a = \!\(\*AudioBox[""]\);
AudioPlot[a, PlotRange -> .05]AudioPlot[AudioPan[a, .7], PlotRange -> .05]In the case of a stereo input, pan controls the relative levels of the two channels without any mixing:
a = \!\(\*AudioBox[""]\);
AudioPlot[a, PlotRange -> .05]AudioPlot[AudioPan[a, .7], PlotRange -> .05]On a stereo audio object, AudioPan[audio] or AudioPan[audio,0] does not modify the input.
Pan an audio object using AudioChannelMix:
a = \!\(\*AudioBox[""]\);
AudioPlot[a, PlotRange -> .05]AudioPlot[AudioChannelMix[a, {"Stereo", {1}, {.7}}], PlotRange -> .05]Related Guides
Text
Wolfram Research (2016), AudioPan, Wolfram Language function, https://reference.wolfram.com/language/ref/AudioPan.html (updated 2024).
CMS
Wolfram Language. 2016. "AudioPan." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/AudioPan.html.
APA
Wolfram Language. (2016). AudioPan. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AudioPan.html
BibTeX
@misc{reference.wolfram_2026_audiopan, author="Wolfram Research", title="{AudioPan}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/AudioPan.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_audiopan, organization={Wolfram Research}, title={AudioPan}, year={2024}, url={https://reference.wolfram.com/language/ref/AudioPan.html}, note=[Accessed: 13-June-2026]}