soundgen (version 1.5.0)

upsample: Upsample pitch contour

Description

Internal soundgen function.

Usage

upsample(pitch_per_gc, samplingRate = 16000)

Arguments

pitch_per_gc

a vector of fundamental frequencies per glottal cycle

samplingRate

target sampling rate after upsampling, in Hz

Value

Returns a list of two vectors: pitch_upsampled (the upsampled version of the input) and gc_upsampled (new indices of glottal cycles on an upsampled scale)

Details

Upsamples a pitch contour to samplingRate through linear interpolation between successive glottal cycles.

Examples

Run this code
# NOT RUN {
soundgen:::upsample(pitch_per_gc = c(100, 150, 130), samplingRate = 16000)
# }

Run the code above in your browser using DataCamp Workspace