getSmoothSpectrum | R Documentation |
Internal soundgen function.
getSmoothSpectrum(
sound,
samplingRate = NULL,
spectrum = NULL,
len,
loessSpan,
windowLength = 100,
overlap = 0,
plot = FALSE,
xlab = "Frequency, kHz",
ylab = "dB",
type = "l",
...
)
sound |
the audio (numeric, any scale) |
samplingRate |
sampling rate of |
spectrum |
pre-extracted spectrum in dB with columns "freq" and "ampl" |
len |
the desired resolution of the output |
loessSpan |
passed to loess to control the amount of smoothing (.01 = minimal smoothing, 1 = strong smoothing) |
windowLength |
length of FFT window, ms |
overlap |
overlap between successive FFT frames, % |
plot |
should a spectrogram be plotted? TRUE / FALSE |
... |
other graphical parameters |
s = soundgen(sylLen = 100, pitch = 500, addSilence = FALSE)
soundgen:::getSmoothSpectrum(s, 16000, len = 500, loessSpan = .01, plot = TRUE)
soundgen:::getSmoothSpectrum(s, 16000, len = 500, loessSpan = .1, plot = TRUE)
soundgen:::getSmoothSpectrum(s, 16000, len = 500, loessSpan = .5, plot = TRUE)
soundgen:::getSmoothSpectrum(s, 16000, len = 500, loessSpan = 1, plot = TRUE)
sp = seewave::meanspec(s, f = 16000, dB = 'max0')
colnames(sp) = c('freq', 'ampl')
soundgen:::getSmoothSpectrum(spectrum = sp, len = 500, loessSpan = .1, plot = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.