API Reference

Compare Tempo Values

equal1(reference_tempo, estimated_tempo[, ...])

Determines whether two tempi are considered equal, given an allowed tolerance and factor.

equal2(reference_tempo, estimated_tempo[, ...])

Determines whether two tempi are considered equal, given an allowed tolerance and the factors 1, 2, 3, 1/2, and 1/3.

ape1(reference_tempo, estimated_tempo[, factor])

Absolute percentage error for two tempi values allowing for a given factor.

ape2(reference_tempo, estimated_tempo)

Minimum of the absolute percentage error for two tempi values allowing the factors 1, 2, 3, 1/2, and 1/3.

pe1(reference_tempo, estimated_tempo[, factor])

Percentage error for two tempi values allowing for a given factor.

pe2(reference_tempo, estimated_tempo)

Percentage error for two tempi values allowing the factors 1, 2, 3, 1/2, and 1/3 with the smallest absolute value.

oe1(reference_tempo, estimated_tempo[, factor])

Octave error for two tempi values allowing for a given factor.

oe2(reference_tempo, estimated_tempo)

Octave error for two tempi values allowing the factors 1, 2, 3, 1/2, and 1/3 with the smallest absolute value.

aoe1(reference_tempo, estimated_tempo[, factor])

Absolute octave error for two tempi values allowing for a given factor.

aoe2(reference_tempo, estimated_tempo)

Minimum of the absolute octave error for two tempi values allowing the factors 1, 2, 3, 1/2, and 1/3.

p_score(reference_tempo, estimated_tempo[, ...])

P-Score is the weighted average of two tempi values.

one_correct(reference_tempo, estimated_tempo)

Fraction of estimates with at least one correct tempo value.

both_correct(reference_tempo, estimated_tempo)

Fraction of estimates with two correct tempo values.

Access Annotations

list_estimate_corpus_names()

List of corpus names for (built-in) estimates.

list_reference_corpus_names()

List of corpus names for (built-in) references datasets.

read_estimate_annotations(corpus_name[, ...])

Read annotations for estimates.

read_reference_annotations(corpus_name[, ...])

Read annotations for reference datasets.

read_annotations(path[, derive_version, ...])

Recursively read all jam files from the given directory.

read_reference_tags(corpus_name[, validate])

Read reference tags from the namespaces 'tag_open', 'tag_gtzan', and 'tag_fma_genre'.

get_estimates_path([dataset, folder_name, ...])

Get real path for an estimates data set.

get_references_path([dataset, folder_name, ...])

Get real path for a reference data set.

Extract Values From JAMS

extract_tempo(tempo_annotations)

Extract the most salient (greatest confidence) tempo value from the annotation.

extract_tempi_and_salience(tempo_annotations)

Extract MIREX-style values from the annotations.

extract_tempo_from_beats(beat_annotations)

Extract tempo values from beat annotations using timestamps_to_bpm.

extract_c_var_from_beats(annotation_set)

Extract coefficient of variations for the beats in the annotation set.

extract_tags(tag_annotations)

Extract tags from annotations object as set.

is_mirex_style(t)

Does the given tempo have MIREX style, i.e., (t1, t2, s1) with t1 and t2 not equal to 0 and s1 neither 0 or 1.

is_single_bpm(t)

Is the given tempo a plausible BPM value? Returns False for values less than 0 and greater than 5000.

Metrics

Metric(name[, formatted_name, description, ...])

Metric.

ACC1

Metric.

ACC2

Metric.

APE1

Metric.

APE2

Metric.

PE1

Metric.

PE2

Metric.

OE1

Metric.

OE2

Metric.

AOE1

Metric.

AOE2

Metric.

PSCORE

Metric.

ONE_CORRECT

Metric.

BOTH_CORRECT

Metric.