pt.interpolate {rPraat} | R Documentation |
pt.interpolate
Description
Interpolates PitchTier contour in given time instances.
Usage
pt.interpolate(pt, t)
Arguments
pt |
PitchTier object |
t |
vector of time instances of interest |
Details
a) If t < min(pt$t)
(or t > max(pt$t)
), returns the first (or the last) value of pt$f
.
b) If t
is existing point in pt$t
, returns the respective pt$f
.
c) If t
is between two existing points, returns linear interpolation of these two points.
Value
PitchTier object
See Also
pt.getPointIndexNearestTime
, pt.read
, pt.write
, pt.plot
, pt.Hz2ST
, pt.cut
, pt.cut0
, pt.legendre
Examples
pt <- pt.sample()
pt <- pt.Hz2ST(pt, ref = 100) # conversion of Hz to Semitones, reference 0 ST = 100 Hz.
pt2 <- pt.interpolate(pt, seq(pt$t[1], pt$t[length(pt$t)], by = 0.001))
## Not run:
pt.plot(pt)
pt.plot(pt2)
## End(Not run)
[Package rPraat version 1.3.2-1 Index]