audio

@audio/stretch-hybrid1.2.3

Hybrid harmonic/percussive time stretch

Hybrid harmonic/percussive time stretch (Driedger) — HPSS split, phase-locked vocoder + OLA per layer

Status
calibrated
Updated
Family
stretch, 10 packages under it
Plugin
stretch-hybrid, effect, whole signal, 1 parameter
Category
time & pitch
Licence
MIT
Dependencies
4 packages, all permissive: MIT
Downloads
3,041 last month
Tests
47 in audiojs/stretch's CI, passed at b844b07,

Parameters

  • effect
  • whole signal
factor
1
0.25 to 4

Hybrid harmonic/percussive time stretch (Driedger & Müller). Median-filter HPSS splits the spectrogram into a harmonic and a percussive layer; the harmonic layer goes through the phase-locked vocoder, the percussive layer through short-frame OLA — chords stay coherent and attacks stay sharp, where a single algorithm must trade one for the other.

import hybrid from '@audio/stretch-hybrid'
let out = hybrid(data, { factor: 2 })
Param Default
factor 1 Time stretch ratio
frameSize 2048 FFT size for HPSS + harmonic path
hopSize frameSize/4 Hop between frames
percFrame 512 OLA frame for the percussive layer
harmMedian 17 Median filter across time (frames)
percMedian 17 Median filter across frequency (bins)

Use when: full mixes — drums over tonal material.
Cost: separation + two stretches ≈ 4–6× the CPU of @audio/stretch-pvoc-lock alone; on purely tonal or purely percussive material the single-path algorithms match it for less.

Part of @audio/stretch.

License

MIT · ॐ