The distance between staves of a PianoStaff (lilypond-internals) 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 (lilypond-internals)
object, created in
PianoStaff (lilypond-internals)
.
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 }
>>
>>
forced-distance cannot be changed per system.
This page is for LilyPond-2.4.5 (stable-branch).