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

    Function voiceProgression

    • Voice a chord progression with smooth voice leading. The first chord is voiced with voiceChord; each subsequent chord picks, from a bounded deterministic candidate set, the voicing minimizing the voice-leading cost from the previous voicing plus a large penalty per counterpoint violation (parallel perfects/octaves, voice crossing, voice overlap, and over-wide upper-voice spacing).

      Parameters

      Returns number[][]

      One voicing per chord, each ascending with one MIDI pitch per voice.

      If any chord admits no voicing within the given ranges.

      import { parseChordSymbol, voiceProgression } from '@libraz/libcantus';
      const chords = ['C', 'Am', 'F', 'G'].map((s) => parseChordSymbol(s));
      voiceProgression(chords); // one four-voice voicing per chord, smoothly led