{"_id":"@audio/pitch-amdf","_rev":"2-5f43f56b7774ed0f684363d597fd6eb5","name":"@audio/pitch-amdf","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@audio/pitch-amdf","version":"1.0.0","keywords":["audio","dsp","pitch","pitch-detection","f0","amdf"],"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","_id":"@audio/pitch-amdf@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-amdf","bugs":{"url":"https://github.com/audiojs/pitch/issues"},"dist":{"shasum":"1d31e55423b170f2d183548864846a4cbd4ac9e6","tarball":"https://registry.npmjs.org/@audio/pitch-amdf/-/pitch-amdf-1.0.0.tgz","fileCount":2,"integrity":"sha512-k4j8SsSrBpGlYGpf8ldaL//DGiL9nTBKHe25w2jldJvM1OHpdAfoMaKsnZdpE9/7ZPX54Dd1qdEFAMbk6SkNpg==","signatures":[{"sig":"MEUCIDIZ4bZAj+E2w7ZLCcxVwFRVhaH0wdWRahMcWYVtfiZVAiEAufFBvK+KuQ5QacgisfwMO0GMx8F1wrUGbxDOaqMz0KY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2553},"main":"amdf.js","type":"module","engines":{"node":">=18"},"exports":{".":"./amdf.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-amdf"},"_npmVersion":"11.12.1","description":"AMDF (Average Magnitude Difference Function) pitch detection","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/pitch-amdf_1.0.0_1783539926442_0.4443190645753239","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@audio/pitch-amdf","version":"1.0.1","description":"AMDF (Average Magnitude Difference Function) pitch detection","type":"module","sideEffects":false,"main":"amdf.js","exports":{".":"./amdf.js","./package.json":"./package.json"},"keywords":["audio","dsp","pitch","pitch-detection","f0","amdf"],"license":"MIT","author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/audiojs/pitch.git","directory":"packages/pitch-amdf"},"homepage":"https://github.com/audiojs/pitch/tree/main/packages/pitch-amdf","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-amdf@1.0.1","_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-GMHOQTF0O02CGY7uhK3Fuh/45W2Pklbjm34i2GmEXLpAaK8BrixtOuEAExpkLvv35WyUptwjMAsqfLq4o9ZcDQ==","shasum":"d1c5e4606b510fd2180e2383bb35969a6458886d","tarball":"https://registry.npmjs.org/@audio/pitch-amdf/-/pitch-amdf-1.0.1.tgz","fileCount":4,"unpackedSize":4745,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAMg4NjAmtRjNFs+FpL9KvivS1FSklhB16Az6jkEGO8EAiBc7lvgmzJMFOCvk5mhtX9ubYRSH/URv5k4/yH7zmDa0g=="}]},"_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-amdf_1.0.1_1783731705640_0.6689496234348231"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-08T19:45:26.206Z","modified":"2026-07-11T01:01:46.014Z","1.0.0":"2026-07-08T19:45:26.580Z","1.0.1":"2026-07-11T01:01:45.788Z"},"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-amdf","keywords":["audio","dsp","pitch","pitch-detection","f0","amdf"],"repository":{"type":"git","url":"git+https://github.com/audiojs/pitch.git","directory":"packages/pitch-amdf"},"description":"AMDF (Average Magnitude Difference Function) pitch detection","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"readme":"# @audio/pitch-amdf [![npm](https://img.shields.io/npm/v/@audio/pitch-amdf)](https://www.npmjs.com/package/@audio/pitch-amdf) [![MIT](https://img.shields.io/badge/MIT-%E0%A5%90-white)](https://github.com/krishnized/license)\n\nAMDF (Average Magnitude Difference Function) pitch detection\n\n```\nnpm install @audio/pitch-amdf\n```\n\n```js\nimport amdf from '@audio/pitch-amdf'\n```\n\n**Ross et al., 1974.** Average Magnitude Difference Function — the classical predecessor to YIN. Measures average absolute difference between a signal and its delayed copy; minima indicate periodicity.\n\n```js\nlet result = amdf(samples, { fs: 44100 })\n```\n\n| Param | Default | |\n|---|---|---|\n| `fs` | `44100` | Sample rate (Hz) |\n| `minFreq` | `50` | Minimum detectable frequency (Hz) |\n| `maxFreq` | `2000` | Maximum detectable frequency (Hz) |\n| `threshold` | `0.3` | Normalized AMDF dip threshold |\n\n**Use when:** Low-complexity environments, embedded systems. Simpler and cheaper than YIN (no squaring, no cumulative normalization).<br>\n**Not for:** Noisy signals — lacks YIN's cumulative normalization that suppresses octave errors.<br>\n**Ref:** Ross et al., [\"Average magnitude difference function pitch extractor\"](https://doi.org/10.1109/TASSP.1974.1162598), IEEE TASSP 1974.<br>\n**Complexity:** $O(N^2/4)$.\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"}