Caution

You're reading an old version of this documentation. If you want up-to-date information, please have a look at 0.10.2.

librosa.tempo_frequencies

librosa.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_binsint > 0

The number of lag bins

hop_lengthint > 0

The number of samples between each bin

srnumber > 0

The audio sampling rate

Returns:
bin_frequenciesndarray [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])