AudioPlot
AudioPlot[audio]
plots the waveform of audio.
AudioPlot[{audio1,audio2,…}]
plots waveforms of all audioi.
AudioPlot[video]
plots the waveform of the first audio track in video.
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: [List of all options]
-
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"]).
-
AlignmentPoint Center the default point in the graphic to align with Appearance Automatic appearance of the plot AspectRatio 1/6 the aspect ratio of the plot Axes {True,False} whether to draw axes AxesLabel None axes labels AxesOrigin {0,0} where axes should cross AxesStyle {} style specifications for the axes Background None background color for the plot BaselinePosition Automatic how to align with a surrounding text baseline BaseStyle {} base style specifications for the graphic ColorFunction Automatic how to determine the coloring of waveforms ColorFunctionScaling False whether to scale color function arguments ContentSelectable Automatic whether to allow contents to be selected CoordinatesToolOptions Automatic detailed behavior of the coordinates tool Epilog {} primitives rendered after the main plot FormatType TraditionalForm the default format type for text Frame True whether to put a frame around the plot FrameLabel None frame labels FrameStyle {} style specifications for the frame FrameTicks Automatic frame ticks FrameTicksStyle {} style specifications for frame ticks GridLines None grid lines to draw GridLinesStyle {} style specifications for grid lines ImageMargins 0. the margins to leave around the graphic ImagePadding All what extra padding to allow for labels etc. ImageSize Automatic the absolute size at which to render the graphic LabelStyle {} style specifications for labels MaxPlotPoints Automatic maximum number of samples to show Method Automatic details of graphics methods to use PlotLabel None an overall label for the plot PlotLayout Automatic the layout to be used PlotRange Automatic range of values to include PlotRangeClipping True whether to clip at the plot range PlotRangePadding Automatic how much to pad the range of values PlotRegion Automatic the final display region to be filled PlotStyle Automatic the styles in which objects are to be drawn PlotTheme $PlotTheme overall theme for the plot PreserveImageOptions Automatic whether to preserve image options when displaying new versions of the same graphic Prolog {} primitives rendered before the main plot RotateLabel True whether to rotate y labels on the frame Ticks Automatic axes ticks TicksStyle {} style specifications for axes ticks
List of all options
Examples
open allclose allBasic Examples (3)
Scope (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 (updated 2024).
CMS
Wolfram Language. 2016. "AudioPlot." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. 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