@libraz/libcantus - v1.1.0
    Preparing search index...

    Function subdominantKeyOf

    • The subdominant key: the key a fifth below, in the mode this key's third names, and the exact inverse of dominantKeyOf on the tonic spelling.

      Parameters

      • tonic: NoteLike

        The spelled tonic of the key, as a note name, note data, or a Note.

      • key: KeyLike

        The key/scale, as a key name, a key/scale, or a Key; its mask decides the mode of the result.

      Returns ResolvedKey

      The key a fifth below, in the mode this key's third names.

      If the tonic or the mask is malformed, or if the resulting signature falls outside [-12, 12] fifths — the subdominant of a key already at -12.

      import { formatNote, majorKey, parseNote, subdominantKeyOf } from '@libraz/libcantus';
      formatNote(subdominantKeyOf(parseNote('C'), majorKey(0)).tonic); // 'F'