Consider the following snippet and the attached graphic (--png) file it 
generates:

\version "2.19.15"
\paper {    ragged-last-bottom = ##f}

    music =  {
      \mark \default \repeat unfold 8 s1
      \break
      \mark \default \repeat unfold 8 s1
      \break
      \mark \default \repeat unfold 8 s1
      \break
      \mark \default \repeat unfold 8 s1
      \break
      \mark \default \repeat unfold 8 s1
      \break
      \mark \default \repeat unfold 8 s1
    }
    
    lowerDynamics = {
      s1\p \repeat unfold 7 s1
      s1\p \repeat unfold 7 s1
      s1\p \repeat unfold 7 s1
      s1\p \repeat unfold 7 s1
      s1\p \repeat unfold 7 s1
      s1\p \repeat unfold 7 s1
    }
    upperDynamics = {
      \repeat unfold 8 s1
      \repeat unfold 8 s1
      \repeat unfold 8 s1
      s1-"x" \repeat unfold 7 s1
      \repeat unfold 8 s1
      \repeat unfold 8 s1
    }

\score {
        <<
           \new Dynamics \upperDynamics
            \new Staff  \music 
            \new Dynamics \lowerDynamics
        >>
        \layout {       }
}

The lowerDynamics places a \p dynamic mark under the first measure of every 
staff, while the upperDynamics places the letter "x" above the first measure of 
staff D.  Note the placement of those \p's (and thus their dynamic context):  
They are approximately centered between staves A & B, B & C, D & E, and E & F.  
(We'll ignore the one under staff F as it's a special case.) But note that the 
\p is not centered between staves C & D, but rather positioned much closer to 
its staff.  This latter positioning is what I was hoping for.  It is clearly 
caused by the non--null upperDynamics content in the next staff, D.  This 
positioning remains even if the "x" is changed to a blank.

Is there a good way to achieve what I want without having to be sure to have 
some non-null content in the upperDynamics of each staff's next staff?

Note that one workaround is to add:      

         \context {\Dynamics \override 
VerticalAxisGroup.nonstaff-relatedstaff-spacing.stretchability= #0 }

to the layout block.  Another workaround is to eliminate the upperDynamics 
context.  (This latter workaround implies that the interplay between two 
dynamics contexts on a staff is very complicated; this same result can also be 
gotten by changing the  s1-"x" to s1-"".)


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to