View source: R/smoothContours.R
getDiscreteContour | R Documentation |
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,
...
)
len |
the number of syllables (equivalently, the length of generated contour) |
anchors |
a numeric vector of values or a list/dataframe with one column
(value) or two columns (time and value). |
interpol |
method of interpolation between anchors: "approx" = linear
with |
valueFloor , valueCeiling |
lowser/upper bounds for the contour |
ylim |
ylim for plotting |
plot |
(boolean) produce a plot? |
... |
other plotting options passed to |
A discrete version of getSmoothContour
with modified plotting.
Intended for plotting variation in parameters across syllables.
Numeric vector.
# 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)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.