Global Note Spacing

The space taken by a note is determined by the formula

notespace = arithmetic_multiplier * ( c + log2 (time) ))

where time is the duration of a note e.g. 1/4 for a quarternote.
log2(1/2) = -1; log2(1/4) = -2 ;... Lily calculates c so that the
smallest space within a measure is arithmetic_multiplier.
(Despite the names, arithmetic_multiplier has the dimensions of
length, and arithmetic_basicspace is a ratio.)

By default

arithmetic_basicspace = 2.;
arithmetic_multiplier = 0.9 * \quartwidth;

and for the default 20 point staff,

\quartwidth = 6.61 \pt;

So, to increase the spacing between all notes by 10%, put
 arithmetic-multiplier = \quartwidth;
in the \paper block.

If the shortest note in the measure is a quarternote,

c = 2.0 / (0.9 * 2.0) +2 = 3.111

and the space given to a whole note is

1.8 * (3.111 + 0) = 5.6

If arithmetic_multiplier is increased to 2.0, then

c = 2.0 / (0.9 * 2.0) +2 = 3

and the space for a whole note becomes

2 * (3 + 0) = 6.0

So, to make long notes occupy more space compared to short ones,
increase arithmetic_multiplier.

Horizontal note shifts

Lilypond always arranges note heads on alternate sides of a stem
(i.e. within a single voice) as necessary to prevent overlaps.
She also attempts to detect overlaps of note heads in different
voices. This feature is on by default whenever only two voices
are active within a measure, but off by default otherwise. To
turn it on, use
horizontalNoteShift = <n>
where n is a different positive integer for each voice.
Then,notes that will overlap are grouped by Lily based on their
stem direction and horizontalNoteShift setting:

    |
    |  | 
   0u  |  |
      1u  |
         2u

   2d
   |  1d
   |  |  0d
      |  |
         |

(0,1,2,.. = horizontalNoteShift value. u,d = stem up / stem down)

The amount of the shift is set by forceHorizontalShift, which
defaults to about 1.1 in units of \quartwidth, but may be set to
any desired value (including negative). So, to take control of
all overlap-based note positions shifts, specify

\property Voice.horizontalNoteShift = <n>
\property Voice.forceHorizontalShift = "0.0"

at the start of each voice, set forceHorizontalShift to a
suitable value before each note needing it, then reset it to 0.0
after the note.

(... to be continued)
John

Reply via email to