pathfinder: Pathfinder

Description Usage Arguments Details Value

View source: R/utilities_pitch_postprocessing.R

Description

Internal soundgen function.

Usage

1
2
3
4
pathfinder(pitchCands, pitchCert, certWeight = 0.5, pathfinding = c("none",
  "fast", "slow")[2], annealPars = list(maxit = 5000, temp = 1000),
  interpolWin = 3, interpolTol = 0.05, interpolCert = 0.3,
  snakeStep = 0.05, snakePlot = FALSE)

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

certWeight

(0 to 1) in pitch postprocessing, specifies how much we prioritize the certainty of pitch candidates vs. pitch jumps / the internal tension of the resulting pitch curve

pathfinding

method of finding the optimal path through pitch candidates: 'none' = best candidate per frame, 'fast' = simple heuristic, 'slow' = annealing. See soundgen:::pathfinder

annealPars

a list of control parameters for postprocessing of pitch contour with SANN algorithm of optim. This is only relevant if pathfinding = 'slow'

interpolWin

when interpolating pitch candidates, the median is calculated over <c2><b1> interpolWin

interpolTol

when interpolating pitch candidates, the criterion for needing to interpolate is the absense of pitch candidates with values within 1 <c2><b1> 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

snakeStep

optimized path through pitch candidates is further processed to minimize the elastic force acting on pitch contour. To disable, set snakeStep to NULL

snakePlot

if TRUE, plots the snake

Details

Internal helper function for postprocessing pitch contour. Starts with a reasonable guess and computes the more-or-less optimal pitch contour (not quite the very optimal - too computationally expensive).

Value

Returns a numeric vector of pitch values representing the best found path through pitch candidates.


tatters/soundgen_beta documentation built on May 14, 2019, 9 a.m.