Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

soundscapespec

Soundscape frequency spectrum of a time wave


Description

This function returns a kHz binned spectrum as described by Kasten et al. (2012) for the description of a soundscape.

Usage

soundscapespec(wave, f, channel = 1, wl = 1024, wn = "hamming", ovlp = 50,
plot = TRUE, xlab = "Frequency (kHz)", ylim = c(0, 1), ...)

Arguments

wave

an R object.

f

sampling frequency of wave (in Hz). Does not need to be specified if embedded in wave.

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 ftwindow (by default "hamming").

ovlp

overlap between two successive analysis windows (in %), by default = 50%.

plot

if TRUE returns a barplot.

xlab

title of the barplot x axis.

ylim

range of the barplot y axis.

...

other barplot graphical parameters.

Details

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.

Value

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.

Author(s)

Jerome Sueur and Eric Kasten

References

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.

See Also

Examples

## Note that 'tico' is not a soundscape recording...
data(tico)
soundscapespec(tico, plot=TRUE, col="darkgreen")

seewave

Sound Analysis and Synthesis

v2.1.6
GPL (>= 2)
Authors
Jerome Sueur <sueur@mnhn.fr> [cre, au], Thierry Aubin [au], Caroline Simonis [au], Laurent Lellouch [main ctrb], Ethan C. Brown [ctrb], Marion Depraetere [ctrb], Camille Desjonqueres [ctrb], Francois Fabianek [ctrb], Amandine Gasc [ctrb], Eric Kasten [ctrb], Stefanie LaZerte [ctrb], Jonathan Lees [ctrb], Jean Marchal [ctrb], Andre Mikulec [ctrb], Sandrine Pavoine [ctrb], David Pinaud [ctrb], Alicia Stotz [ctrb], Luis J. Villanueva-Rivera [ctrb], Zev Ross [ctrb], Carl G. Witthoft [ctrb], Hristo Zhivomirov [ctrb].
Initial release
2020-06-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.