Learn R Programming

soundgen (version 1.7.0)

intplPitch: Interpolate pitch contour

Description

Internal soundgen function

Usage

intplPitch(pitch, idx_unv = NULL)

Arguments

pitch

numeric vector of pitch values (NA = unvoiced)

idx_unv

which(is.na(pitch))

Value

Returns the same numeric vector with NAs filled in by interpolation.

Details

Takes in a pitch contour and fills up the unvoiced gaps (NAs) by linear interpolation in the middle and constant interpolation at the ends. Called by pitchSmoothPraat().

Examples

Run this code
# NOT RUN {
soundgen:::intplPitch(c(NA, 405, 441, 460, NA, NA, NA, 480, 490, NA, NA))
# }

Run the code above in your browser using DataLab