resample_est | R Documentation |
resample_est
changes sampling rate and bit depth of wave objects in a extended selection table.
resample_est(
X,
samp.rate = 44.1,
bit.depth = 16,
avoid.clip = TRUE,
pb = FALSE,
parallel = 1
)
X |
object of class 'extended_selection_table' (see |
samp.rate |
Numeric vector of length 1 with the sampling rate (in kHz) for output files. Default is |
bit.depth |
Numeric vector of length 1 with the dynamic interval (i.e. bit depth) for output files. |
avoid.clip |
Logical to control whether the volume is automatically
adjusted to avoid clipping high amplitude samples when resampling. Ignored if
' |
pb |
Logical argument to control progress bar. Default is |
parallel |
Numeric. Controls whether parallel computing is applied. It specifies the number of cores to be used. Default is 1 (i.e. no parallel computing). |
This function aims to simplify the process of homogenizing sound files (sampling rate and bit depth). This is a necessary step before running any further (bio)acoustic analysis. SOX must be installed.
An extended selection table with the modified wave objects.
Marcelo Araya-Salas (marcelo.araya@ucr.ac.cr) #last modification on oct-15-2018 (MAS)
Araya-Salas, M., & Smith-Vidaurre, G. (2017). warbleR: An R package to streamline analysis of animal acoustic signals. Methods in Ecology and Evolution, 8(2), 184-191.
mp32wav
, fix_wavs
Other extended selection table manipulation:
by_element_est()
,
rename_est_waves()
## Not run:
data(list = c("Phae.long1", "Phae.long2", "Phae.long3", "Phae.long4", "selec_table"))
writeWave(Phae.long1, file.path(tempdir(), "Phae.long1.wav"))
writeWave(Phae.long2, file.path(tempdir(), "Phae.long2.wav"))
writeWave(Phae.long3, file.path(tempdir(), "Phae.long3.wav"))
writeWave(Phae.long4, file.path(tempdir(), "Phae.long4.wav"))
# create extended selection table
X <- selection_table(
X = lbh_selec_table, extended = TRUE, pb = FALSE,
path = tempdir()
)
# resample
Y <- resample_est(X)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.