View source: R/pitch_postprocessing.R
pathfinding_fast | R Documentation |
Internal soundgen function.
pathfinding_fast(
pitchCands,
pitchCert,
pitchSource,
step,
pitchCenterGravity,
certWeight,
seed_ms = 250,
plot = 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 |
pitchCenterGravity |
numeric vector giving the mean of all pitch candidates per fft frame weighted by our certainty in each of these 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 |
seed_ms |
start a new seed roughly every ... ms |
plot |
if TRUE, plots pitch candidates and explored paths |
Uses a modified Viterbi algorithm to find a reasonable path though pitch candidates. The idea is to start at several random "seeds", each time exploring as many paths as there are candidates per seed. The path with the lowest global cost is returned. Transition costs are a weighted mean of two penalties: based on pitch certainties (corrected for distance from pitch center of gravity) and on pitch jumps.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.