Internal soundgen function, see addAM
.
.addAM(
audio,
amDep = 25,
amFreq = 30,
amType = c("logistic", "sine")[1],
amShape = 0,
invalidArgAction = c("adjust", "abort", "ignore")[1],
plot = FALSE,
play = FALSE
)
a list returned by readAudio
amplitude modulation (AM) depth, %. 0: no change; 100: AM with amplitude range equal to the dynamic range of the sound (anchor format)
AM frequency, Hz (anchor format)
"sine" = sinusoidal, "logistic" = logistic (default)
ignore if amType = "sine", otherwise determines the shape of non-sinusoidal AM: 0 = ~sine, -1 = notches, +1 = clicks (anchor format)
what to do if an argument is invalid or outside the
range in permittedValues
: 'adjust' = reset to default value, 'abort'
= stop execution, 'ignore' = throw a warning and continue (may crash)
if TRUE, plots the amplitude modulation
if TRUE, plays the processed audio