rmnoise {seewave}R Documentation

Remove noise

Description

This function removes background noise by smoothing

Usage

rmnoise(wave, f, channel = 1, 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).

output

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

...

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. The class of the returned object is set with the argument output.

Note

Low frequency noise might not be removed out properly.

Author(s)

Jerome Sueur sueur@mnhn.fr

See Also

afilter, noisew

Examples

# synthesis of a 440 Hz sound with background noise
n <- noisew(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 2.2.3 Index]