A key that applies to the whole voice, or the key in force at a given beat.
The callback form is what a piece that modulates needs: it is asked for the
key at a specific beat, the same way a chord is asked for with chordAtBeat.
Example
import { majorKey } from'@libraz/libcantus'; constwholePiece = majorKey(0); // C major throughout constmodulating = (beat: number) => (beat < 8 ? majorKey(5) : majorKey(0));
A key that applies to the whole voice, or the key in force at a given beat.
The callback form is what a piece that modulates needs: it is asked for the key at a specific beat, the same way a chord is asked for with
chordAtBeat.