Learn R Programming

seewave (version 2.1.8)

timelapse: Time lapse

Description

Append successive input sounds into a single output sound

Usage

timelapse(dir, from = 1, to = Inf,
units = c("samples", "seconds", "minutes", "hours"), verbose = TRUE)

Arguments

dir

a character vector, the path to the directory where the .wav files are stored or directly the names of the .wav files to be appended.

from

where to start reading the input files, in units. See readWave of the package tuneR.

to

where to stop reading, in units. See readWave of the package tuneR.

units

time units in which from and to is given, the default is "samples", but can be set to time intervals such as "seconds". See readWave of the package tuneR.

verbose

a logical, if TRUE (default) the file number and name processed are displayed in the console.

Value

A Wave object, a class defined in the package tuneR.

Details

The function takes the .wav files which names are provided in the argument dir and append (paste) them successively so that a single object is obtained. This can be used to produce sound time lapse based on a series of ordered files as those produced by an automatic recorder (e.g. SongMeter of the society 'Wildlife Acoustics'). Only a section of each file can be extracted by using the arguments from and to. The function is based on readWave and bind of the package tuneR.

See Also

pastew

Examples

Run this code
# NOT RUN {
## if 'dir' contains a set of files recorded with a Wildlife Acoustics
# songmeter recorder then a direct way to obtain
# the spectrogram of all .wav files is
dir <- "pathway-to-directory-containing-wav-files"
res <- timelapse(dir)
# to extract a selection of each file (here a section starting
# at 10 s and ending at 12 s)
res <- timelapse(dir, from=10, to=12, unit="seconds")
# }

Run the code above in your browser using DataLab