dot-flatEnv: Flat envelope per sound

.flatEnvR Documentation

Flat envelope per sound

Description

Internal soundgen function

Usage

.flatEnv(
  audio,
  compression = 1,
  method = c("hil", "rms", "peak")[1],
  windowLength = 50,
  windowLength_points = NULL,
  killDC = FALSE,
  dynamicRange = 40,
  plot = FALSE,
  col = "blue",
  width = 900,
  height = 500,
  units = "px",
  res = NA,
  ...
)

Arguments

audio

a list returned by readAudio

compression

the amount of compression to apply: 0 = none, 1 = maximum

method

hil = Hilbert envelope, rms = root mean square amplitude, peak = peak amplitude per window

windowLength

the length of smoothing window, ms

windowLength_points

the length of smoothing window, points. If specified, overrides windowLength

killDC

if TRUE, dynamically removes DC offset or similar deviations of average waveform from zero (see examples)

dynamicRange

parts of sound quieter than -dynamicRange dB will not be amplified

plot

if TRUE, plots the original sound, the smoothed envelope, and the compressed sound

col

the color of amplitude contours

width, height, units, res

graphical parameters for saving plots passed to png

...

other graphical parameters passed to points() that control the appearance of amplitude contours, eg lwd, lty, etc.


soundgen documentation built on Aug. 14, 2022, 5:05 p.m.