specflux | R Documentation |
Compute spectral flux
specflux(wave, f, channel = 1,
wl = 512, ovlp = 0, wn = "rectangle", flim = NULL,
norm = FALSE, p = 2,
plot = TRUE, xlab = "Times (s)", ylab = "Flux", type = "l", ...)
wave |
an R object. |
f |
sampling frequency of |
channel |
channel of the R object, by default left channel (1). |
wl |
window length for the analysis (even number of points) (by default = 512). |
ovlp |
overlap between two successive windows (in %). |
wn |
window name, see |
flim |
a numeric vector of length 2 to select a frequency band (in kHz). |
norm |
if is |
p |
the norm type, by default = 2. |
plot |
logical, if |
xlab |
title of the x axis. |
ylab |
title of the y axis. |
type |
if |
... |
other |
The spectral flux (F
) is the sum of the time (t
) derivative of
the columns – that is the successive spectra –
(s
) of the normalized short-term Fourier transform (z
).
F is then computed according to:
F = (\sum |s(t+1) - s(t)|^{p})^{\frac{1}{p}}
When plot
is FALSE
, specflux
returns a two-column matrix, the
first column being time in seconds (x-axis) and the second column being the spectral flux (y-axis) computed along time.
The sum of the successive spectral flux values could be used as an
ecoacoustic index, quite close to the acoustic complexity index
(ACI
). See examples.
Jérôme Sueur
Scheirer E, Slaney M (1997). Construction and evaluation of a robust multifeature speech/music discriminator. IEEE International Conference on Acoustics, Speech, and Signal Processing, 2, 1221-1224.
spectro
, ACI
## default use
data(tico)
specflux(tico)
## norm 1
specflux(tico, p = 1)
## frequency limit between 2 and 4 kHz
specflux(tico, flim = c(2,4))
## index computation
sum(specflux(tico, plot=FALSE)[,2])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.