Function circleDistance

  • Calculate the distance between two cents values such that equave equivalence is taken into account.

    Parameters

    • a: number

      The first pitch measured in cents.

    • b: number

      The second pitch measured in cents.

    • equaveCents: number = 1200.0

      The interval of equivalence measured in cents.

    Returns number

    The absolute distance between the two pitches measured in cents but on a circle such that large distances wrap around.