@audio/spectral-pvoc 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/pvoc.js +3 -3
package/README.md CHANGED
@@ -13,7 +13,7 @@ import { findPeaks, scatterLocked, lockPhase, makeFrameRatio } from '@audio/spec
13
13
  | `scatterGated(mag, phase, prevPhase, ratio, ctx, …scratch)` | Bernsee/SMB peak-gated bin scatter — pitch shift by ratio, RMS-preserving collisions |
14
14
  | `scatterLocked(mag, phase, prevPhase, reset, peaks, ratio, ctx, …scratch)` | Laroche-Dolson rigid-ROI scatter — phase-coherent shift |
15
15
  | `lockPhase(phase, propPhase, mag, half)` | lock non-peak bins to their peak's rotation (time-stretch coherence) |
16
- | `lockMap(mag, half, owner)` | which peak each bin locks to (−1: free) — the regions `lockPhase` uses |
16
+ | `lockMap(mag, half, owner)` | which peak each bin locks to (−1: free): the regions `lockPhase` uses |
17
17
  | `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 |
18
18
  | `findPeaks(mag, half)` / `nearestPeak(peaks, k)` | local-maxima peak indices + nearest lookup |
19
19
  | `makeFrameRatio(ratio)` | scalar or time-varying ratio → per-frame resolver |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@audio/spectral-pvoc",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "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*",
5
5
  "type": "module",
6
6
  "sideEffects": false,
package/pvoc.js CHANGED
@@ -6,7 +6,7 @@
6
6
  // - scatterGated: Bernsee/SMB peak-gated bin scatter (pitch shift by ratio)
7
7
  // - scatterLocked: Laroche-Dolson rigid-ROI peak-locked scatter (phase coherent)
8
8
  // - lockPhase: lock non-peak bin phases to their nearest peak's rotation (time stretch)
9
- // - lockMap: which peak each bin locks to — the same regions, for complex-domain locking
9
+ // - lockMap: which peak each bin locks to, the same regions, for complex-domain locking
10
10
  // - lockState / lockAdvance: the phase-locked vocoder step on complex bins (no polar round trip)
11
11
  // - findPeaks / nearestPeak / makeFrameRatio / wrapPhase: the supporting primitives
12
12
 
@@ -248,7 +248,7 @@ function peakMask(mag, half) {
248
248
  }
249
249
 
250
250
  // Which bins ride which peak: `owner[k]` = the peak whose rotation bin k takes (its region of
251
- // influence reaches halfway to the neighbouring peaks), or -1 for a free bin — a peak itself, or a
251
+ // influence reaches halfway to the neighbouring peaks), or -1 for a free bin: a peak itself, or a
252
252
  // bin under 3% of its peak's magnitude, which keeps its own phase advance. Returns `owner`.
253
253
  let _peakBins = new Int32Array(0)
254
254
  export function lockMap(mag, half, owner) {
@@ -281,7 +281,7 @@ export function lockPhase(phase, propPhase, mag, half) {
281
281
  // ── Complex-domain phase locking ──
282
282
  // The propagate-then-lockPhase vocoder step on complex bins (pair with fourier-transform/stft's `complex` frames).
283
283
  // A bin riding a peak takes the peak's rotation R = Y(p)·conj(X(p))/|X(p)|², Y(k) = X(k)·R: one complex multiply,
284
- // the identity locking of Laroche & Dolson. Only free bins — the peaks, and bins too quiet to lock — advance at
284
+ // the identity locking of Laroche & Dolson. Only free bins (the peaks, and bins too quiet to lock) advance at
285
285
  // their instantaneous frequency, one atan2 and one sin/cos each. State keeps unit synthesis phasors and the previous
286
286
  // analysis bins, so no bin needs its phase as an angle.
287
287