Learn R Programming

rPraat (version 1.3.2-1)

pt.legendreSynth: pt.legendreSynth

Description

Synthetize the contour from vector of Legendre polynomials c in npoints equidistant points

Usage

pt.legendreSynth(c, npoints = 1000)

Arguments

c

Vector of Legendre polynomials coefficients

npoints

Number of points of PitchTier interpolation

Value

Vector of values of synthetized contour

See Also

pt.legendre, pt.legendreDemo, pt.read, pt.plot, pt.Hz2ST, pt.interpolate

Examples

Run this code
# NOT RUN {
pt <- pt.sample()
pt <- pt.Hz2ST(pt)
pt <- pt.cut(pt, tStart = 3)  # cut PitchTier from t = 3 sec and preserve time
c <- pt.legendre(pt)
print(c)
leg <- pt.legendreSynth(c)
ptLeg <- pt
ptLeg$t <- seq(ptLeg$tmin, ptLeg$tmax, length.out = length(leg))
ptLeg$f <- leg
# }
# NOT RUN {
plot(pt$t, pt$f, xlab = "Time (sec)", ylab = "F0 (ST re 100 Hz)")
lines(ptLeg$t, ptLeg$f, col = "blue")
# }

Run the code above in your browser using DataLab