Internal soundgen function.
getPitchHps(
frame,
freqs,
bin,
hpsThres,
hpsNum,
hpsNorm,
hpsPenalty,
pitchFloor,
pitchCeiling
)
Returns either NULL or a dataframe of pitch candidates.
the abs spectrum of a frame, as returned by
fft
frequency per bin of spectrogram
spectrogram bin width, Hz
voicing threshold (unitless, ~0 to 1)
the number of times the spectrum is downsampled
the amount of inflation of hps pitch certainty (0 = none)
the amount of penalizing hps candidates in low frequencies (0 = none)
absolute bounds for pitch candidates (Hz)
Estimates pitch per frame using the harmonic product spectrum. Algorithm: downsample the spectrum repeatedly padding with 0 to the original length, then multiply the resulting scaled spectra. This has the effect of emphasizing f0, which should hopefully become the highest spectral peak. See https://cnx.org/contents/i5AAkZCP@2/Pitch-Detection-Algorithms