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

    Function parallelKeyOf

    • The parallel key: the other mode on the same tonic.

      The tonic keeps the spelling it was given — the parallel minor of C major is C minor, never B# minor — which is why this is the one relation here that does not travel the circle of fifths.

      Parameters

      • tonic: NoteLike

        The spelled tonic of the key, as a note name, note data, or a Note; its letter and alteration are kept.

      • key: KeyLike

        The key/scale, as a key name, a key/scale, or a Key; its mask decides which mode the parallel is in.

      Returns ResolvedKey

      The parallel key on the same tonic.

      If the tonic or the mask is malformed.

      import { formatNote, majorKey, parallelKeyOf, parseNote } from '@libraz/libcantus';
      const parallel = parallelKeyOf(parseNote('C'), majorKey(0));
      formatNote(parallel.tonic); // 'C'