Internal soundgen function.
.filterSoundByMS(
audio,
logSpec = FALSE,
windowLength = 25,
step = NULL,
overlap = 80,
wn = "hamming",
zp = 0,
amCond = NULL,
fmCond = NULL,
jointCond = NULL,
action = c("remove", "preserve")[1],
initialPhase = c("zero", "random", "spsi")[3],
nIter = 50,
play = FALSE,
plot = TRUE,
savePlots = NULL,
width = 900,
height = 500,
units = "px",
res = NA
)
a list returned by readAudio
if TRUE, the spectrogram is log-transformed prior to taking 2D FFT
parameters for extracting a spectrogram if
specType = 'STFT'
. Window length and step are specified in ms (see
spectrogram
). If specType = 'audSpec'
, these settings
have no effect
overlap between successive FFT frames, %
character strings with valid conditions on amplitude and frequency modulation (see examples)
character string with a valid joint condition amplitude and frequency modulation
should the defined AM-FM region be removed ('remove') or preserved, while everything else is removed ('preserve')?
initial phase estimate: "zero" = set all phases to zero; "random" = Gaussian noise; "spsi" (default) = single-pass spectrogram inversion (Beauregard et al., 2015)
the number of iterations of the GL algorithm (Griffin & Lim, 1984), 0 = don't run
if TRUE, plays back the reconstructed audio
if TRUE, produces a triple plot: original MS, filtered MS, and the MS of the output sound
if a valid path is specified, a plot is saved in this folder (defaults to NA)
parameters passed to
png
if the plot is saved