Thanks Pierre.

Although that wasn't quite the effect I was after, that section of documentation yielded the solution I wanted.

I have read it before, but didn't really understand until I followed the breadcrumbs to the Dynamics context in the internals. What I needed was something called nonstaff-relatedstaff-spacing within the VerticalAxisGroup.

The idea was that with the Dynamics context for the horn centered between the horn staff and the treble staff of the PianoStaff, it was ambiguous which staff the dynamics belonged to whenever spacing got a little tight. This solution keeps the dynamics closer to the horn staff, regardless of how the staves and groups stretch to fill a page.

Here's what it looks like.

Thanks again,

David

\version "2.18.2"


\paper {

ragged-last = ##f

ragged-last-bottom = ##f

}


pianoRH = \relative c'' { c4 d e c }


pianoLH = \relative c { c2 g'4 e }


hornNotes = \relative c'' { g2 c }


dyn = { s2\mf\< s\!\f }

\score {

<<

\new StaffGroup <<

\new Staff

\with {

fontSize = #-3

\override StaffSymbol.staff-space = #(magstep -3)

\override StaffSymbol.thickness = #(magstep -3)

}

{

\new Voice \hornNotes

}

\new Dynamics {

\override Dynamics.VerticalAxisGroup.nonstaff-relatedstaff-spacing =

#'((basic-distance . 0)

(minimum-distance . 0)

(padding . 2.5))

\override DynamicText.font-size = #-3

\override Hairpin.height = #.4444

\dyn

}

>>

\new PianoStaff <<

\new Staff \pianoRH

\new Dynamics \dyn

\new Staff {

\clef bass

\pianoLH

}

>>

>>

%{ \layout {

\context {

\Staff

\override VerticalAxisGroup.default-staff-staff-spacing =

#'((basic-distance . 2)

(minimum-distance . 2)

(padding . 1))

\override VerticalAxisGroup.staff-staff-spacing = #'((basic-distance . 2))

}

} %}

}




On 11/18/2014 02:41 PM, Pierre Perol-Schneider wrote:
Hi David,

2014-11-18 18:30 GMT+01:00 David B. Stocker <notesetters...@gmail.com <mailto:notesetters...@gmail.com>>:

    I need that baseline to 'hug ' the bottom of the melody
    staff and I haven't been able to do that.


See : http://lilypond.org/doc/v2.18/Documentation/notation/flexible-vertical-spacing-within-systems
Mini example enclosed.
HTH
Pierre



\version "2.18.2"

\paper {
  ragged-last = ##f
  ragged-last-bottom = ##f
}

pianoRH = \relative c'' { c4 d e c }

pianoLH = \relative c { c2 g'4 e }

hornNotes = \relative c'' { g2 c }

dyn = { s2\mf\< s\!\f }
        
\score {
  <<
    \new StaffGroup <<
      \new Staff 
      \with { 
        fontSize = #-3
        \override StaffSymbol.staff-space = #(magstep -3)
        \override StaffSymbol.thickness = #(magstep -3)
      }
      {
        \new Voice \hornNotes
      }
      \new Dynamics {
        \override Dynamics.VerticalAxisGroup.nonstaff-relatedstaff-spacing =
        #'((basic-distance . 0)
           (minimum-distance . 0)
           (padding . 2.5))
        \override DynamicText.font-size = #-3
        \override Hairpin.height = #.4444
        \dyn
      }
    >>
    \new PianoStaff <<
      \new Staff \pianoRH
      \new Dynamics \dyn
      \new Staff {
        \clef bass
        \pianoLH
      }
    >>
  >>
  %{ \layout {
    \context {
      \Staff
      \override VerticalAxisGroup.default-staff-staff-spacing =
        #'((basic-distance . 2)
           (minimum-distance . 2)
           (padding . 1))
      \override VerticalAxisGroup.staff-staff-spacing = #'((basic-distance . 2))
    }
  } %}
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to