Internal soundgen function.
.ssm(
audio,
windowLength = 25,
step = 5,
overlap = NULL,
win = 1,
sparse = FALSE,
maxFreq = NULL,
nBands = NULL,
MFCC = 2:13,
input = c("mfcc", "melspec", "spectrum")[2],
norm = FALSE,
simil = c("cosine", "cor")[1],
kernelLen = 100,
kernelSD = 0.5,
padWith = 0,
plot = TRUE,
main = NULL,
heights = c(2, 1),
width = 900,
height = 500,
units = "px",
res = NA,
specPars = list(levels = seq(0, 1, length = 30), colorTheme = c("bw", "seewave",
"heat.colors", "...")[2], xlab = "Time, s", ylab = "kHz"),
ssmPars = list(levels = seq(0, 1, length = 30), colorTheme = c("bw", "seewave",
"heat.colors", "...")[2], xlab = "Time, s", ylab = "Time, s"),
noveltyPars = list(type = "b", pch = 16, col = "black", lwd = 3)
)
a list returned by readAudio
length of FFT window, ms
you can override overlap
by specifying FFT step, ms (NB:
because digital audio is sampled at discrete time intervals of
1/samplingRate, the actual step and thus the time stamps of STFT frames
may be slightly different, eg 24.98866 instead of 25.0 ms)
overlap between successive FFT frames, %
if TRUE, the entire SSM is not calculated, but only the central region needed to extract the novelty contour (speeds up the processing)
highest band edge of mel filters, Hz. Defaults to
samplingRate / 2
. See melfcc
number of warped spectral bands to use. Defaults to 100 *
windowLength / 20
. See melfcc
which mel-frequency cepstral coefficients to use; defaults to
2:13
the spectral representation used to calculate the SSM
if TRUE, the spectrum of each STFT frame is normalized
method for comparing frames: "cosine" = cosine similarity, "cor" = Pearson's correlation
length of checkerboard kernel for calculating novelty, ms (larger values favor global, slow vs. local, fast novelty)
SD of checkerboard kernel for calculating novelty
how to treat edges when calculating novelty: NA = treat sound before and after the recording as unknown, 0 = treat it as silence
if TRUE, plots the SSM
graphical parameters for plotting
relative sizes of the SSM and spectrogram/novelty plot
graphical parameters for saving plots passed to
png
graphical parameters for saving plots passed to
png
graphical parameters for saving plots passed to
png
graphical parameters for saving plots passed to
png
graphical parameters passed to filled.contour.mod
and
affecting the spectrogram
graphical parameters passed to filled.contour.mod
and
affecting the plot of SSM
graphical parameters passed to
lines
and affecting the novelty contour