Skip to content

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.

number[]

Magnitude spectrum

number = 5

Number of harmonics to multiply

number[]

Harmonic product spectrum