@libraz/libcantus - v0.9.3
    Preparing search index...

    Function pitchToScaleDegree

    • Get the 0-based scale degree of a pitch.

      Parameters

      • pitch: number

        MIDI pitch or bare pitch class.

      • key: KeyScale

        The key/scale to measure against.

      Returns number

      The 0-based degree, or -1 if the pitch is not in the scale.