selfsim | R Documentation |
Internal soundgen function.
selfsim(
m,
norm = FALSE,
simil = c("cosine", "cor")[1],
win = 1,
sparse = FALSE,
kernelSize = NULL
)
m |
input matrix such as a spectrogram |
norm |
if TRUE, the spectrum of each STFT frame is normalized |
simil |
method for comparing frames: "cosine" = cosine similarity, "cor" = Pearson's correlation |
win |
the length of window for averaging self-similarity, frames |
sparse |
if TRUE, the entire SSM is not calculated, but only the central region needed to extract the novelty contour (speeds up the processing) |
Called by ssm
.
Returns a square self-similarity matrix.
m = matrix(rnorm(40), nrow = 5)
soundgen:::selfsim(m, sparse = TRUE, kernelSize = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.