getClipData {PAMpal} | R Documentation |
Get Wav Clips of Data
Description
Reads audio clips containing sounds from events or detections
Usage
getClipData(
x,
buffer = c(0, 0.1),
mode = c("event", "detection"),
channel = 1,
useSample = FALSE,
fixLength = FALSE,
fillZeroes = TRUE,
progress = TRUE,
verbose = TRUE,
FUN = NULL,
...
)
Arguments
x |
AcousticStudy object containing data to read wav clips for |
buffer |
amount before and after each event to also include in the clip, in seconds. Can either be a vector of length two specifying how much to buffer before and after (first number should be negative), or a single value if the buffer amount should be identical. |
mode |
either |
channel |
channel(s) of clips to write |
useSample |
logical flag to use startSample information in binaries instead of UTC time for start of detections. This can be slightly more accurate (~1ms) but will take longer |
fixLength |
logical flag to fix the output clip length to a constant value. If
|
fillZeroes |
logical flag to fill gaps in non-consecutive clips with zeroes. If
|
progress |
logical flag to show progress bar |
verbose |
logical flag to show summary messages |
FUN |
optional function to apply to wav clips. This function takes default inputs |
... |
optional arguments to pass to |
Value
A named list of wav clips
Author(s)
Taiki Sakai taiki.sakai@noaa.gov
Examples
data(exStudy)
recs <- system.file('extdata', 'Recordings', package='PAMpal')
exStudy <- addRecordings(exStudy, folder=recs, log=FALSE, progress=FALSE)
## Not run:
# not running so that no wav clips are written to disk
wavs <- getClipData(exStudy, mode='event')
## End(Not run)