
Last chance! 50% off unlimited learning
Sale ends in
Internal soundgen function.
modulationSpectrumFragment(
sound,
samplingRate,
windowLength,
windowLength_points,
step,
step_points,
wn = "hanning",
zp = 0,
logSpec = FALSE,
power = 1
)
numeric vector
sampling rate of x
(only needed if x
is a
numeric vector)
length of FFT window, ms
you can override overlap
by specifying FFT step, ms (NB:
because digital audio is sampled at discrete time intervals of
1/samplingRate, the actual step and thus the time stamps of STFT frames
may be slightly different, eg 24.98866 instead of 25.0 ms)
window type accepted by ftwindow
, currently
gaussian, hanning, hamming, bartlett, rectangular, blackman, flattop
window length after zero padding, points
if TRUE, the spectrogram is log-transformed prior to taking 2D FFT
raise modulation spectrum to this power (eg power = 2 for ^2, or "power spectrum")
# NOT RUN {
s = soundgen(amFreq = 25, amDep = 100)
ms = soundgen:::modulationSpectrumFragment(s, 16000,
windowLength = 50, windowLength_points = .05 * 16000,
step = 5, step_points = .005 * 16000)
image(as.numeric(colnames(ms$ms_half)), as.numeric(rownames(ms$ms_half)),
t(log(ms$ms_half)))
# }
Run the code above in your browser using DataLab