interpolate: Interpolate

Description Usage Arguments Details Value

View source: R/utilities_pitch_postprocessing.R

Description

Internal soundgen function.

Usage

1
2
interpolate(pitchCands, pitchCert, pitchCenterGravity, interpolWin = 3,
  interpolTol = 0.3, interpolCert = 0.3)

Arguments

pitchCands

a matrix of multiple pitch candidates per fft frame. Each column is one fft frame, each row is one candidate.

pitchCert

a matrix of the same dimensionality as pitchCands specifying our certainty in pitch candidates

pitchCenterGravity

numeric vector giving the mean of all pitch candidates per fft frame weighted by our certainty in each of these candidates

interpolWin

when interpolating pitch candidates, the median is calculated over plus-minus interpolWin

interpolTol

when interpolating pitch candidates, the criterion for needing to interpolate is the absence of pitch candidates with values within 1 plus-minus interpolTol of the median of pitch center of gravity over the interpolation window. For ex., if interpolTol is .05, we look for values from 0.95 to 1.05 time the median value over interpolation window.

interpolCert

when interpolating pitch candidates, all generated pitch candidates are assigned a certainty equal to interpolCert

Details

Interpolation: if a frame has no pitch candidate at all (NA) or no candidate between the most likely candidates for the adjacent frames, add such a candidate with some (low) certainty.

Value

Returns a modified pitchCands matrix.


soundgen documentation built on Oct. 4, 2018, 9:04 a.m.