Next: , Previous: Vertical spacing, Up: Paper output



10.1.7 Vertical spacing of piano staves

The distance between staves of a PianoStaff cannot be computed during formatting. Rather, to make cross-staff beaming work correctly, that distance has to be fixed beforehand.

The distance of staves in a PianoStaff is set with the forced-distance property of the VerticalAlignment object, created in PianoStaff.

It can be adjusted as follows

\new PianoStaff \with {
  \override VerticalAlignment #'forced-distance = #7
} {
  ...
}

This would bring the staves together at a distance of 7 staff spaces, measured from the center line of each staff.

The difference is demonstrated in the following example,

     \relative <<
       \new PianoStaff \with {
         \override VerticalAlignment #'forced-distance = #7
       } <<
         \new Staff { c1 }
         \new Staff { c }
       >>
       \new PianoStaff <<
         \new Staff { c }
         \new Staff { c }
       >>
     >>

[image of music]

Bugs

forced-distance cannot be changed per system.

This page is for LilyPond-2.6.3 (stable-branch).

Report errors to <bug-lilypond@gnu.org>.

Other languages: English.
Using automatic language selection.