hpss
hpss(
y,options?):object
Defined in: packages/pleco-xa/src/effects/index.js:462
Decompose an audio time series into harmonic and percussive components. Pipeline: stft → decompose.hpss (masked components) → istft with length matched to the input, so harmonic + percussive ≈ y at margin=1.
Parameters
Section titled “Parameters”Float32Array<ArrayBufferLike>
Audio signal
options?
Section titled “options?”center?
Section titled “center?”boolean = true
hop_length?
Section titled “hop_length?”number = null
defaults to n_fft/4
kernel_size?
Section titled “kernel_size?”number | number[] = 31
margin?
Section titled “margin?”number | number[] = 1.0
n_fft?
Section titled “n_fft?”number = 2048
pad_mode?
Section titled “pad_mode?”string = 'constant'
power?
Section titled “power?”number = 2.0
win_length?
Section titled “win_length?”number = null
defaults to n_fft
window?
Section titled “window?”string = 'hann'
Returns
Section titled “Returns”object
Both length y.length
harmonic
Section titled “harmonic”harmonic:
Float32Array
percussive
Section titled “percussive”percussive:
Float32Array