
Last chance! 50% off unlimited learning
Sale ends in
Internal soundgen function.
getDiscreteContour(len, anchors = data.frame(time = c(0, 1), value = c(1, 1)),
method = c("spline", "loess")[2], valueFloor = NULL,
valueCeiling = NULL, ylim = NULL, plot = FALSE, ...)
the number of syllables (equivalently, the length of generated contour)
a dataframe of anchors with specified time and amplitude.
achors$time
can be in ms (with len=NULL) or in arbitrary units, eg 0
to 1 (with duration determined by len, which must then be provided in ms).
So anchors$time is assumed to be in ms if len=NULL and relative if len is
specified. anchors$value
can be on any scale.
smoothing method: 'spline' or 'loess' (default). Consider 'spline' if you have a lot of anchors and not much patience, since it is much faster than 'loess', but it may produce weird results when there are only a few anchors
lower/upper bounds for the contour
lower/upper bounds for the contour
ylim for plotting
(boolean) produce a plot?
other plotting options passed to plot()
Numeric vector.
A discrete version of getSmoothContour
with modified plotting.
Intended for plotting variation in parameters across syllables.
# NOT RUN {
# for a bout consisting of 10 syllables
soundgen:::getDiscreteContour(len = 10, method = 'spline', plot = TRUE,
ylab = 'Semitones', anchors = data.frame(time = c(0, .2, .6, 1),
value = c(0, -3, 1, 0)))
# }
Run the code above in your browser using DataLab