The current voicing to lead from, ascending (index 0 = lowest).
The next chord to voice, as a chord symbol, chord data, or a
Chord.
Optionalopts: VoicingOptions
Voicing options; when omitted, ranges follow current's span.
The chosen voicing, ascending with one MIDI pitch per voice.
Voice a single chord to follow smoothly from an arbitrary current voicing.
Candidate voicings of
chordare enumerated within ranges taken fromopts, or — when neithervoicesnorrangesis given — from a one-octave window around each pitch ofcurrent(so the result matchescurrent's voice count). Each candidate is scored by structural quality, voice-leading motion fromcurrent, and a large penalty per counterpoint violation; the lowest scoring candidate is returned, ascending.The rules read from the chord being left — the resolution of a chordal seventh, the resolution of a leading tone, and the cross relation between the two chords — are scored only when
opts.previousChordnames it: what a voicing is written on cannot be read back from the pitches it holds. An editor moving from one chord to the next has that chord, and passing it is what keeps this generator and checkPartWriting agreeing about the pair.