AudioPlot
AudioPlot[audio]
plots the waveform of audio.
AudioPlot[{audio1,audio2,…}]
plots waveforms of all audioi.
Details and Options



- AudioPlot returns a single graphic showing the waveform corresponding to channels of audio.
- AudioPlot has the same options as Graphics, with the following additions and changes:
-
Appearance Automatic appearance of the plot AspectRatio 1/6 the aspect ratio of the plot Axes {True,False} whether to draw axes AxesOrigin {0,0} where axes should cross ColorFunction Automatic how to determine the coloring of waveforms ColorFunctionScaling False whether to scale color function arguments Frame True whether to put a frame around the plot MaxPlotPoints Automatic maximum number of samples to show PlotLayout Automatic the layout to be used PlotRange Automatic range of values to include PlotRangeClipping True whether to clip at the plot range PlotStyle Automatic the styles in which objects are to be drawn PlotTheme $PlotTheme overall theme for the plot - Possible settings for the Appearance option include:
-
"Continuous" continuous plot "Discrete" discrete plot "ContinuousAbs" continuous plot of absolute values "DiscreteAbs" discrete plot of absolute values - The plot layout can be specified as PlotLayout->{individual,combination}, where individual specifies the layout for each audio object, and combination specifies how to combine multiple audio objects.
- Possible settings for individual include:
-
"Averaged" waveform of the average of the channels "Overlaid" overlaid waveforms of the channels "Vertical" waveform of channels in a vertical grid - Possible settings for combination layouts include:
-
"Overlaid" overlaid waveforms of the audio objects "Vertical" grid waveforms of objects in a vertical grid - PlotRange supports the following special settings:
-
t {{0,t},Automatic} plot the first t seconds {t1,t2} {{t1,t2},Automatic} plot the waveform from t1 to t2 seconds - The time specification ti can also be a time quantity (e.g. Quantity[0.1,"Minutes"]) or sample quantity (e.g. Quantity[1000,"Samples"]).
Examples
open allclose allScope (9)
Basic Uses (4)
Options (37)
Appearance (4)
By default, a continuous waveform is shown for audio objects:
Show a discrete plot of absolute values:
The appearance elements are applied to channels of multichannel audio objects:
Discrete absolute plot for a stereo audio object:
Discrete plot for a list of audio objects:
It is possible to control the density of vertical bars in the "Discrete" and "DiscreteAbs" visualizations using the MaxPlotPoints option:
AspectRatio (1)
AspectRatio controls the aspect ratio of the plot:
With "Vertical" layout, the setting of AspectRatio controls the aspect ratio of each waveform:
Axes (1)
All the options related to Axes refer to the axes of the plots of the single channels:
AxesOrigin (1)
AxesOrigin refers to the plots of the single channels:
ColorFunction (5)
Color by a scaled coordinate and scaled
coordinate, respectively:
Color a curve red when its absolute coordinate is above 0.6:
ColorFunction can be used to visualize properties of the audio object:
Compute the fundamental frequency of the audio object:
Delete the missing values and rescale it between 0 and 1:
Use the result so that the color of the waveform is proportional to the fundamental frequency at that time:
ColorFunction has higher priority than PlotStyle for coloring the waveform:
ColorFunction can be used with any setting of Appearance:
FillingStyle (2)
FrameTicks (5)
The Automatic setting will generate only two ticks for the axis independently of PlotRange:
It is possible to specify the FrameTicks for each axis:
Place tick marks at specified positions:
Place tick marks at specified positions with arbitrary labels:
MaxPlotPoints (1)
MaxPlotPoints controls the maximum number of points displayed:
The smaller the number of points displayed, the more smoothing is applied:
PlotLayout (3)
PlotRange (4)
PlotStyle (4)
PlotStyle specifies the style in which the waveform is to be drawn:
Explicitly style each channel:
AudioPlot will automatically style multiple audio objects:
Control the style of multiple audio objects:
Explicitly style multiple audio objects:
Specify the style of the individual channels of each audio object:
Applications (3)
Highlight parts of an audio object:
Plot waveforms of audio files in a collection:
Show a TimeSeries on top of the waveform:
Text
Wolfram Research (2016), AudioPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/AudioPlot.html.
CMS
Wolfram Language. 2016. "AudioPlot." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AudioPlot.html.
APA
Wolfram Language. (2016). AudioPlot. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AudioPlot.html