foldLogSpectrumToChroma
foldLogSpectrumToChroma(
logSpec,n_chroma?,bins_per_octave?):Float32Array<ArrayBufferLike>[]
Defined in: packages/pleco-xa/src/feature/chroma.js:394
Fold a time-major log-frequency spectrum into pitch classes by
energy sum over bin % n_chroma, with per-frame sqrt-energy-share
normalization. Only valid when the spectrum has exactly n_chroma bins
per octave (the fold has no sub-semitone resolution).
Parameters
Section titled “Parameters”logSpec
Section titled “logSpec”Float32Array<ArrayBufferLike>[]
time-major [n_frames][n_bins]
n_chroma?
Section titled “n_chroma?”number = 12
pitch classes (default 12)
bins_per_octave?
Section titled “bins_per_octave?”number = n_chroma
must equal n_chroma
Returns
Section titled “Returns”Float32Array<ArrayBufferLike>[]
[n_chroma][n_frames]