{"_id":"@audio/spectral-pvoc","_rev":"3-22f8177c98dc73549e1e97bcb13a9e7b","name":"@audio/spectral-pvoc","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@audio/spectral-pvoc","version":"1.0.0","keywords":["audio","dsp","phase-vocoder","pvoc","pitch-shift","time-stretch","spectral"],"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","_id":"@audio/spectral-pvoc@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/spectral/tree/main/packages/spectral-pvoc","dist":{"shasum":"8c66f9af7f1400f1270878ec2e86b459474034bf","tarball":"https://registry.npmjs.org/@audio/spectral-pvoc/-/spectral-pvoc-1.0.0.tgz","fileCount":3,"integrity":"sha512-raJWFpTZtRhpNluA5Rl3n4AVrpe+AmQaYXIl2dKIJTrydfjm8P39pV7GZQvIKH81iMMKJRRogUVbtdIPqoZ7FQ==","signatures":[{"sig":"MEUCIQDDdBeT3yCD9lZEdhmDk27WQ9UI0jk/AIq4COfPfvqmAAIgBJSL/cLYMd1z9jIqOf0YwZJsZOKw7nxi4loxBwSnyrw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13865},"main":"pvoc.js","type":"module","engines":{"node":">=18"},"exports":{".":"./pvoc.js","./package.json":"./package.json"},"gitHead":"e2a6fad4b1596c2f2d7e7ee950a1c83b2692fd91","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"repository":{"directory":"packages/spectral-pvoc"},"_npmVersion":"11.12.1","description":"Phase-vocoder engine — peak-gated and peak-locked spectral bin scatter (Bernsee, Laroche-Dolson), phase locking, peak finding; powers @audio/shift-pvoc* and @audio/stretch-pvoc*","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/spectral-pvoc_1.0.0_1783623527637_0.2513221574109077","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@audio/spectral-pvoc","version":"1.0.1","keywords":["audio","dsp","phase-vocoder","pvoc","pitch-shift","time-stretch","spectral"],"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","_id":"@audio/spectral-pvoc@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/spectral/tree/main/packages/spectral-pvoc","dist":{"shasum":"1e63720f81a901e970690ccc514a5125fac51944","tarball":"https://registry.npmjs.org/@audio/spectral-pvoc/-/spectral-pvoc-1.0.1.tgz","fileCount":4,"integrity":"sha512-YydFYjgewYTwgRcRGrsZ4gZsHjZt9U35Bl/7Y99nEriK1F3lVdQqgVuZAY2KWsr3J6XllVSdDffpd18bKzuQBQ==","signatures":[{"sig":"MEYCIQCm4AzhwyOqSdUCEq+6KYt2IhGCQXrvyF1JEI6TN85qUAIhAMJUuPGaufF+28k8Rs7O+M3LQG3+EYQI1WRho0WhDWS3","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16804},"main":"pvoc.js","type":"module","types":"index.d.ts","engines":{"node":">=18"},"exports":{".":"./pvoc.js","./package.json":"./package.json"},"funding":"https://github.com/sponsors/audiojs","gitHead":"0bf461273c2acb2401ff9842afec35a43fd05a9a","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"repository":{"directory":"packages/spectral-pvoc"},"_npmVersion":"11.12.1","description":"Phase-vocoder engine — peak-gated and peak-locked spectral bin scatter (Bernsee, Laroche-Dolson), phase locking, peak finding; powers @audio/shift-pvoc* and @audio/stretch-pvoc*","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/spectral-pvoc_1.0.1_1783731889472_0.9605508516548706","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"_id":"@audio/spectral-pvoc@1.1.0","dist":{"shasum":"1d0c9e90ae7ffc8617b39ac7920525d00dc1d8a4","tarball":"https://registry.npmjs.org/@audio/spectral-pvoc/-/spectral-pvoc-1.1.0.tgz","fileCount":4,"integrity":"sha512-4xalb8hOaamuvkKom8R+SYDTx/ntvKT6o/n6ME7x4T67U1dpTbnh8845ETF9FmOyCELn9gG1WV+XUbZ+ojmqWQ==","signatures":[{"sig":"MEYCIQDosAEn7WkJPSY2LPhK5Tfs2HF1SAGcGv9+LZMxD3hziAIhAJ7v3ENA6/qlUSl0V+86Dh83GnugkPtntHl5qD0GKlHw","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIA0AxTYmg4KXtbB1+5oChwWofZXxCrcZjY+vLOhC4be4AiAoYHpICIRsE6eiqOrgbN5bEfWulouMrmldpD4sGwc2xw=="}],"unpackedSize":22791},"main":"pvoc.js","name":"@audio/spectral-pvoc","type":"module","types":"index.d.ts","author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"engines":{"node":">=18"},"exports":{".":{"types":"./index.d.ts","default":"./pvoc.js"},"./package.json":"./package.json"},"funding":"https://github.com/sponsors/audiojs","gitHead":"ecb79275632e37a139bc60f391517d31a1e37245","license":"MIT","version":"1.1.0","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"homepage":"https://github.com/audiojs/spectral/tree/main/packages/spectral-pvoc","keywords":["audio","dsp","phase-vocoder","pvoc","pitch-shift","time-stretch","spectral"],"repository":{"directory":"packages/spectral-pvoc"},"_npmVersion":"11.12.1","description":"Phase-vocoder engine — peak-gated and peak-locked spectral bin scatter (Bernsee, Laroche-Dolson), phase locking, peak finding; powers @audio/shift-pvoc* and @audio/stretch-pvoc*","directories":{},"maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"sideEffects":false,"_nodeVersion":"25.9.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/spectral-pvoc_1.1.0_1790491016889_0.08375721176594975"}}},"time":{"created":"2026-07-09T18:58:47.464Z","modified":"2026-09-27T06:36:57.164Z","1.0.0":"2026-07-09T18:58:47.785Z","1.0.1":"2026-07-11T01:04:49.608Z","1.1.0":"2026-09-27T06:36:56.965Z"},"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","homepage":"https://github.com/audiojs/spectral/tree/main/packages/spectral-pvoc","keywords":["audio","dsp","phase-vocoder","pvoc","pitch-shift","time-stretch","spectral"],"repository":{"directory":"packages/spectral-pvoc"},"description":"Phase-vocoder engine — peak-gated and peak-locked spectral bin scatter (Bernsee, Laroche-Dolson), phase locking, peak finding; powers @audio/shift-pvoc* and @audio/stretch-pvoc*","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"readme":"# @audio/spectral-pvoc\n\n> Phase-vocoder engine — the spectral scatter/lock machinery behind pitch shifting and time stretching.\n\nFrame-level primitives over STFT magnitude/phase arrays. Pure math, no dependencies; pair with [`fourier-transform/stft`](https://github.com/scijs/fourier-transform) (ana/syn hop) or [`@audio/stft`](https://github.com/audiojs/stft) (AMS).\n\n```js\nimport { findPeaks, scatterLocked, lockPhase, makeFrameRatio } from '@audio/spectral-pvoc'\n```\n\n| export | role |\n|---|---|\n| `scatterGated(mag, phase, prevPhase, ratio, ctx, …scratch)` | Bernsee/SMB peak-gated bin scatter — pitch shift by ratio, RMS-preserving collisions |\n| `scatterLocked(mag, phase, prevPhase, reset, peaks, ratio, ctx, …scratch)` | Laroche-Dolson rigid-ROI scatter — phase-coherent shift |\n| `lockPhase(phase, propPhase, mag, half)` | lock non-peak bins to their peak's rotation (time-stretch coherence) |\n| `lockMap(mag, half, owner)` | which peak each bin locks to (−1: free) — the regions `lockPhase` uses |\n| `lockState(half)` / `lockAdvance(re, im, st, reset, anaHop, synHop, freqPerBin, half)` | the phase-locked vocoder frame on complex bins: locked bins rotate by one complex multiply, only free bins take trig |\n| `findPeaks(mag, half)` / `nearestPeak(peaks, k)` | local-maxima peak indices + nearest lookup |\n| `makeFrameRatio(ratio)` | scalar or time-varying ratio → per-frame resolver |\n| `wrapPhase(p)` / `WIN_GAIN` / `PI2` | phase wrap, Hann OLA gain constant |\n\nUsed by [`@audio/shift`](https://github.com/audiojs/shift)'s pvoc/pvoc-lock/sms/formant/transient/hpss and [`@audio/stretch`](https://github.com/audiojs/stretch)'s pvoc-lock/transient. MIT.\n","readmeFilename":"README.md"}