{"_id":"@audio/shift-paulstretch","_rev":"6-4ccec9ceaa900c8ff7f2089a41535501","name":"@audio/shift-paulstretch","dist-tags":{"latest":"1.1.4"},"versions":{"1.0.0":{"name":"@audio/shift-paulstretch","version":"1.0.0","keywords":["audio","pitch-shift","paulstretch","texture","drone","dsp"],"author":{"name":"audiojs"},"license":"MIT","_id":"@audio/shift-paulstretch@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-paulstretch#readme","bugs":{"url":"https://github.com/audiojs/shift/issues"},"dist":{"shasum":"6f86c27db0d8b9f0628edce7ef52a8b87ba65cb7","tarball":"https://registry.npmjs.org/@audio/shift-paulstretch/-/shift-paulstretch-1.0.0.tgz","fileCount":2,"integrity":"sha512-IUpgSAHZAwKx24WYQGVX4SG5kjdgpnV3kq0rHErNHS2mVvroAA+HEPh1wP+lSPlcOVK0Ug4WqCix3UYmQ6ZldQ==","signatures":[{"sig":"MEYCIQD9NizjupypgYOm91XpWngYPhk8Sx7Wtqm4pozrvoNqHgIhALsdQOKS/5aoSHDrOfcBULA7n7IhaJ0sXl3nnJpVZXRN","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5426},"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-paulstretch"},"_npmVersion":"11.12.1","description":"Paulstretch-style randomized-phase pitch shift for textural blur","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","dependencies":{"@audio/shift-core":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/shift-paulstretch_1.0.0_1783540120888_0.49398566494504337","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@audio/shift-paulstretch","version":"1.1.0","keywords":["audio","pitch-shift","paulstretch","texture","drone","dsp"],"author":{"name":"audiojs"},"license":"MIT","_id":"@audio/shift-paulstretch@1.1.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-paulstretch#readme","bugs":{"url":"https://github.com/audiojs/shift/issues"},"atom":"./atom.js","dist":{"shasum":"391eabed5aebc3208aefc69c3707b0f4524235b7","tarball":"https://registry.npmjs.org/@audio/shift-paulstretch/-/shift-paulstretch-1.1.0.tgz","fileCount":3,"integrity":"sha512-lyfCsb9CwIC68NIM8dU5vgxU6fzCSM0BZtMiLgaRuaBxXR0NTwZX3KEWh4wcv3ba2Zom9lrW5Xkduodqc3nnfg==","signatures":[{"sig":"MEYCIQCOJwOdTKuYcDM0XrtFy4Wq9os/L/KNr6LdnOJj9TN0IgIhALNwuFMEtkZ8+AWh2m2uHzXdps5+p51xk8dCiagvMqqH","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7151},"main":"index.js","type":"module","engines":{"node":">=18"},"exports":{".":"./index.js","./atom":"./atom.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-paulstretch"},"_npmVersion":"11.12.1","description":"Paulstretch-style randomized-phase pitch shift for textural blur","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","dependencies":{"@audio/shift-core":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/shift-paulstretch_1.1.0_1783598132813_0.9088880275490063","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@audio/shift-paulstretch","version":"1.1.1","keywords":["audio","pitch-shift","paulstretch","texture","drone","dsp"],"author":{"name":"audiojs"},"license":"MIT","_id":"@audio/shift-paulstretch@1.1.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-paulstretch#readme","bugs":{"url":"https://github.com/audiojs/shift/issues"},"atom":"./atom.js","dist":{"shasum":"6b8aae1a17b18df5803216931e9977f30c5051f1","tarball":"https://registry.npmjs.org/@audio/shift-paulstretch/-/shift-paulstretch-1.1.1.tgz","fileCount":4,"integrity":"sha512-yWPer0VUSzRQ2TFTu1vaeI0WVTDlvipJd3TDAnjO0UL/R8HJnrNiIMZ87z6kEKPdV90xqYKmXGo6bfT6dCBUxA==","signatures":[{"sig":"MEYCIQDwiGdkrzyDOMqfQ0vUQXL8Jeq4hNYOhgX+l4zv23SmQwIhAI6JF5ygoO2+nRhn2pwI8yWBFy357raNALQiwvIv36B4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14344},"main":"index.js","type":"module","engines":{"node":">=18"},"exports":{".":"./index.js","./atom":"./atom.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-paulstretch"},"_npmVersion":"11.12.1","description":"Paulstretch-style randomized-phase pitch shift for textural blur","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-paulstretch_1.1.1_1783624372734_0.19098345554035778","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@audio/shift-paulstretch","version":"1.1.2","keywords":["audio","pitch-shift","paulstretch","texture","drone","dsp"],"author":{"name":"audiojs"},"license":"MIT","_id":"@audio/shift-paulstretch@1.1.2","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-paulstretch#readme","bugs":{"url":"https://github.com/audiojs/shift/issues"},"dist":{"shasum":"22079f599d141898aa61d06a756bdb553dea547b","tarball":"https://registry.npmjs.org/@audio/shift-paulstretch/-/shift-paulstretch-1.1.2.tgz","fileCount":4,"integrity":"sha512-8HHKmBP8gNGF2/75wBrDd2LBhol8yxx58hYL/NJgpuaWz/JO5+pTs/w5I+3t3YkN0OkwADq/GGgV3ArRH4BuUw==","signatures":[{"sig":"MEYCIQDv7LsMZv1OyLAtSo+X1q2gf7pCZK1wSaQWW0fiDRjF7AIhAOZdFtwj96L4f7g1JFR8dlNnuvfrDBjQjrZfk+3XOtph","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14353},"main":"index.js","type":"module","audio":"./audio.js","engines":{"node":">=18"},"exports":{".":"./index.js","./audio":"./audio.js","./package.json":"./package.json"},"gitHead":"a99ffb1c0af7ef9809ed987998820c0c45192f15","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/audiojs/shift.git","type":"git","directory":"packages/shift-paulstretch"},"_npmVersion":"11.12.1","description":"Paulstretch-style randomized-phase pitch shift for textural blur","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-paulstretch_1.1.2_1783645075154_0.15344599321459573","host":"s3://npm-registry-packages-npm-production"}},"1.1.3":{"name":"@audio/shift-paulstretch","version":"1.1.3","keywords":["audio","pitch-shift","paulstretch","texture","drone","dsp"],"author":{"name":"audiojs"},"license":"MIT","_id":"@audio/shift-paulstretch@1.1.3","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-paulstretch#readme","bugs":{"url":"https://github.com/audiojs/shift/issues"},"dist":{"shasum":"32e4f33a16dc4672d90bba4e7d9f06e8b9678017","tarball":"https://registry.npmjs.org/@audio/shift-paulstretch/-/shift-paulstretch-1.1.3.tgz","fileCount":5,"integrity":"sha512-KyqBdvz+kv5m+5Nlz+DNx3DtS792ddE+uMepaiOTvOQJGQim2cO4om/fDsGfp9mKquDUneqwvmbuHayvikmpgQ==","signatures":[{"sig":"MEUCIQCVGLuO4mtADaifmscDq8NoQWPS+vRhIwqUH8yubr+0bQIgNPW1NLQLRmb/VsFQDgOKNDDOUA49BK34zPVoesZb/lg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15725},"main":"index.js","type":"module","audio":"./audio.js","engines":{"node":">=18"},"exports":{".":"./index.js","./audio":{"types":"./audio.d.ts","default":"./audio.js"},"./package.json":"./package.json"},"gitHead":"f9f081b70d629cf5890df9072880378c274f8bd0","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/audiojs/shift.git","type":"git","directory":"packages/shift-paulstretch"},"_npmVersion":"11.12.1","description":"Paulstretch-style randomized-phase pitch shift for textural blur","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-paulstretch_1.1.3_1783701801323_0.31616126121334753","host":"s3://npm-registry-packages-npm-production"}},"1.1.4":{"name":"@audio/shift-paulstretch","version":"1.1.4","description":"Paulstretch-style randomized-phase pitch shift for textural blur","type":"module","sideEffects":false,"main":"index.js","exports":{".":"./index.js","./audio":{"types":"./audio.d.ts","default":"./audio.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-paulstretch#readme","repository":{"type":"git","url":"git+https://github.com/audiojs/shift.git","directory":"packages/shift-paulstretch"},"keywords":["audio","pitch-shift","paulstretch","texture","drone","dsp"],"engines":{"node":">=18"},"audio":"./audio.js","funding":"https://github.com/sponsors/audiojs","types":"index.d.ts","gitHead":"d637ae35b709957d2b7dac2266c480efa50dca95","_id":"@audio/shift-paulstretch@1.1.4","bugs":{"url":"https://github.com/audiojs/shift/issues"},"_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-SF2PgC++pamocC8gULcPgBoWTyYFah8uzQQwJHhhamKICANUr7hhRkg+5uPokGP3yrZfjTvST/KPi/iWc0f2fg==","shasum":"c652e72206c284ca89c97aa52ef58afcf58f8aff","tarball":"https://registry.npmjs.org/@audio/shift-paulstretch/-/shift-paulstretch-1.1.4.tgz","fileCount":7,"unpackedSize":20124,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDYCXOJd0cGnaj97ui8WcX0xJ9CwVmMhoEVslNsfPUW1QIhALAvF92nFEVeMx8ner+DmH9KNXof7dkijd8PVsGCDDfx"}]},"_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-paulstretch_1.1.4_1783731789735_0.9791047996891213"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-08T19:48:40.677Z","modified":"2026-07-11T01:03:10.014Z","1.0.0":"2026-07-08T19:48:41.016Z","1.1.0":"2026-07-09T11:55:32.958Z","1.1.1":"2026-07-09T19:12:52.866Z","1.1.2":"2026-07-10T00:57:55.323Z","1.1.3":"2026-07-10T16:43:21.454Z","1.1.4":"2026-07-11T01:03:09.886Z"},"bugs":{"url":"https://github.com/audiojs/shift/issues"},"author":{"name":"audiojs"},"license":"MIT","homepage":"https://github.com/audiojs/shift/tree/main/packages/shift-paulstretch#readme","keywords":["audio","pitch-shift","paulstretch","texture","drone","dsp"],"repository":{"type":"git","url":"git+https://github.com/audiojs/shift.git","directory":"packages/shift-paulstretch"},"description":"Paulstretch-style randomized-phase pitch shift for textural blur","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"readme":"# @audio/shift-paulstretch [![npm](https://img.shields.io/npm/v/@audio/shift-paulstretch)](https://www.npmjs.com/package/@audio/shift-paulstretch) [![MIT](https://img.shields.io/badge/MIT-%E0%A5%90-white)](https://github.com/krishnized/license)\n\nPaulstretch-style randomized-phase pitch shift for textural blur\n\n```\nnpm install @audio/shift-paulstretch\n```\n\n```js\nimport paulstretch from '@audio/shift-paulstretch'\n```\n\nLarge-frame (16k) phase randomization. Magnitudes pulled from source bins at `k/ratio`; phases drawn from a seeded PRNG every frame. Destroys temporal structure by design.\n\n```js\npaulstretch(audio, { ratio: 1.5 })\npaulstretch(audio, { ratio: 1.5, seed: 42 })\n```\n\n| Param | Default | |\n|---|---|---|\n| `seed` | fixed (`0x1f123bb5`) | 32-bit PRNG seed for the per-frame phase draw |\n\nDeterministic: the same `seed` (the shipped default, or one you pass) always reproduces the same phase sequence and therefore byte-identical output. Pass `seed` to get a different, still-reproducible draw.\n\n**Preserves** long-term magnitude-spectrum statistics.<br>\n**Destroys** phase, transients, rhythm — by design.\n\n| f0 err | THD% | alias | attack corr | formant dist | phase coh | shift |\n|-------:|-----:|------:|------------:|-------------:|----------:|------:|\n| 0.00 | 0.2 | 0.230 | 0.935 | 7.371 | 0.518 | 2.221 |\n\nWorst formant dist by a wide margin (7.371 — the next-worst is `granular` at 3.486) because random phases smear spectral energy across the frame; the smear is the aesthetic. Alias 0.230 is the same smear leaking past Nyquist.\n\n**Use when:** Ambient/drone textures, extreme shift ratios.<br>\n**Not for:** Anything requiring temporal precision.\n\n## Stream\n\n```js\nlet write = paulstretch({ ratio: 1.5 })\nlet out = write(inputBlock)\nlet tail = write()  // flush\n```\n\n`paulstretch` 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"}