librosax.feature.tempogram¶
- tempogram(*, y: ndarray | None = None, sr: float = 22050, onset_envelope: ndarray | None = None, hop_length: int = 512, win_length: int = 384, center: bool = True, window: str = 'hann', norm: float | Callable | None = inf) ndarray[source]¶
Compute the tempogram: local autocorrelation of the onset strength envelope.
This is a wrapper around librosa.feature.tempogram.
Parameters¶
- ynp.ndarray [shape=(…, n)] or None
Audio time series. Required if onset_envelope is not provided.
- srfloat > 0
Sampling rate of the audio time series
- onset_envelopenp.ndarray [shape=(n,)] or None
Optional pre-computed onset strength envelope
- hop_lengthint > 0
Number of audio samples between successive onset measurements
- win_lengthint > 0
Length of the onset autocorrelation window (in frames/onset measurements)
- centerbool
If True, onset autocorrelation windows are centered. If False, windows are left-aligned.
- windowstr, tuple, number, callable, or list-like
A window specification as in get_window
- norm{np.inf, float > 0, None, callable}
Normalization mode. Set to None to disable normalization.
Returns¶
- tempogramnp.ndarray [shape=(…, win_length, n)]
Tempogram matrix
See Also¶
fourier_tempogram librosa.feature.tempogram