
Last chance! 50% off unlimited learning
Sale ends in
autodetec
automatically detects the start and end of vocalizations in sound files based
on amplitude, duration, and frequency range attributes.autodetec(X= NULL, threshold=15, envt="abs", msmooth=c(300,90),
power=1, bp=NULL, osci = FALSE, wl = 512, xl = 1, picsize = 1, res = 100,
flim = c(0,22), ls = FALSE, sxrow = 10, rows = 10, mindur = NULL, maxdur =
NULL, redo = FALSE, img = TRUE, it = "jpeg", set = FALSE, flist = NULL)
manualoc
function or any data frame with columns
for sound file name (sound.files), selection number (selec), and start and end time of signal
(start and end).spectro
. Default is FALSE
. Not applied if ls is
TRUE
.spectro
. Default is c(0, 22).TRUE
, long spectrograms as in lspec
are produced.TRUE
and/or when X is not provided.TRUE
and/or when X is not provided.TRUE
all selections will be analyzed again
when code is rerun. If FALSE
only the selections that do not have a image
file in the working directory will be analyzed. Default is FALSE
.FALSE
, image files are not produced. Default is TRUE
.TRUE
, threshold (th), envelope (envt), bandpass (bp),
power (pw), msmooth (msmo), maxdur (mxdu), and mindur (midu) armanualoc
can be used as the input data frame. This function uses
a modified version of the timer
function from seewave
package to detect signals.# First create empty folder
dir.create(file.path(getwd(),"temp"))
setwd(file.path(getwd(),"temp"))
data(list = c("Phae.long1", "Phae.long2", "Phae.long3", "Phae.long4"))
writeWave(Phae.long1,"Phae.long1.wav")
writeWave(Phae.long2,"Phae.long2.wav")
writeWave(Phae.long3,"Phae.long3.wav")
writeWave(Phae.long4,"Phae.long4.wav")
ad <- autodetec(threshold=5, env="hil", msmooth=c(900,90), power=1,
bp=c(2,9), xl = 2, picsize = 2, res = 200, flim= c(1,11), osci = TRUE,
wl = 300, ls = FALSE, sxrow = 2, rows = 4, mindur=0.1, maxdur=1, set = TRUE)
#run it with different settings
ad <- autodetec(threshold=10, env="abs", msmooth=c(900,90), power=1,
bp=c(2,9), xl = 2, picsize = 2, res = 200, flim= c(1,11), osci = TRUE,
wl = 300, ls = FALSE, sxrow = 2, rows = 4, mindur=0.1, maxdur=1, set = TRUE)
#check this folder!!
getwd()
#remove example directory
unlink(getwd(),recursive = TRUE)
Run the code above in your browser using DataLab