getAM_env | R Documentation |
Internal soundgen function
getAM_env(
audio,
amRange = c(20, 100),
overlap = 80,
parab = TRUE,
plot = FALSE
)
Measures AM
s = soundgen(sylLen = 1500, pitch = c(300, 550, 320, 220),
amFreq = c(50, 120, 100), amDep = c(10, 60, 30))
# spectrogram(s)
# playme(s)
am = soundgen:::getAM_env(audio = soundgen:::readAudio(s, samplingRate = 16000),
amRange = c(20, 200), overlap = 80, plot = TRUE)
plot(am$time, am$freq, cex = am$dep * 2)
# compare to getAM from modulation spectrum:
ms = modulationSpectrum(s, 16000, plot = FALSE)
plot(x = seq(1, 1500, length.out = length(ms$amMsFreq)), y = ms$amMsFreq,
cex = 10^(ms$amMsPurity/20) * 10, xlab = 'Time, ms', ylab = 'AM frequency, Hz')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.