Poor accidental layout on large / complex chords
Windows 7, 6d1da20ec129c
The new algorithm handles most cases very well and puts us much more in line with other programs. The one place where we still fall short is large chords (over an octave) with many accidentals:
The zig-zag algorithm does a very poor job with these, creating a distacting wedge shape with a large gap in the middle. It also fails to align accidentals an octave apart. I was originally willing to accept this as I didn't see an easy way around it and didn't really understand what the expected result should be.
But I now see exactly how the algorithm could work, and it's not hard at all to do what LilyPond does here:
This particular case is maybe not the worst offender, but it does illustrate the difference clearly. LilyPond is identifying sets of accidentals an octave apart and aligning them first in columns (working right to left). Had there been any accidentals *not* duplicated in another octave, LilyPond would zig-zag them to the left of the octave columns. Other programs don't bother trying to align octaves and can get marginally tighter spacing in some cases by using a more ad-hoc approach, but the algorithm is not as straightforward, and you don't get the nicely aligned octaves.
So my plan is to use the LilyPond model for chords larger than an octave. Optimal or not, it's a definite improvement over the plain zig zag for large chords, it aligns octaves, and it should not be difficult to implement.
At that point, I will stop messing with this, as I think we need predictable defaults moving forward.