Internal soundgen function
drawContour(
len,
anchors,
interpol,
valueFloor,
valueCeiling,
duration_ms = 500,
loessSpan = NULL
)
the required length of the output contour. If NULL, it will be
calculated based on the maximum time value (in ms) and samplingRate
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 contours for "noise", "glottal", and the smoothing of formants
lowser/upper bounds for the contour
lowser/upper bounds for the contour
contour duration, ms
parameter that controlled the amount of smoothing when
interpolating pitch etc between anchors; passed on to
loess
, so only has an effect if interpol = 'loess'
The core part of getSmoothContour() that actually performs the interpolation between anchors.