specan
measures acoustic parameters on acoustic signals for which the start and end times
are provided.specan(X, bp = c(0,22), wl = 512, threshold = 15, parallel = 1, fast = TRUE, path = NULL,
pb = TRUE, ovlp = 50, ff.method = "seewave", wn = "hanning")
parallelsugar
package should be installed.TRUE
(default) then the peakf acoustic parameter (see below) is not computed, which
substantially increases performance (~9 times faster).NULL
(default) then the current working directory is used.TRUE
. Note that progress bar is only used
when parallel = 1.ftwindow
for more options.duration
: length of signal (in s)
meanfreq
: mean frequency. Weighted average of frequency by amplitude (in kHz)
sd
: standard deviation of frequency weighted by amplitude
freq.median
: median frequency. The frequency at which the signal is divided in two frequency
intervals of equal energy (in kHz)
freq.Q25
: first quartile frequency. The frequency at which the signal is divided in two
frequency intervals of 25% and 75% energy respectively (in kHz)
freq.Q75
: third quartile frequency. The frequency at which the signal is divided in two
frequency intervals of 75% and 25% energy respectively (in kHz)
freq.IQR
: interquartile frequency range. Frequency range between 'freq.Q25' and 'freq.Q75'
(in kHz)
time.median
: median time. The time at which the signal is divided in two time
intervals of equal energy (in s)
time.Q25
: first quartile time. The time at which the signal is divided in two
time intervals of 25% and 75% energy respectively (in s). See acoustat
time.Q75
: third quartile time. The time at which the signal is divided in two
time intervals of 75% and 25% energy respectively (in s). See acoustat
time.IQR
: interquartile time range. Time range between 'time.Q25' and 'time.Q75'
(in s). See acoustat
skew
: skewness. Asymmetry of the spectrum (see note in specprop
description)
kurt
: kurtosis. Peakedness of the spectrum (see note in specprop
description)
sp.ent
: spectral entropy. Energy distribution of the frequency spectrum. Pure tone ~ 0;
noisy ~ 1. See sh
time.ent
: time entropy. Energy distribution on the time envelope. Pure tone ~ 0;
noisy ~ 1. See th
entropy
: spectral entropy. Product of time and spectral entropy sp.ent * time.ent
.
See H
sfm
: spectral flatness. Similar to sp.ent (Pure tone ~ 0;
noisy ~ 1). See sfm
peakf
: peak frequency. Frequency with highest energy
meanfun
: average of fundamental frequency measured across the acoustic signal
minfun
: minimum fundamental frequency measured across the acoustic signal
maxfun
: maximum fundamental frequency measured across the acoustic signal
meandom
: average of dominant frequency measured across the acoustic signal
mindom
: minimum of dominant frequency measured across the acoustic signal
maxdom
: maximum of dominant frequency measured across the acoustic signal
dfrange
: range of dominant frequency measured across the acoustic signal
modindx
: modulation index. Calculated as the cumulative absolute
difference between adjacent measurements of dominant frequencies divided
by the dominant frequency range. 1 means the signals is not modulated.
startdom
: dominant frequency measurement at the start of the signal
enddom
: dominant frequency measurement at the end of the signal
dfslope
: slope of the change in dominant through time ((enddom-startdom)/duration). Units are kHz/s.
manualoc
or autodetec
can be used
directly without any additional modification. The function measures 29 acoustic parameters (if fast = TRUE
) on
each selection in the data frame. Most parameters are produced internally by
specprop
, fpeaks
, fund
,
and dfreq
from the package seewave and FF
from the package tuneR. NAs are produced for fundamental and dominant
frequency measures when there are no amplitude values above the threshold.## Not run: ------------------------------------
# # First set temporary folder
# setwd(tempdir())
#
# data(list = c("Phae.long1", "Phae.long2", "Phae.long3", "Phae.long4", "selec.table"))
# writeWave(Phae.long1,"Phae.long1.wav")
# writeWave(Phae.long2,"Phae.long2.wav")
# writeWave(Phae.long3,"Phae.long3.wav")
# writeWave(Phae.long4,"Phae.long4.wav")
#
# a <- specan(X = selec.table, bp = c(0, 22))
#
# # using a diferent threshold
# a <- specan(X = selec.table, bp = c(0, 22), threshold = 20)
# # View(a)
#
## ---------------------------------------------
Run the code above in your browser using DataLab