{"_id":"@audio/pitch-swipe","_rev":"2-957983ef4f8af098c06014f89b847aeb","name":"@audio/pitch-swipe","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@audio/pitch-swipe","version":"1.0.0","keywords":["audio","dsp","pitch","pitch-detection","f0","swipe"],"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","_id":"@audio/pitch-swipe@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-swipe","bugs":{"url":"https://github.com/audiojs/pitch/issues"},"dist":{"shasum":"f6d03951cafffc7f30998309b5cc442f815a18fe","tarball":"https://registry.npmjs.org/@audio/pitch-swipe/-/pitch-swipe-1.0.0.tgz","fileCount":2,"integrity":"sha512-uBrxyd7SvvWg85SarMgXB6QqF0pF1RTwSv6V1cP7Xq0FvVUHmN1WP1hNZ306XXdSyliR7Mjkaj6Y53/nfA+YXA==","signatures":[{"sig":"MEUCIQDOazWJ8GQnEnklOqdvdQBhPfC4fxlly91MugPXZd1WfAIgG+ziRbSzsmngfzuxKBu0gDINkhr6hKJQfHW9svPvbh8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5437},"main":"swipe.js","type":"module","engines":{"node":">=18"},"exports":{".":"./swipe.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-swipe"},"_npmVersion":"11.12.1","description":"SWIPE′ — Sawtooth Waveform Inspired Pitch Estimator with prime harmonics","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","dependencies":{"fourier-transform":"^2.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/pitch-swipe_1.0.0_1783539940198_0.5468590154234645","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@audio/pitch-swipe","version":"1.0.1","description":"SWIPE′ — Sawtooth Waveform Inspired Pitch Estimator with prime harmonics","type":"module","sideEffects":false,"main":"swipe.js","exports":{".":"./swipe.js","./package.json":"./package.json"},"dependencies":{"fourier-transform":"^2.2.0"},"keywords":["audio","dsp","pitch","pitch-detection","f0","swipe"],"license":"MIT","author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/audiojs/pitch.git","directory":"packages/pitch-swipe"},"homepage":"https://github.com/audiojs/pitch/tree/main/packages/pitch-swipe","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-swipe@1.0.1","_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-AvqYhig/MJK105MMFHynu2us1ycLVlLs3MYo6r1yRU8QQWexHmKnZW3MMRNxdRF0QL94SW3X3YzuqaBBgrxQKw==","shasum":"acd47bde324b1303ea2bcb14b34c3947a4217029","tarball":"https://registry.npmjs.org/@audio/pitch-swipe/-/pitch-swipe-1.0.1.tgz","fileCount":4,"unpackedSize":8144,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCgt6fX70RO30TKSM2K2XHtXeOaROnhNIVtxro+nsL9FgIgSLUbu7y0sbRICsVJZ+3fgjzZyOVNl3x5OmXGezfauqA="}]},"_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-swipe_1.0.1_1783731719441_0.8979972645344114"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-08T19:45:40.097Z","modified":"2026-07-11T01:01:59.688Z","1.0.0":"2026-07-08T19:45:40.335Z","1.0.1":"2026-07-11T01:01:59.573Z"},"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-swipe","keywords":["audio","dsp","pitch","pitch-detection","f0","swipe"],"repository":{"type":"git","url":"git+https://github.com/audiojs/pitch.git","directory":"packages/pitch-swipe"},"description":"SWIPE′ — Sawtooth Waveform Inspired Pitch Estimator with prime harmonics","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"readme":"# @audio/pitch-swipe [![npm](https://img.shields.io/npm/v/@audio/pitch-swipe)](https://www.npmjs.com/package/@audio/pitch-swipe) [![MIT](https://img.shields.io/badge/MIT-%E0%A5%90-white)](https://github.com/krishnized/license)\n\nSWIPE′ — Sawtooth Waveform Inspired Pitch Estimator with prime harmonics\n\n```\nnpm install @audio/pitch-swipe\n```\n\n```js\nimport swipe from '@audio/pitch-swipe'\n```\n\n**Camacho & Harris, 2008.** SWIPE' (Sawtooth Waveform Inspired Pitch Estimator, prime harmonics). Measures spectral similarity between the window and a sawtooth template whose lobes sit at prime harmonics. More accurate than HPS on clean instrumental signals; robust against octave errors because only prime harmonics contribute.\n\nSimplified single-window form: uses one FFT instead of the multi-resolution loudness pyramid of the original paper — sufficient for stationary windows.\n\n```js\nlet result = swipe(samples, { fs: 44100 })\n```\n\n| Param | Default | |\n|---|---|---|\n| `fs` | `44100` | Sample rate (Hz) |\n| `minFreq` | `60` | Minimum detectable frequency (Hz) |\n| `maxFreq` | `4000` | Maximum detectable frequency (Hz) |\n| `cents` | `10` | Candidate spacing in cents |\n| `threshold` | `0.15` | Minimum clarity to accept |\n\n**Use when:** Clean instrumental signals, studio recordings, where sub-Hz accuracy matters.<br>\n**Not for:** Very noisy or reverberant signals (single-window form lacks multi-resolution robustness of the full SWIPE').<br>\n**Ref:** Camacho & Harris, [\"A sawtooth waveform inspired pitch estimator for speech and music\"](https://doi.org/10.1121/1.2951592), JASA 2008.<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"}