Optical spacing

In spacing, the distribution of space should reflect the durations between notes. However, as we saw in the Bach Suite above, many modern scores adhere to the durations with mathematical precision, which leads to poor results. In the next example a motif is printed twice: the first time using exact mathematical spacing, and the second with corrections. Which do you prefer?

[image of music]

[image of music]

Each bar in the fragment only uses notes that are played in a constant rhythm. The spacing should reflect that. Unfortunately, the eye deceives us a little; not only does it notice the distance between note heads, it also takes into account the distance between consecutive stems. As a result, the notes of an up-stem/down-stem combination should be put farther apart, and the notes of a down-stem/up-stem combination should be put closer together, all depending on the combined vertical positions of the notes. The lower two measures are printed with this correction, the upper two measures, however, form down-stem/up-stem clumps of notes. A master engraver would adjust the spacing as needed to please the eye.

The spacing algorithms in LilyPond even take the bar lines into account, which is why the final up-stem in the properly spaced example has been given a little more space before the bar line to keep it from looking crowded. A down-stem would not need this adjustment.


Essay on automated music engraving v2.25.22 (development-branch).