phase_vocoder
phase_vocoder(
D,rate,options?):object[][]
Defined in: packages/pleco-xa/src/effects/index.js:312
Phase vocoder: time-stretch an STFT matrix by rate.
Ellis 2002 formulation:
phi_advance = linspace(0, π*hop_length, 1 + n_fft/2); phase accumulates
from column 0’s phase; the DEVIATION (dphase - phi_advance) is wrapped to
(-π, π]; input is padded with 2 zero columns for the boundary.
Parameters
Section titled “Parameters”object[][]
STFT matrix [freq][time]
number
Speed-up factor (> 1 faster, < 1 slower)
options?
Section titled “options?”hop_length?
Section titled “hop_length?”number = null
Defaults to n_fft/4
n_fft?
Section titled “n_fft?”number = null
Defaults to 2*(D.length - 1)
Returns
Section titled “Returns”object[][]
Stretched STFT [freq][ceil(time/rate)]
Throws
Section titled “Throws”When rate <= 0 or D is empty