Skip to content

fourier_tempogram

fourier_tempogram(y?, sr?, onset_envelope?, hop_length?, win_length?, center?, window?): object[][]

Defined in: packages/pleco-xa/src/scripts/xa-tempogram.js:232

Fourier tempogram: STFT of the onset strength envelope at hop 1: stft(onset_envelope, n_fft=win_length, hop_length=1, center, window)

DIVERGENCE NOTE: pleco’s radix-2 stft zero-pads non-power-of-2 FFT sizes, which would silently regrid the tempo axis — so win_length must be a power of two here (default 512; the tempo axis is convert.fourier_tempo_frequencies(sr, win_length, hop_length)).

any[] | Float32Array<ArrayBufferLike>

audio time series (optional if onset_envelope provided)

number = 22050

sample rate

any[] | Float32Array<ArrayBufferLike>

pre-computed envelope

number = 512

hop length used for the onset envelope

number = 512

STFT window in envelope frames (power of 2)

boolean = true

center the STFT windows

string = 'hann'

window function type

object[][]

complex Fourier tempogram [win_length/2 + 1][n_envelope_frames + 1] (center=true)

if win_length is not a power of two