cutRain | R Documentation |
A follow on function to classifyRain
for longer wav files. This function labels and
cuts (removes) sections of hard rain in audio files, then saves contiguous periods without rainfall as
new wav files.
cutRain(
x,
threshold = c("min", "Q2"),
inF,
label.only = F,
outF,
label.type = "audacity"
)
x |
A matrix of results from |
threshold |
A character vector with the threshold type to use ("min" or "Q2"). Defaults to "min" |
inF |
Source folder for wav files. Defaults to home directory if missing. |
label.only |
Logical. If TRUE, only label file is written, wav files are not cut and saved. |
outF |
Destination folder for new wav files. Defaults to inF if missing. |
label.type |
A character vector, for the moment, just "audacity", to include a label file to
be written in |
This function is only designed to work with results from classifyRain
where input audio files
are subdivided into smaller time segments with t.step
argument. If label.only
is FALSE
,
then segments containing rain will be cut from original audio files, and remaining contiguous audio
saved as new wav files. Optionally, a label file for the original wav can be written to the input folder,
marking segments with rain/clear in the wav file (either for Audacity or Raven software).
If a vector of start times and dates (as POSIX* format) is given in start
, then filenames will be
suffixed with new start times. Otherwise, new wav files are suffixed with a numeric ID for each separate
segment originating from the input wav file.
A dataframe (invisibly) detailing the labels/new wav files created, with, filename and full path.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.