librosa.core.tempo_frequencies¶
-
librosa.core.
tempo_frequencies
(n_bins, hop_length=512, sr=22050)[source]¶ Compute the frequencies (in beats-per-minute) corresponding to an onset auto-correlation or tempogram matrix.
Parameters: - n_bins : int > 0
The number of lag bins
- hop_length : int > 0
The number of samples between each bin
- sr : number > 0
The audio sampling rate
Returns: - bin_frequencies : ndarray [shape=(n_bins,)]
vector of bin frequencies measured in BPM.
Note
bin_frequencies[0] = +np.inf corresponds to 0-lag
Examples
Get the tempo frequencies corresponding to a 384-bin (8-second) tempogram
>>> librosa.tempo_frequencies(384) array([ inf, 2583.984, 1291.992, ..., 6.782, 6.764, 6.747])