manualoc
produces an interactive spectrographic view in which the start
and end times of acoustic signals can be measured.manualoc(wl = 512, flim = c(0,12), seltime = 1, tdisp = NULL, reccomm =
FALSE, wn = "hanning", title = TRUE, selcomm = FALSE, osci = FALSE, player =
NULL, pal = reverse.gray.colors.2)
spectro
.
Default is c(0,12).TRUE
).
Default is 1 second.NULL
which displays the full sound file.TRUE
pops up a comment window at the end of each sound file.
The comment needs to be quoted. Default is FALSE
.ftwindow
for more options.TRUE
the name of the sound file will be printed as the main
title of the spectrogram window. Default is TRUE
TRUE
pops up a comment window after each selection. The
comment is printed as a label on the selected unit. The comment must be quoted. Default is FALSE
TRUE
adds a oscillogram whenever the spectrograms are produced
with higher resolution (see seltime). Default is FALSE
.spectro
. Default is reverse.gray.colors.2. See Details.The function produces a .csv file (manualoc_output.csv) with information about the .wav file name, selection number, start and end time, selection comment (selcomm), and sound file comment (reccomm). The file is saved in the working directory and is updated every time the user moves into the next sound file (Next rec "button") or stop the process (Stop "button"). When resuming the process (after "stop" and re-running the function in the same working directory), the function will keep the previous selections and will only pick up .wav files that are not present in the .csv file (not previously analyzed). When users go to the next sound file (Next rec "button") without making any selection the file is still included in the .csv file, with NA's in the "end", "time" and "selec" field.
Windows length (wl) controls the temporal and frequency precision of the spectrogram. A high "wl" value increases the frequency resolution but reduces the temporal resolution, and vice versa. Any color palette that comes with the seewave package can be used: temp.colors, reverse.gray.colors.1, reverse.gray.colors.2, reverse.heat.colors, reverse.terrain.colors, reverse.topo.colors, reverse.cm.colors, heat.colors, terrain.colors, topo.colors, cm.colors. The function is slow when working on files of length > 5min.
#First create empty folder
dir.create(file.path(getwd(),"temp"))
setwd(file.path(getwd(),"temp"))
# save wav file examples
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")
manualoc()
# need to use the buttoms to manipulate function
# check working directory for .csv file after stopping function
#remove example directory
unlink(getwd(),recursive = TRUE)
Run the code above in your browser using DataLab