{"_id":"@audio/shift-pvoc-lock","_rev":"3-b7a340986985bf7a30a4afc970ab7181","name":"@audio/shift-pvoc-lock","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@audio/shift-pvoc-lock","version":"1.0.0","keywords":["audio","pitch-shift","phase-vocoder","peak-locked","laroche-dolson","dsp"],"author":{"name":"audiojs"},"license":"MIT","_id":"@audio/shift-pvoc-lock@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/shift/tree/main/packages/shift-pvoc-lock#readme","bugs":{"url":"https://github.com/audiojs/shift/issues"},"dist":{"shasum":"28bae9e7ac040fe9fb49438f4828a398af2de648","tarball":"https://registry.npmjs.org/@audio/shift-pvoc-lock/-/shift-pvoc-lock-1.0.0.tgz","fileCount":2,"integrity":"sha512-Qii0viWuoKJ8l1Faf/u2MqaDFAz0T2rre52kGdHGguKHUDGuRaK4K6MMg2bfRYZief01UBYShqFRuuEC+999Fg==","signatures":[{"sig":"MEUCIF9GavEGXW9G+1PxVB0Xlsy+mXged1oU7W8uOXFOveTCAiEA+FYNEBrKQWK6yWwE/vC3KRQ8LG/ltmVV690DWsz5EH8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2463},"main":"index.js","type":"module","engines":{"node":">=18"},"exports":{".":"./index.js","./package.json":"./package.json"},"gitHead":"96f567467fac25424e0745397b88595052400a74","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/audiojs/shift.git","type":"git","directory":"packages/shift-pvoc-lock"},"_npmVersion":"11.12.1","description":"Peak-locked phase vocoder (Laroche-Dolson) pitch shift","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","dependencies":{"@audio/shift-core":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/shift-pvoc-lock_1.0.0_1783540127417_0.9081030519072268","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@audio/shift-pvoc-lock","version":"1.0.1","keywords":["audio","pitch-shift","phase-vocoder","peak-locked","laroche-dolson","dsp"],"author":{"name":"audiojs"},"license":"MIT","_id":"@audio/shift-pvoc-lock@1.0.1","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/shift/tree/main/packages/shift-pvoc-lock#readme","bugs":{"url":"https://github.com/audiojs/shift/issues"},"dist":{"shasum":"40322ebb24da02b19cea45a8087641f9c6d4d85b","tarball":"https://registry.npmjs.org/@audio/shift-pvoc-lock/-/shift-pvoc-lock-1.0.1.tgz","fileCount":3,"integrity":"sha512-d0dQTLXkENOzw2mKew+VssaU3z5MTSvHsQl3zaf9jj1Fm2ATSOoKCx78IqaELiFnsNnmPm2zZCJAG3S7QWtuDg==","signatures":[{"sig":"MEUCIBp7GE2T1apHELpD7HYoCcrGdY8GTU/NZbpzIWmuAHrDAiEAgtwJkX/u3JAzA/IQ192qvUl0GbWXrITy71FDiLw3tP4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8977},"main":"index.js","type":"module","engines":{"node":">=18"},"exports":{".":"./index.js","./package.json":"./package.json"},"gitHead":"d2c732642b33df6811872e2d21713bd6a9ab6b75","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/audiojs/shift.git","type":"git","directory":"packages/shift-pvoc-lock"},"_npmVersion":"11.12.1","description":"Peak-locked phase vocoder (Laroche-Dolson) pitch shift","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","dependencies":{"fourier-transform":"^2.3.0","@audio/spectral-pvoc":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/shift-pvoc-lock_1.0.1_1783624383091_0.3379557145618086","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@audio/shift-pvoc-lock","version":"1.0.2","description":"Peak-locked phase vocoder (Laroche-Dolson) pitch shift","type":"module","sideEffects":false,"main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"dependencies":{"@audio/spectral-pvoc":"^1.0.0","fourier-transform":"^2.3.0"},"publishConfig":{"access":"public"},"license":"MIT","author":{"name":"audiojs"},"homepage":"https://github.com/audiojs/shift/tree/main/packages/shift-pvoc-lock#readme","repository":{"type":"git","url":"git+https://github.com/audiojs/shift.git","directory":"packages/shift-pvoc-lock"},"keywords":["audio","pitch-shift","phase-vocoder","peak-locked","laroche-dolson","dsp"],"engines":{"node":">=18"},"funding":"https://github.com/sponsors/audiojs","types":"index.d.ts","gitHead":"d637ae35b709957d2b7dac2266c480efa50dca95","_id":"@audio/shift-pvoc-lock@1.0.2","bugs":{"url":"https://github.com/audiojs/shift/issues"},"_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-PgOaulp4cusqIvsIXjP6+yI/LGB76Fdp1iUlLnfGweM1AbgVPM6LOpjvt6TThzyQLYYMcQ9UUKrgmTf328long==","shasum":"443c0195c61b6ce30e491518fd3dafc7bbaaf82e","tarball":"https://registry.npmjs.org/@audio/shift-pvoc-lock/-/shift-pvoc-lock-1.0.2.tgz","fileCount":5,"unpackedSize":12653,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIESRLyWRVjjJWd68lisD5t3ecigK6nsRhBVXr1zRjV3rAiEAh/NiIJWcP1vhQGmZu8o/MegZM7K1v3Fi6mB/IbrnSr4="}]},"_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/shift-pvoc-lock_1.0.2_1783731796639_0.5807272472064984"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-08T19:48:47.244Z","modified":"2026-07-11T01:03:16.935Z","1.0.0":"2026-07-08T19:48:47.650Z","1.0.1":"2026-07-09T19:13:03.238Z","1.0.2":"2026-07-11T01:03:16.776Z"},"bugs":{"url":"https://github.com/audiojs/shift/issues"},"author":{"name":"audiojs"},"license":"MIT","homepage":"https://github.com/audiojs/shift/tree/main/packages/shift-pvoc-lock#readme","keywords":["audio","pitch-shift","phase-vocoder","peak-locked","laroche-dolson","dsp"],"repository":{"type":"git","url":"git+https://github.com/audiojs/shift.git","directory":"packages/shift-pvoc-lock"},"description":"Peak-locked phase vocoder (Laroche-Dolson) pitch shift","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"readme":"# @audio/shift-pvoc-lock [![npm](https://img.shields.io/npm/v/@audio/shift-pvoc-lock)](https://www.npmjs.com/package/@audio/shift-pvoc-lock) [![MIT](https://img.shields.io/badge/MIT-%E0%A5%90-white)](https://github.com/krishnized/license)\n\nPeak-locked phase vocoder (Laroche-Dolson) pitch shift\n\n```\nnpm install @audio/shift-pvoc-lock\n```\n\n```js\nimport phaseLock from '@audio/shift-pvoc-lock'\n```\n\nLaroche-Dolson peak-locked phase vocoder. Peaks scatter to shifted bins; non-peak bins lock their phase relative to the nearest peak, keeping the vertical phase relationship inside each sinusoidal lobe intact.\n\n```js\nphaseLock(audio, { ratio: 1.5 })\n```\n\n**Preserves** phase coherence around peaks, partial structure.<br>\n**Destroys** transients (still smeared, less than `vocoder`), formants.\n\n| f0 err | THD% | alias | attack corr | formant dist | phase coh | shift |\n|-------:|-----:|------:|------------:|-------------:|----------:|------:|\n| 0.00 | 0.0 | 0.000 | 0.984 | 1.423 | 0.999 | 1.755 |\n\n**Use when:** General music — the \"try this first\" phase vocoder.<br>\n**Not for:** Music with drums (use `transient`), voice (use `formant`).\n\n## Stream\n\n```js\nlet write = phaseLock({ ratio: 1.5 })\nlet out = write(inputBlock)\nlet tail = write()  // flush\n```\n\n`phaseLock` streams per-frame: each `write(chunk)` call renormalizes and emits audio as soon as a frame completes, and re-chunking the same input differently reproduces the batch output byte for byte.\n\n## Data\n\nInput is a `Float32Array` (mono) or an array of `Float32Array` channels (`[left, right, ...]`) — anything else throws `TypeError`. `ratio` also accepts a function `t => ratio` (seconds from stream start) or a `Float32Array` breakpoint envelope (resampled across the input via `ratioDuration`, default the input's own duration) for time-varying pitch.\n\n---\n\nPart of [@audio/shift](https://github.com/audiojs/shift) — the shift family umbrella. This README is generated from the umbrella docs.\n\nMIT © [audiojs](https://github.com/audiojs)\n","readmeFilename":"README.md"}