Learn R Programming

soundgen (version 2.7.0)

upsampleGC: Upsample glottal cycles

Description

Internal soundgen function.

Usage

upsampleGC(pitch_per_gc, samplingRate = 16000)

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)

Arguments

pitch_per_gc

a vector of fundamental frequencies per glottal cycle

samplingRate

target sampling rate after upsampling, in Hz

Details

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

Examples

Run this code
soundgen:::upsampleGC(pitch_per_gc = c(100, 150, 130), samplingRate = 16000)

Run the code above in your browser using DataLab