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)).
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 envelope
hop_length?
Section titled “hop_length?”number = 512
hop length used for the onset envelope
win_length?
Section titled “win_length?”number = 512
STFT window in envelope frames (power of 2)
center?
Section titled “center?”boolean = true
center the STFT windows
window?
Section titled “window?”string = 'hann'
window function type
Returns
Section titled “Returns”object[][]
complex Fourier tempogram [win_length/2 + 1][n_envelope_frames + 1] (center=true)
Throws
Section titled “Throws”if win_length is not a power of two