powered by
Internal soundgen function
getEnv(sound, windowLength_points, method = c("rms", "peak", "mean")[1])
input vector oscillating about zero
the length of smoothing window, points. If specified, overrides both windowLength and samplingRate
windowLength
samplingRate
'peak' for peak amplitude per window, 'rms' for root mean square amplitude, 'mean' for mean (for DC offset removal)
Returns the smoothed amplitude envelope of a waveform on the original scale.
# NOT RUN { a = rnorm(500) * seq(1, 0, length.out = 500) plot(soundgen:::getEnv(a, 20)) # }
Run the code above in your browser using DataLab