Vertical spacing of piano staves - GNU LilyPond
Description: GNU LilyPond

Next: Horizontal spacing, Previous: Vertical spacing, Up: Music layout

#### 10.5.5 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 c'' <<
>            \new PianoStaff \with {
>              \override VerticalAlignment #'forced-distance = #7
>            } <<
>              \new Staff { c1 }
>              \new Staff { c }
>            >>
>            \new PianoStaff <<
>              \new Staff { c }
>              \new Staff { c }
>            >>
>          >>

It is also possible to change the distance between for each system individually. This is done by including the command

    \overrideProperty
    #"Score.NonMusicalPaperColumn"
    #'line-break-system-details
    #'((fixed-alignment-extra-space . 15))

at the line break before the system to be changed. The distance `15` is distributed over all staves that have a fixed distance alignment. For example,

The distance for `fixed-alignment-extra-space` may also be negative.

##### See also

Example files: `input/regression//alignment-vertical-spacing.ly`.

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

Other languages: English.
Using automatic language selection.