Spectrogram decomposition#

librosa.decompose provides functions to decompose a feature matrix or spectrogram into components.

This includes harmonic-percussive source separation (HPSS), nearest-neighbor filtering, and general matrix decomposition (e.g. NMF).

hpss

Median-filtering harmonic percussive source separation (HPSS).

nn_filter

Filter by nearest-neighbor aggregation.

decompose

Decompose a feature matrix.

pitch_nmf

Perform pitch-informed Non-negative Matrix Factorization (NMF).

pitch_basis

Construct a pitch template basis matrix for decomposition.