rmnoise {seewave}R Documentation

Remove noise

Description

This function removes background noise by smoothing

Usage

rmnoise(wave, f, Sample = FALSE, ...)

Arguments

wave a vector, a matrix (first column), an object of class ts, Sample (left channel), or Wave (left channel).
f sampling frequency of wave (in Hz). Does not need to be specified if wave is an object of class ts, Sample, or Wave.
Sample a logical, if TRUE returns an object of class Sample
... other smooth.spline arguments.

Details

This function is based on smooth.spline. You can use the arguments of the later to modify the smoothing.

Value

A new wave is returned as a one-column matrix or as a Sample object if Sample is TRUE.

Note

Low frequency noise might not be removed out properly.

Author(s)

Jerome Sueur sueur@mnhn.fr

See Also

afilter, noise

Examples

# synthesis of a 440 Hz sound with background noise
n <- noise(d=1,f=8000)
s <- synth(d=1,f=8000,cf=440)
ns <- n+s
# remove noise (but low frequency content still there)
a <- rmnoise(ns,f=8000)

[Package seewave version 1.5.4 Index]