
Internal soundgen function.
getDiscreteContour(len, anchors = data.frame(time = c(0, 1), value = c(1, 1)),
interpol = c("spline", "loess")[2], valueFloor = NULL,
valueCeiling = NULL, ylim = NULL, plot = FALSE, ...)
the number of syllables (equivalently, the length of generated contour)
a numeric vector of values or a list/dataframe with one column
(value) or two columns (time and value). 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.
the method of smoothing envelopes based on provided anchors: 'approx' = linear interpolation, 'spline' = cubic spline, 'loess' (default) = polynomial local smoothing function. NB: this does not affect noiseAnchors, glottalAnchors, and the smoothing of formants
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, interpol = '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