Skip to content

tempo_frequencies

tempo_frequencies(n_bins, hop_length?, sr?): Float64Array<ArrayBufferLike>

Defined in: packages/pleco-xa/src/scripts/xa-convert.js:641

Compute the frequencies (in BPM) corresponding to LAG-tempogram bins. Lag-tempogram bin k is autocorrelation lag k, so bpm[k] = 60 * sr / (hop_length * k), and bin 0 (lag 0) is +Infinity.

Tier-3 repair (2026-07-02): the previous body computed a LINEAR Fourier frequency grid (fourier_tempo_frequencies math with a fabricated win_length = 2*(n_bins-1)) — every BPM axis drawn with it was wrong. For Fourier tempograms use fourier_tempo_frequencies().

number

Number of lag bins (tempogram rows)

number = 512

Hop length of the onset envelope

number = 22050

Sample rate

Float64Array<ArrayBufferLike>

Tempo frequencies in BPM (bin 0 = Infinity)