Skip to content

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.

object[][]

STFT matrix [freq][time]

number

Speed-up factor (> 1 faster, < 1 slower)

number = null

Defaults to n_fft/4

number = null

Defaults to 2*(D.length - 1)

object[][]

Stretched STFT [freq][ceil(time/rate)]

When rate <= 0 or D is empty