Comment #14 on issue 1555 by [email protected]: Multiple warnings
concerning staff-affinities
http://code.google.com/p/lilypond/issues/detail?id=1555
I think there is a very good reason why #'staff-affinity = ##f is not the
default. Lyrics are normally associated with a Staff. ChordNames are also
normally associated with a staff.
Lyrics are by default below the staff, so their default #'staff-affinity is
#UP. ChordNames are by default above the staff, so their default
#'staff-affinity is #DOWN. Hence the warnings in this case. We have
ChordNames above Lyrics, so the 'staff-affinity goes #DOWN #UP, which is
wrong. Normally, when we have non-staff contexts between staff contexts,
the first non-staff is #UP (tied to the staff above), the last non-staff is
#DOWN (tied to the staff below), and the remaining non-staffs are #CENTER
(spaced off the adjacent non-staff contexts).
In this particular situation, there is no Staff. So one of the contexts
needs to be the fixed (staff) line. Setting #'staff-affinity = ##f is a
way to resolve this. We could also eliminate the warnings by putting the
Lyrics above the ChordNames:
\score {
<<
\new Lyrics \lyricmode {
\markup { \fret-diagram #"w:4;4-o;3-o;2-1;1-3;"}
}
\new ChordNames \chordmode {
g:m
}
>>
}
Or we could do the most logically consistent thing and have both contexts
spaced as loose lines:
\score {
<<
\new ChordNames \with {
\override VerticalAxisGroup #'staff-affinity = #CENTER
} \chordmode {
g:m
}
\new Lyrics \with {
\override VerticalAxisGroup #'staff-affinity = #CENTER
} \lyricmode {
\markup { \fret-diagram #"w:4;4-o;3-o;2-1;1-3;"}
}
>>
}
Or we could do what Marc finally said gave him the best output, and just do
the chord names and fret diagrams as markups.
Personally, I think that the current defaults are just right. The use that
Marc was making is clearly non-standard. We have specifically given the
answer to people wanting to write chord names and lyrics (i.e. for guitar)
that LilyPond is not the right tool for the job.
_______________________________________________
bug-lilypond mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-lilypond