pathfinder {soundgen} | R Documentation |
Internal soundgen function.
pathfinder(
pitchCands,
pitchCert,
pitchSource,
step,
manual = NULL,
certWeight = 0.5,
pathfinding = c("none", "fast", "slow")[2],
annealPars = list(maxit = 5000, temp = 1000),
interpolWin_bin = 3,
interpolTol = 0.05,
interpolCert = 0.3,
manualCert = 1,
snakeStep = 0,
snakePlot = FALSE
)
pitchCands |
a matrix of multiple pitch candidates per fft frame. Each column is one fft frame, each row is one candidate (the last row is always "manual") |
pitchCert |
a matrix of the same dimensionality as pitchCands specifying our certainty in pitch candidates |
step |
you can override |
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 |
annealPars |
a list of control parameters for postprocessing of
pitch contour with SANN algorithm of |
interpolWin_bin |
when interpolating pitch candidates, the median is
calculated over |
interpolTol |
when interpolating pitch candidates, the criterion
for needing to interpolate is the absence of pitch candidates with values
within |
interpolCert |
when interpolating pitch candidates, all generated pitch
candidates are assigned a certainty equal to |
manualCert |
the certainty in manually added pitch candidates |
snakeStep |
optimized path through pitch candidates is further
processed to minimize the elastic force acting on pitch contour. To
disable, set |
snakePlot |
if TRUE, plots the snake |
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).
Returns a numeric vector of pitch values representing the best found path through pitch candidates.