Skip to contents

Denoise a Wave for temporal measurements

Usage

clean_wave(
  wave,
  filter = "fir",
  min = NULL,
  max = NULL,
  gate = 0.05,
  oscillo = TRUE
)

Arguments

wave

a Wave object.

filter

Character. Select a bandpass filter. Options are 'fir' (Finite Impulse Response);'bwf' (Butterworth); and 'freq' (Frequency filter).

min

Numeric. The minimum frequency for the bandpass filter.

max

Numeric. The maximum frequency for the bandpass filter.

gate

Numeric (double). The proportion of the maximum amplitude to use as a threshold for the noise gate. The values below this threshold are clipped to zero.

oscillo

Logical. If TRUE (default), a simple oscillogram of the output wave is plotted.

Value

a Wave object

Details

This function was developed as a preprocessing step for temporal measurements only. DO NOT conduct spectral analysis on objects returned by this function.

Examples

if (FALSE) { # \dontrun{
library(RthopteraSounds)
data(Coryphoda)
clean_wave(Coryphoda)
} # }