ds_envelope() adds the amplitude envelope of the sound (absolute amplitude smoothed with a 5 ms moving window) to a dynaspec() object. Envelopes are shown by ds_static() (alone, or above or below the spectrogram, along with oscillograms) and ds_scrolling() (below the spectrogram, instead of the oscillogram) styles.
Arguments
- position
Character string: "below" or "above" the spectrogram (only for
ds_static()). Default is "below".- col
Color of the envelope. Default is
NULL: 'col.wave' ofds_theme(), or black (as oscillograms).- height
Numeric vector of length 1 with the height of the envelope panel relative to that of the spectrogram. Default is
NULL(half the height of the spectrogram).
Value
A layer to be added to a dynaspec() object with +.
Examples
data(scythebill)
x <- dynaspec(scythebill, flim = c(1.5, 5.5)) +
ds_spectrogram(wl = 200, collevels = seq(-50, 0, 1)) +
ds_envelope(position = "above")