tempogram
tempogram(
y?,sr?,onset_envelope?,hop_length?,win_length?,center?,window?,norm?):Float64Array<ArrayBufferLike>[]
Defined in: packages/pleco-xa/src/scripts/xa-tempogram.js:113
Local autocorrelation tempogram of the onset strength envelope.
Legacy positional signature preserved.
Parameters
Section titled “Parameters”any[] | Float32Array<ArrayBufferLike>
audio time series (optional if onset_envelope provided)
number = 22050
sample rate
onset_envelope?
Section titled “onset_envelope?”any[] | Float32Array<ArrayBufferLike>
pre-computed onset strength envelope
hop_length?
Section titled “hop_length?”number = 512
hop length used for the onset envelope
win_length?
Section titled “win_length?”number = 384
autocorrelation window in frames
center?
Section titled “center?”boolean = true
center the analysis windows (linear_ramp pad)
window?
Section titled “window?”string = 'hann'
window function (‘hann’ only)
number = Infinity
Infinity for per-column max-normalization (default), null for raw autocorrelation
Returns
Section titled “Returns”Float64Array<ArrayBufferLike>[]
tempogram [win_length][n_frames] — row k is lag k; convert with convert.tempo_frequencies(win_length, hop_length, sr)
Throws
Section titled “Throws”on invalid parameters or an envelope shorter than one analysis window — never returns a fabricated result