tempo_eval.pe2

tempo_eval.pe2(reference_tempo, estimated_tempo)[source]

Percentage error for two tempi values allowing the factors 1, 2, 3, 1/2, and 1/3 with the smallest absolute value. If an estimate of None is given, this function returns NaN.

See also pe1.

Parameters
  • reference_tempo (float) – a references tempo, must not be 0

  • estimated_tempo (Optional[float]) – an estimated tempo

Returns

the percentage error for the factors 1, 2, 3, 1/2, and 1/3 with the smallest absolute value

Return type

float