Internal soundgen function
.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,
...
)
a list returned by readAudio
the amount of compression to apply: 0 = none, 1 = maximum
hil = Hilbert envelope, rms = root mean square amplitude, peak = peak amplitude per window
the length of smoothing window, ms
the length of smoothing window, points. If
specified, overrides windowLength
if TRUE, dynamically removes DC offset or similar deviations of average waveform from zero (see examples)
parts of sound quieter than -dynamicRange
dB will
not be amplified
if TRUE, plots the original sound, the smoothed envelope, and the compressed sound
the color of amplitude contours
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.