autoBandPassFilter: Applies automatic bandpass filter to an AM sound

Description Usage Arguments Details Value Note

View source: R/preprocessing.R

Description

This function assumes that the wave is a recording containing principally a single source and amplitude modulated song. It tries to find and apply automatic bandpass filter in order to reduce noise.

Usage

1
2
autoBandPassFilter(wave, bps = 2, min_freq = 1000, max_freq = NULL,
  wl = 2^10, plot=FALSE)

Arguments

wave

an R object or path to a wave file

bps

the bandpass size relative to

sigma

min_freq

the lowest expected frequency, in Hz

max_freq

the highest expected frequency, in Hz. If NULL the Nyquist frequency of the file will be used.

wl

the window length for spectrogram generation

plot

Is set to TRUE the function will plot the output.

Details

The bps arguments refers to the selectivity of the filter. It represents the width of the bandpass filter relative to the standard deviation of the PDF, in frequency range. In the original publication bps = 2 (i.e.

2 sigmas

, see eq. 3). The present implementation allow to alter this parameter. Higher values will result in broader (i.e. less selective) filter.

Value

a bandpass filter wave of the same type as wave

Note

todo ref (Dietrich et al., 2004)


BioAcoustica/orthophonia documentation built on May 5, 2019, 3:46 p.m.