zapsilw: Zap silence periods of a time wave

View source: R/seewave.r

zapsilwR Documentation

Zap silence periods of a time wave

Description

This function simply deletes the silence periods of a time wave.

Usage

zapsilw(wave, f, channel = 1, threshold = 5, plot = TRUE, output = "matrix", ...)

Arguments

wave

an R object.

f

sampling frequency of wave (in Hz). Does not need to be specified if embedded in wave.

channel

channel of the R object, by default left channel (1).

threshold

amplitude threshold (in %) between silence and signal.

plot

logical, if TRUE plots the orginal and the new oscillograms (by default TRUE).

output

character string, the class of the object to return, either "matrix", "Wave", "Sample", "audioSample" or "ts".

...

other oscillo graphical parameters.

Value

If plot is FALSE, a new wave is returned. The class of the returned object is set with the argument output.

Note

Use the argument threshold to set the level of silence. See the examples.

Author(s)

Jerome Sueur

See Also

afilter, oscillo

Examples

data(orni)
zapsilw(orni,f=22050,colwave="red")
# setting the threshold value
zapsilw(orni,f=22050,threshold=1)

seewave documentation built on Oct. 19, 2023, 5:07 p.m.

Related to zapsilw in seewave...