find_noise | R Documentation |
Detects the temporal position of the desired number of energy peaks in a recording exclusively with non-relevant events.
find_noise(recording, nmax = 1, plot = FALSE)
recording |
Object of class "rc". |
nmax |
Integer indicating the maximum number of peaks to detect in the recording. |
plot |
Logical. If TRUE a plot showing the peak(s) is returned. |
A vector with the temporal position of the identified peak(s), in samples.
Bruno Silva
# Create a sample wav file in a temporary directory recording <- tuneR::noise(duration = 44100) temp_dir <- tempdir() rec_path <- file.path(temp_dir, "recording.wav") tuneR::writeWave(recording, filename = rec_path) # Import the sample wav file new_rec <- import_audio(rec_path, butt = FALSE, tx = 1) find_noise(new_rec, nmax = 1, plot = FALSE) file.remove(rec_path)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.