dot-bandpass: Bandpass filter per sound

.bandpassR Documentation

Bandpass filter per sound

Description

Internal soundgen function

Usage

.bandpass(
  audio,
  lwr = NULL,
  upr = NULL,
  action = c("pass", "stop")[1],
  dB = Inf,
  bw = 0,
  na.rm = TRUE,
  normalize = FALSE,
  plot = FALSE,
  width = 900,
  height = 500,
  units = "px",
  res = NA,
  ...
)

Arguments

audio

a list returned by readAudio

lwr, upr

cutoff frequencies, Hz. Specifying just lwr gives a high-pass filter, just upr low-pass filter with action = 'pass' (or vice versa with action = 'stop'). Specifying both lwr and upr a bandpass/bandstop filter, depending on 'action'

action

"pass" = preserve the selected frequency range (bandpass), "stop" = remove the selected frequency range (bandstop)

dB

a positive number giving the strength of effect in dB (defaults to Inf - complete removal of selected frequencies)

bw

bandwidth of the filter cutoffs, Hz. Defaults to 0 (abrupt, step function), a positive number corresponds to the standard deviation of a Gaussian curve, and two numbers set different bandwidths for the lower and upper cutoff points

na.rm

if TRUE, NAs are interpolated, otherwise they are preserved in the output

normalize

if TRUE, resets the output to the original scale (otherwise filtering often reduces the amplitude)

plot

should a spectrogram be plotted? TRUE / FALSE

width, height, units, res

graphical parameters for saving plots passed to png

...

other graphical parameters passed to plot() as well as to meanspec


soundgen documentation built on Sept. 12, 2024, 6:29 a.m.