Function interval

  • Get interval properties. It returns an object with:

    • name: the interval name
    • num: the interval number
    • type: 'perfectable' or 'majorable'
    • q: the interval quality (d, m, M, A)
    • dir: interval direction (1 ascending, -1 descending)
    • simple: the simplified number
    • semitones: the size in semitones
    • chroma: the interval chroma

    Parameters

    Returns Interval | NoInterval

    the interval properties

    Example

    import { interval } from '../core'
    interval('P5').semitones // => 7
    interval('m3').type // => 'majorable'