spectral_centroid
spectral_centroid(
y?,options?):Float64Array<ArrayBufferLike>
Defined in: packages/pleco-xa/src/feature/spectral.js:164
Spectral centroid per frame. centroid[t] = sum_f freq[f] * S_norm[f][t], with per-frame L1 normalization.
Parameters
Section titled “Parameters”any[] | Float32Array<ArrayBufferLike>
time series (or null when S given)
options?
Section titled “options?”any = {}
{ sr, S, n_fft, hop_length, win_length, window, center, pad_mode, freq }
Returns
Section titled “Returns”Float64Array<ArrayBufferLike>
centroid frequency (Hz) per frame