{"_id":"@audio/shift-hybrid","_rev":"3-1c20c9ccc18b457542f1304fa6a06fb8","name":"@audio/shift-hybrid","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@audio/shift-hybrid","version":"1.0.0","keywords":["audio","pitch-shift","hybrid","phase-vocoder","wsola","transient","dsp"],"author":{"name":"audiojs"},"license":"MIT","_id":"@audio/shift-hybrid@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-hybrid#readme","bugs":{"url":"https://github.com/audiojs/shift/issues"},"dist":{"shasum":"32c930842704f2738cfa4c72826c646f00a63ddd","tarball":"https://registry.npmjs.org/@audio/shift-hybrid/-/shift-hybrid-1.0.0.tgz","fileCount":2,"integrity":"sha512-eOd2wYU7IGjIBf7N1wHJN/2g0BZyOARbRtUhNdkAcbLsIcAgYTrzHeh8f16RKK3GF/ZfiiA/5atF5hYmpQuXsg==","signatures":[{"sig":"MEQCICqpu4cxfDITTpLR0gP8VevovvdHsX7kNVeSk3fq558KAiBTjAr3MbIdfrpaTln5N0AXYDEjAfzwIZOLKj5GuNdMMQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11174},"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-hybrid"},"_npmVersion":"11.12.1","description":"Hybrid pitch shift — runs phase-lock + WSOLA in parallel, crossfades by transient confidence","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","dependencies":{"@audio/shift-core":"^1.0.0","fourier-transform":"^2.3.0","@audio/shift-wsola":"^1.0.0","@audio/shift-pvoc-lock":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/shift-hybrid_1.0.0_1783540114430_0.5939265328733598","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@audio/shift-hybrid","version":"1.0.1","keywords":["audio","pitch-shift","hybrid","phase-vocoder","wsola","transient","dsp"],"author":{"name":"audiojs"},"license":"MIT","_id":"@audio/shift-hybrid@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-hybrid#readme","bugs":{"url":"https://github.com/audiojs/shift/issues"},"dist":{"shasum":"d228a11a4d9137a83b0abdecc79858bd94b6388b","tarball":"https://registry.npmjs.org/@audio/shift-hybrid/-/shift-hybrid-1.0.1.tgz","fileCount":3,"integrity":"sha512-oy9uOc48aJE+ZW59G/PjA71klmW3tTTQ1fD7K0Fl+VXCdqqAizY8nz14p6H8NC5JMs/KeTnIKgivZB27KAJ3wA==","signatures":[{"sig":"MEUCIQDUMu69F8rlBLTvrjV25+UGW1YT6A9D/if1qmhWG5368QIgDsPCIOzB1P2iqHEFgzP82wj1M/08tIb8d1zZ4rDGZjI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15000},"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-hybrid"},"_npmVersion":"11.12.1","description":"Hybrid pitch shift — runs phase-lock + WSOLA in parallel, crossfades by transient confidence","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","dependencies":{"fourier-transform":"^2.3.0","@audio/shift-wsola":"^1.0.0","@audio/shift-pvoc-lock":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/shift-hybrid_1.0.1_1783624363048_0.2893276393838293","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@audio/shift-hybrid","version":"1.0.2","description":"Hybrid pitch shift — runs phase-lock + WSOLA in parallel, crossfades by transient confidence","type":"module","sideEffects":false,"main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"dependencies":{"@audio/shift-pvoc-lock":"^1.0.0","@audio/shift-wsola":"^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-hybrid#readme","repository":{"type":"git","url":"git+https://github.com/audiojs/shift.git","directory":"packages/shift-hybrid"},"keywords":["audio","pitch-shift","hybrid","phase-vocoder","wsola","transient","dsp"],"engines":{"node":">=18"},"funding":"https://github.com/sponsors/audiojs","types":"index.d.ts","gitHead":"d637ae35b709957d2b7dac2266c480efa50dca95","_id":"@audio/shift-hybrid@1.0.2","bugs":{"url":"https://github.com/audiojs/shift/issues"},"_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-hM49QTuwuEozP7oQuAUBZEUbeNPACgUr4hfFaFHwiSezHTqb0R5bIe7FXXqGislTNEBR1rBJd7vU0gCEWdCUZQ==","shasum":"f643b12feea9c315640cb4a4b1320911236d0d70","tarball":"https://registry.npmjs.org/@audio/shift-hybrid/-/shift-hybrid-1.0.2.tgz","fileCount":5,"unpackedSize":18986,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHAnweVPxr5Wkys+7jC1CJpROJIB6oXxA7qVDP1LT4vqAiEA8EA6BBUKeYy//Tt4haa75wFPM/+sNmg3mvwYSYlrhZs="}]},"_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-hybrid_1.0.2_1783731782301_0.2496464610596867"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-08T19:48:34.258Z","modified":"2026-07-11T01:03:02.579Z","1.0.0":"2026-07-08T19:48:34.591Z","1.0.1":"2026-07-09T19:12:43.201Z","1.0.2":"2026-07-11T01:03:02.453Z"},"bugs":{"url":"https://github.com/audiojs/shift/issues"},"author":{"name":"audiojs"},"license":"MIT","homepage":"https://github.com/audiojs/shift/tree/main/packages/shift-hybrid#readme","keywords":["audio","pitch-shift","hybrid","phase-vocoder","wsola","transient","dsp"],"repository":{"type":"git","url":"git+https://github.com/audiojs/shift.git","directory":"packages/shift-hybrid"},"description":"Hybrid pitch shift — runs phase-lock + WSOLA in parallel, crossfades by transient confidence","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"readme":"# @audio/shift-hybrid [![npm](https://img.shields.io/npm/v/@audio/shift-hybrid)](https://www.npmjs.com/package/@audio/shift-hybrid) [![MIT](https://img.shields.io/badge/MIT-%E0%A5%90-white)](https://github.com/krishnized/license)\n\nHybrid pitch shift — runs phase-lock + WSOLA in parallel, crossfades by transient confidence\n\n```\nnpm install @audio/shift-hybrid\n```\n\n```js\nimport hybrid from '@audio/shift-hybrid'\n```\n\nRuns `phaseLock` and `wsola` in parallel, crossfades sample-by-sample by spectral-flux transient confidence. Tonal regions resolve via the phase vocoder; attacks resolve via WSOLA similarity search, time-aligned against phaseLock before blending so the two engines' attacks land together.\n\n```js\nhybrid(audio, { ratio: 1.5 })\nhybrid(audio, { ratio: 1.5, hybridThreshold: 0.6 })\n```\n\n| Param | Default | |\n|---|---|---|\n| `hybridThreshold` | `0.8` | Spectral-flux z-score for full WSOLA blend |\n\n**Preserves** tonal phase coherence + attack shape — simultaneously.<br>\n**Destroys** CPU budget (≈2×), 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.824 |\n\nSame phaseLock-derived numbers as `phaseLock`/`transient` on this non-percussive suite — the WSOLA blend never activates because nothing here crosses `hybridThreshold`. Worst shift score among the frequency-adjacent methods for the same reason: it's carrying `wsola`'s parallel computation for a blend that stays at zero.\n\n**Use when:** Mixed dynamic material where a single domain compromises the other.<br>\n**Not for:** Pure tonal (just use `phaseLock`) or pure percussive (just use `transient`).\n\n## Stream\n\n```js\nlet write = hybrid({ ratio: 1.5 })\nlet out = write(inputBlock)\nlet tail = write()  // flush\n```\n\n`hybrid` buffers the whole input; `write(chunk)` accumulates and the batch algorithm runs once on `write()` (flush, no argument), returning everything at once.\n\n## Data\n\nInput is a `Float32Array` (mono) or an array of `Float32Array` channels (`[left, right, ...]`) — anything else throws `TypeError`. `ratio` here is a fixed number for the whole call — a function or `Float32Array` throws.\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"}