I've now gone through all the note head collisions in the first 50
sonatas, and have a suggestion for Lily's collision avoidance system.

As I understand it, at present Lily arranges each voice occupying
the same column on the same staff as another voice into a
'collision group'.
If   horizontalNoteShift or forceHorizontalShift values have been
     set, she shifts all notes of each voice in accordance with them.
else (neither property has been set)
     if   there are more than two voices in this collision group,
          she quits right there
     else (there are only two voices)
          she looks for a unison or second interval between the
          voices - if one is found, one of the voices is shifted by
          \quartwidth.

Despite needing up to 5 voices on a single staff for
Scarlatti-before-autostaffswitch, I have not found a single case
where more than two voices formed a unison or second with each
other in one column.

My suggestion is, therefore, that instead of quitting immediately
it is found that there are more than two voices in the collision
group, that instead the check be made for unisons and seconds.
Then, Lily would quit only if more than two voices are in this
'unisons & seconds collision' subgroup. Otherwise, one of the two
voices in the subgroup would be shifted in exactly the same way
as is done now.

This would improve Lily's collision avoidance to the point where
it would handle virtually all notehead collisions, without
impacting on texts that use the horizontalNoteShift or
forceHorizontalShift systems.

John

Reply via email to