harmonic_product_spectrum
harmonic_product_spectrum(
spectrum,n_harmonics?):number[]
Defined in: packages/pleco-xa/src/scripts/xa-harmonic.js:537
Compute harmonic product spectrum (HPS) for pitch detection
Helper function that can be used with salience for robust pitch detection.
Parameters
Section titled “Parameters”spectrum
Section titled “spectrum”number[]
Magnitude spectrum
n_harmonics?
Section titled “n_harmonics?”number = 5
Number of harmonics to multiply
Returns
Section titled “Returns”number[]
Harmonic product spectrum