Because vertical always seems like a mystery to me I set myself up a
test file to allow me to experiment with different combinations of
behavior. I enter different values when I want to confirm the resulting
spacing behavior. Usually I play around with padding just to see what
effects what, Everything in the attached script is making sense to me
except for the spacing between chordnames and the first staff line. I
was expecting the chordnames to be closer to the staff. Refer to
attached picture.
Thanks, Walt
% use for experimentation with vertical spacing
\version "2.25.22"
theNotesA = \relative c' {\repeat unfold 2 {\repeat unfold 4 {a4 a a a }}}
theNotesB = \relative c' {\repeat unfold 2 {\repeat unfold 4 {b4 b b b }}}
theChordsA = \chordmode {\repeat unfold 2 {\repeat unfold 4 {a1} \break}}
theChordsB = \chordmode {\repeat unfold 2 {\repeat unfold 4 {b1} \break}}
theLyricsA = \lyricmode {\repeat unfold 2 {\repeat unfold 4 {testA1}}}
theLyricsB = \lyricmode {\repeat unfold 2 {\repeat unfold 4 {testB1}}}
% these variables are only useful to make room
% on frescobaldi screens to see source and music at same time
vag = VerticalAxisGroup
ss = staff-staff-spacing
nn = nonstaff-nonstaff-spacing
nr = nonstaff-relatedstaff-spacing
nu = nonstaff-unrelatedstaff-spacing
bd = basic-distance
md = minimum-distance
pd = padding
st = stretchability
layoutTest = \layout {
\context {
\ChordNames
% When chordnames (non staff are at the top need to set affinity
% even when setting affinity the nonstaff relations are used.
\override VerticalAxisGroup.staff-affinity = ##f
% These should not matter since chords are not staff
\override \vag.\ss.\bd = #0
\override \vag.\ss.\md = #0
\override \vag.\ss.\pd = #0
\override \vag.\ss.\st = #0
% chord names are non-staff
\override \vag.\nn.\bd = #0
\override \vag.\nn.\md = #0
\override \vag.\nn.\pd = #0 %lyrics
\override \vag.\nn.\st = #0
\override \vag.\nr.\bd = #0
\override \vag.\nr.\md = #0
\override \vag.\nr.\pd = #0 % staff
\override \vag.\nr.\st = #0
\override \vag.\nu.\bd = #0
\override \vag.\nu.\md = #0
\override \vag.\nu.\pd = #0
\override \vag.\nu.\st = #0
}
\context {
\Staff
\override \vag.\ss.\bd = #0
\override \vag.\ss.\md = #0
\override \vag.\ss.\pd = #0
\override \vag.\ss.\st = #0
% should not matter for staff
\override \vag.\nn.\bd = #0
\override \vag.\nn.\md = #0
\override \vag.\nn.\pd = #0
\override \vag.\nn.\st = #0
% should not matter for staff
\override \vag.\nr.\bd = #0
\override \vag.\nr.\md = #0
\override \vag.\nr.\pd = #9
\override \vag.\nr.\st = #0
% should not matter for staff
\override \vag.\nu.\bd = #0
\override \vag.\nu.\md = #0
\override \vag.\nu.\pd = #0
\override \vag.\nu.\st = #0
}
\context {
\Lyrics
\override VerticalAxisGroup.staff-affinity = #UP
% should not matter for lyrics
\override \vag.\ss.\bd = #0
\override \vag.\ss.\md = #0
\override \vag.\ss.\pd = #0
\override \vag.\ss.\st = #0
% Lyrics are non staff
\override \vag.\nn.\bd = #0
\override \vag.\nn.\md = #0
\override \vag.\nn.\pd = #0 % other nonstaff (lyrics)
\override \vag.\nn.\st = #0
\override \vag.\nr.\bd = #0
\override \vag.\nr.\md = #0
\override \vag.\nr.\pd = #0 % staff
\override \vag.\nr.\st = #0
\override \vag.\nu.\bd = #0
\override \vag.\nu.\md = #0
\override \vag.\nu.\pd = #0
\override \vag.\nu.\st = #0
}
}
\paper {
annotate-spacing = ##f
ragged-bottom = ##t
ragged-last-bottom = ##t
system-system-spacing.\bd = #0
system-system-spacing.\md = #0
system-system-spacing.\pd = #0
score-system-spacing.\pd = #0
}
\score {
\layout {
\layoutTest
}
<<
\new ChordNames \theChordsA
\new Lyrics \theLyricsA
\new Lyrics \theLyricsB
>>
}
\score {
\layout {
\layoutTest
}
<<
\new ChordNames \theChordsA
\new Staff \theNotesA
\new TabStaff \theNotesA
\new Lyrics \theLyricsA
\new Lyrics \theLyricsB
>>
}