Hello Fred,

> Does LilyPond use the concept of a baseline?

in fact in some sense Lilypond is doing exactly that. The distance between two 
Lyrics 
contexts is goverened by

    VerticalAxisGroup.nonstaff-nonstaff-spacing

of the upper context. Thi spacing itself is an alist of

    #'((basic-distance . [distance in staff spaces])
       (minimum-distance .  [distance in staff spaces])
       (padding .  [distance in staff spaces])
       (stretchability . [value]))

This models a flexible spacing from 0-line to 0 line of the particular context. 
Here you have 
a `basic-distance` (e.g. the default distance this would take), a 
`minimum-distance` (the 
maximally compressed distance), the `stretchability` (a weight of how much this 
distacne 
is ready to stretch) and a padding (no matter the calculated distance, put at 
least this much 
space between the printed ink).

The defaults for Lyrics context are

    #'((basic-distance . 0)
       (minimum-distance . 2.8)
       (padding . 0.2)
       (stretchability . 0))

So Lyrics are placed fixed 2.8 staff spaces apart, but making sure there is at 
least 0.2 staff 
spaces between printed ink. This space is not stretched. So the only thing that 
would result 
in uneven spacing would be padding.

So

%%%
<<
  \new Staff { c d e }
  \new Lyrics \lyricmode { M c c }
  \new Lyrics \lyricmode { M g g }
  \new Lyrics \lyricmode { M f f }
>>
%%%

should produce even spacing, but reducing the distance we’d get uneven spacing:

%%%
<<
  \new Staff { c d e }
  \new Lyrics \with {
    \override VerticalAxisGroup.nonstaff-nonstaff-spacing.minimum-distance = #1
  } \lyricmode { M c c }
  \new Lyrics \with {
    \override VerticalAxisGroup.nonstaff-nonstaff-spacing.minimum-distance = #1
  } \lyricmode { M g g }
  \new Lyrics \lyricmode { M f f }
>>
%%%

A padding value of 0 means the context are allowed to touch, but not overlap. 
If you want 
to allow a certain overlap you can use negative values for padding, of to 
`-inf.0` to never 
take padding into account at all:

%%%
<<
  \new Staff { c d e }
  \new Lyrics \with {
    \override VerticalAxisGroup.nonstaff-nonstaff-spacing.minimum-distance = #1
    \override VerticalAxisGroup.nonstaff-nonstaff-spacing.padding = #-inf.0
  } \lyricmode { M c c }
  \new Lyrics \with {
    \override VerticalAxisGroup.nonstaff-nonstaff-spacing.minimum-distance = #1
    \override VerticalAxisGroup.nonstaff-nonstaff-spacing.padding = #-inf.0
  } \lyricmode { M g g }
  \new Lyrics \lyricmode { M f f }
>>
%%%

If you combine this with setting the distances to 0 you can actually let 
Lilypond print 
contexts on top of each other:

%%%
<<
  \new Staff { c d e }
  \new Lyrics \with {
    \override VerticalAxisGroup.nonstaff-nonstaff-spacing.minimum-distance = #0
    \override VerticalAxisGroup.nonstaff-nonstaff-spacing.padding = #-inf.0
  } \lyricmode { M c c }
  \new Lyrics \with {
    \override VerticalAxisGroup.nonstaff-nonstaff-spacing.minimum-distance = #0
    \override VerticalAxisGroup.nonstaff-nonstaff-spacing.padding = #-inf.0
  } \lyricmode { M g g }
  \new Lyrics \lyricmode { M f f }
>>
%%%

So if you get uneven spacing try setting the patting to `-inf.0` and see if 
this causes 
collisions in lyrics text. If so then simply your line speacing is too low 
(which can happen if 
say you increase lyrics font size).

Cheers,
Tina

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to