
Last chance! 50% off unlimited learning
Sale ends in
Creates spectrograms of all wav/mp3 files in a folder and saves them as .png
files in the same folder. This is a lot faster than running
analyzeFolder
if you don't need pitch tracking. By default it
also creates an html file with a list of audio files and their spectrograms
in the same folder. If you open it in a browser that supports playing .wav
and/or .mp3 files (e.g. Firefox or Chrome), you can view the spetrograms and
click on them to play each sound. Unlike analyzeFolder
,
spectrogramFolder supports plotting both a spectrogram and an oscillogram if
osc = TRUE
. The default approximate width of images in html (flexbox)
is determined by the width
parameter (ie it is the same as the width
of png images, in pixels).
spectrogramFolder(
myfolder,
htmlPlots = TRUE,
verbose = TRUE,
windowLength = 50,
step = NULL,
overlap = 50,
wn = "gaussian",
zp = 0,
ylim = NULL,
xlab = "Time, ms",
ylab = "kHz",
width = 900,
height = 500,
units = "px",
res = NA,
...
)
full path to the folder containing wav/mp3 files
if TRUE, saves an html file with clickable plots
if TRUE, reports progress and estimated time left
length of FFT window, ms
you can override overlap
by specifying FFT step, ms
overlap between successive FFT frames, %
window type: gaussian, hanning, hamming, bartlett, rectangular, blackman, flattop
window length after zero padding, points
frequency range to plot, kHz (defaults to 0 to Nyquist frequency)
graphical parameters
graphical parameters
parameters passed to
png
if the plot is saved
parameters passed to
png
if the plot is saved
deprecated
parameters passed to
png
if the plot is saved
other parameters passed to spectrogram
# NOT RUN {
spectrogramFolder(
'~/Downloads/temp',
windowLength = 40, overlap = 75, # spectrogram pars
width = 1500, height = 900, # passed to png()
osc = 'dB', heights = c(1, 1)
)
# note that the folder now also contains an html file with clickable plots
# }
Run the code above in your browser using DataLab