A basic extension of the current 4-note voicing algorithm found in Hookpad. It is written in Lua, but porting it to other languages should be simple, including JavaScript. Basically, it selects notes from the given intervals of a chord for the right hand, in decreasing order of significance:
- The suspended note replacing the third;
- All altered extensions;
- Sharpened or flattened fifth;
- Other chord extensions from the thirteenth to the seventh / sixth, including added notes;
- The third and the fifth;
- The slash bass; (optional, since doing so practically converts all slash chords into inverted chords)
- The root.
It makes the voicing more “open” when four different notes on the right hand are involved, and doubles one note when there are fewer than 4 notes on the right hand. The code does not address chord symbols and implied notes (although in practice no notes should be implied, i.e. m♭13 would be m7(♭13) rather than m7(9,11,♭13)), but demonstrates the idea of using the number of perfect fifths to identify every note name as suggested here. 6-note voicings might be overkill at this moment, while producing guitar voicings requires extra validation.
Developers may find this useful if and when Hooktheory plans to introduce chord extensions above the seventh; because Hooktheory seems to focus on popular music more than classical aspects of music theory, this new voicing method should probably happen before Hooktheory III unless there are no plans to continue after the second book.