- x
path to a folder, one or more wav or mp3 files c('file1.wav',
'file2.mp3'), Wave object, numeric vector, or a list of Wave objects or
numeric vectors
- samplingRate
sampling rate of x
(only needed if x
is a
numeric vector)
- scale
maximum possible amplitude of input used for normalization of
input vector (only needed if x
is a numeric vector)
- from, to
if NULL (default), analyzes the whole sound, otherwise
from...to (s)
- step
step, ms (determines time resolution of the plot, but not of the
returned envelopes per channel). step = NULL means no downsampling at all
(ncol of output = length of input audio)
- dynamicRange
dynamic range, dB. All values more than one dynamicRange
under maximum are treated as zero
- filterType
"butterworth" = Butterworth filter
butter
, "chebyshev" = Chebyshev filter
butter
, "gammatone" =
gammatone
- nFilters
the number of filters between minFreq
and
maxFreq
(determines frequency resolution, while yScale
determines the location of center frequencies)
- nFilters_oct
an alternative way to specify frequency resolution: the
number of filters per octave
- filterOrder
filter order (defaults to 4 for gammatones, 3 otherwise)
- bandwidth
filter bandwidth, octaves. If NULL, defaults to ERB
bandwidths as in gammatone
- bandwidthMult
a scaling factor for all bandwidths (1 = no effect)
- minFreq, maxFreq
the range of frequencies to analyze. If the
spectrogram looks empty, try increasing minFreq - the lowest filters are
prone to returning very large values
- minBandwidth
minimum filter bandwidth, Hz (otherwise filters may
become too narrow when nFilters is high; has no effect if filterType =
'gammatone')
- output
a list of measures to return. Defaults to everything, but this
takes a lot of RAM, so shorten to what's needed if analyzing many files at
once
- reportEvery
when processing multiple inputs, report estimated time
left every ... iterations (NULL = default, NA = don't report)
- cores
number of cores for parallel processing
- plot
should a spectrogram be plotted? TRUE / FALSE
- savePlots
full path to the folder in which to save the plots (NULL =
don't save, '' = same folder as audio)
- plotFilters
if TRUE, plots the filters as central frequencies ±
bandwidth/2
- osc
"none" = no oscillogram; "linear" = on the original scale; "dB" =
in decibels
- heights
a vector of length two specifying the relative height of the
spectrogram and the oscillogram (including time axes labels)
- ylim
frequency range to plot, kHz (defaults to 0 to Nyquist
frequency). NB: still in kHz, even if yScale = bark, mel, or ERB
- yScale
determines the location of center frequencies of the filters
- contrast
controls the sharpness or contrast of the image: <0 =
decrease contrast, 0 = no change, >0 increase contrast. Recommended range
approximately (-1, 1). The spectrogram is raised to the power of
exp(3 * contrast)
- brightness
makes the image lighter or darker: <0 = darker, 0 = no
change, >0 = lighter, range (-1, 1). The color palette is preserved, so
"brightness" works by capping an increasing proportion of image at the
lightest or darkest color. To lighten or darken the palette, just change
the colors instead
- maxPoints
the maximum number of "pixels" in the oscillogram (if any)
and spectrogram; good for quickly plotting long audio files; defaults to
c(1e5, 5e5); does not affect reassigned spectrograms
- padWithSilence
if TRUE, pads the sound with just enough silence to
resolve the edges properly (only the original region is plotted, so the
apparent duration doesn't change)
- colorTheme
black and white ('bw'), as in seewave package ('seewave'),
matlab-type palette ('matlab'), or any palette from
palette
such as 'heat.colors', 'cm.colors', etc
- col
actual colors, eg rev(rainbow(100)) - see ?hcl.colors for colors
in base R (overrides colorTheme)
- extraContour
a vector of arbitrary length scaled in Hz (regardless of
yScale, but nonlinear yScale also warps the contour) that will be plotted
over the spectrogram (eg pitch contour); can also be a list with extra
graphical parameters such as lwd, col, etc. (see examples)
- xlab, ylab, main, mar, xaxp
graphical parameters for plotting
- grid
if numeric, adds n = grid
dotted lines per kHz
- width, height, units, res
graphical parameters for saving plots passed to
png
- ...
other graphical parameters