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, sox = FALSE, 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. |
| sox | Logical to control whether SOX is used internally for resampling. Sox must be installed. Default is |
| 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). |
An extended selection table with the modified wave objects.
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. Either SOX (if sox = TRUE) or
or the bioacoustics package (if sox = FALSE) should be installed.
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.
Other extended selection table manipulation:
rename_waves_est()
if (FALSE) { 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, confirm.extended = FALSE, pb = FALSE, path = tempdir()) # resample Y <- resample_est(X) }