soundscapespec {seewave} | R Documentation |
This function returns a kHz binned spectrum as described by Kasten et al. (2012) for the description of a soundscape.
soundscapespec(wave, f, channel = 1, wl = 1024, wn = "hamming", ovlp = 50, plot = TRUE, xlab = "Frequency (kHz)", ylim = c(0, 1), ...)
wave |
an R object. |
f |
sampling frequency of |
channel |
channel of the R object, by default left channel (1). |
wl |
length of the window for the analysis (even number of points, by default = 1024). |
wn |
window name, see |
ovlp |
overlap between two successive analysis windows (in %), by default = 50%. |
plot |
if |
xlab |
title of the barplot x axis. |
ylim |
range of the barplot y axis. |
... |
other |
The soundscape frequency spectrum is based on the computation of a spectrogram power spectral density using Welch'smethod (Welch & June, 1967). Parameters used in Kasten et al. (2012) were a Hamming window of 1024 samples with 50% of overlap and are used here as default values.
A two-column numeric matrix, the first column returning the
frequency (kHz) bands and the second column returning the power
value within each frequency band.
A barplot is returned when plot
is TRUE
.
Jerome Sueur and Eric Kasten
Kasten, E.P., Gage, S.H., Fox, J. & Joo, W. (2012). The remote
environmental assessment laboratory's acoustic library: an archive for
studying soundscape ecology. Ecological Informatics, 12, 50-67.
Welch, P.D., June (1967). The use of the fast Fourier transform for the estimation
of power spectra: a method based on time-averaging over short, modified
periodograms. IEEE Transactions on Audio and Electroacoustics, 15: 70-73.
## Note that 'tico' is not a soundscape recording... data(tico) soundscapespec(tico, plot=TRUE, col="darkgreen")