tempo_eval.extract_tempi_and_salience
- tempo_eval.extract_tempi_and_salience(tempo_annotations)[source]
Extract MIREX-style values from the annotations. I.e.
(t1, t2, s1)
— tempo 1, tempo 2 and the salience value for tempo1. Tempo values are ordered:t1 < t2
.- Parameters
tempo_annotations (
Annotation
) – annotations- Returns
t1, t2, s1
- Return type
- Example
>>> from tempo_eval import read_reference_annotations, extract_tempi_and_salience >>> gt = read_reference_annotations('smc_mirex', validate=False) # turn validation off for speed >>> gt_691694 = gt['tempo']['2.0']['691694.LOFI.jams'] # choose reference version '2.0' >>> tempo = extract_tempi_and_salience(gt_691694) # extract single tempo from JAMS annotation >>> print(tempo) (73.0, 144.0, 0.04228329809725159)