soundgen (version 1.5.0)

drawContour: Draw contour

Description

Internal soundgen function

Usage

drawContour(len, anchors, interpol, valueFloor, valueCeiling,
  duration_ms = 500)

Arguments

len

the required length of the output contour. If NULL, it will be calculated based on the maximum time value (in ms) and samplingRate

anchors

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.

interpol

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

valueFloor

lower/upper bounds for the contour

valueCeiling

lower/upper bounds for the contour

duration_ms

contour duration, ms

Details

The core part of getSmoothContour() that actually performs the interpolation between anchors.