![]() |
GNU LilyPond-- -- |
||||||||||
|
Horizontal SpacingThe spacing engine translates differences in durations into stretchable distances ("springs") of differing lengths. Longer durations get more space, shorter durations get less. The basis for assigning spaces to durations, is that the shortest durations get a fixed amount of space, and the longer durations get more: doubling a duration adds a fixed amount of space to the note. For example, the following piece contains lots of half, quarter and 8th notes, the eighth note is followed by 1 note head width. The The quarter note is followed by 2 NHW, the half by 3 NHW, etc. c2 c4. c8 c4. c8 c4. c8 c8 c8 c4 c4 c4 These two amounts of space are If one would follow the above procedure exactly, then adding a single 32th note to a score that uses 8th and 16th notes, would widen up the entire score a lot. The shortest note is no longer a 16th, but a 64th, thus adding 2 noteheads of space to every note. To prevent this, the shortest duration for spacing is not the shortest note in the score, but the most commonly found shortest note. Notes that are even shorter this are followed by a space that is proportonial to their duration relative to the common shortest note. So if we were to add only a few 16th notes to the example above, they would be followed by half a NHW: c2 c4. c8 c4. [c16 c] c4. c8 c8 c8 c4 c4 c4 The most common shortest duration is determined as follows: in every
measure, the shortest duration is determined. The most common short
duration, is taken as the basis for the spacing, with the stipulation
that this shortest duration should always be equal to or shorter than
1/8th note. The shortest duration is printed when you run lilypond
with In the introduction it was explained that stem directions influence
spacing. This is controlled with BUGS Spacing is determined on a score wide basis. If you have a score that changes its character (measured in durations) half way during the score, the part containing the longer durations will be spaced too widely. Generating optically pleasing spacing is black magic. LilyPond tries to deal with a number of frequent cases. Here is an example that is not handled correctly, due to the combination of chord collisions and kneed stems. |
||||||||||
Go back to index of LilyPond.
Please send GNU LilyPond questions and comments to lilypond-user@gnu.org. Please send comments on these web pages to (address unknown) Copyright (c) 1997--2002 Han-Wen Nienhuys and Jan Nieuwenhuizen. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. |
This page was built from LilyPond-1.7.14 (development-branch) by