{"_id":"@audio/pitch-hps","_rev":"2-388ad84cb6b75bd85d37031e2fde6bfa","name":"@audio/pitch-hps","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@audio/pitch-hps","version":"1.0.0","keywords":["audio","dsp","pitch","pitch-detection","f0","hps"],"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","_id":"@audio/pitch-hps@1.0.0","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"homepage":"https://github.com/audiojs/pitch/tree/main/packages/pitch-hps","bugs":{"url":"https://github.com/audiojs/pitch/issues"},"dist":{"shasum":"fca453382067f32bbc8b1eff52e109d7aab53e14","tarball":"https://registry.npmjs.org/@audio/pitch-hps/-/pitch-hps-1.0.0.tgz","fileCount":2,"integrity":"sha512-ZUX8sUy2B4RT9zUsaR8xl0TU9O0tOgXpdtdsFukuo2w1NrkdZKKpYUuHauBprKMpejn7VNdVZFUZV1M2Y0NE1Q==","signatures":[{"sig":"MEQCIHkDfmNOtQ2vIkKqeASTfXZOXDdQeOiJI3nVAPMCRWunAiAwUEBRyMmnB+ZPgIJ9oYnTl6Kh273NIgaxIPDWLeHlOw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4281},"main":"hps.js","type":"module","engines":{"node":">=18"},"exports":{".":"./hps.js","./package.json":"./package.json"},"gitHead":"984da555a04fddf53e71299736a2dc76311b2a49","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/audiojs/pitch.git","type":"git","directory":"packages/pitch-hps"},"_npmVersion":"11.12.1","description":"Harmonic Product Spectrum (Schroeder, 1968)","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","dependencies":{"fourier-transform":"^2.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/pitch-hps_1.0.0_1783539933141_0.42093154595774895","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@audio/pitch-hps","version":"1.0.1","description":"Harmonic Product Spectrum (Schroeder, 1968)","type":"module","sideEffects":false,"main":"hps.js","exports":{".":"./hps.js","./package.json":"./package.json"},"dependencies":{"fourier-transform":"^2.2.0"},"keywords":["audio","dsp","pitch","pitch-detection","f0","hps"],"license":"MIT","author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/audiojs/pitch.git","directory":"packages/pitch-hps"},"homepage":"https://github.com/audiojs/pitch/tree/main/packages/pitch-hps","bugs":{"url":"https://github.com/audiojs/pitch/issues"},"engines":{"node":">=18"},"publishConfig":{"access":"public"},"types":"index.d.ts","funding":"https://github.com/sponsors/audiojs","gitHead":"c388499cb8107c4fdcc0e314410327655222b5b1","_id":"@audio/pitch-hps@1.0.1","_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-yYruCm0FfHFgKiqqKAVv0aPCiQvU1XPxGDJuSFx10jvcSs+rujIEr5Tg5+Hadmp0F1YnU2GyXONUvAXBCuOz2g==","shasum":"9512b1a68bf647741f479b775c121a4377e156cf","tarball":"https://registry.npmjs.org/@audio/pitch-hps/-/pitch-hps-1.0.1.tgz","fileCount":4,"unpackedSize":6654,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCx11nEHjAsQhqt/Hk4l92NLRToTDzzT5wyvmmjox/pzQIhAIPZ+A1TirBOw1zzIxjLkbadh1ako9kX/DrDHZAY+4br"}]},"_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"directories":{},"maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pitch-hps_1.0.1_1783731712344_0.5225732611324589"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-08T19:45:33.034Z","modified":"2026-07-11T01:01:52.736Z","1.0.0":"2026-07-08T19:45:33.279Z","1.0.1":"2026-07-11T01:01:52.595Z"},"bugs":{"url":"https://github.com/audiojs/pitch/issues"},"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","homepage":"https://github.com/audiojs/pitch/tree/main/packages/pitch-hps","keywords":["audio","dsp","pitch","pitch-detection","f0","hps"],"repository":{"type":"git","url":"git+https://github.com/audiojs/pitch.git","directory":"packages/pitch-hps"},"description":"Harmonic Product Spectrum (Schroeder, 1968)","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"readme":"# @audio/pitch-hps [![npm](https://img.shields.io/npm/v/@audio/pitch-hps)](https://www.npmjs.com/package/@audio/pitch-hps) [![MIT](https://img.shields.io/badge/MIT-%E0%A5%90-white)](https://github.com/krishnized/license)\n\nHarmonic Product Spectrum (Schroeder, 1968)\n\n```\nnpm install @audio/pitch-hps\n```\n\n```js\nimport hps from '@audio/pitch-hps'\n```\n\n**Schroeder, 1968.** Harmonic Product Spectrum — multiplies the spectrum by its downsampled copies so that harmonic peaks align at the fundamental. Robust to the missing-fundamental problem.\n\n```js\nlet result = hps(samples, { fs: 44100 })\n```\n\n| Param | Default | |\n|---|---|---|\n| `fs` | `44100` | Sample rate (Hz) |\n| `harmonics` | `5` | Number of harmonic products |\n| `minFreq` | `50` | Minimum detectable frequency (Hz) |\n| `maxFreq` | `4000` | Maximum detectable frequency (Hz) |\n| `cents` | `10` | Candidate spacing in cents |\n| `threshold` | `0.1` | Minimum clarity to accept |\n\n**Use when:** Harmonic-rich signals (guitar, piano, brass). Naturally handles missing fundamentals.<br>\n**Not for:** Pure sinusoids (only one harmonic), very noisy signals.<br>\n**Ref:** Schroeder, [\"Period histogram and product spectrum\"](https://doi.org/10.1121/1.1910902), JASA 1968.<br>\n**Requires:** Power-of-2 window length — throws otherwise.\n\n---\n\nPart of [@audio/pitch](https://github.com/audiojs/pitch) — the pitch family umbrella. This README is generated from the umbrella docs.\n\nMIT © [audiojs](https://github.com/audiojs)\n","readmeFilename":"README.md"}