[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: possible bug: \change Staff and beam collision
From: |
Mike Solomon |
Subject: |
Re: possible bug: \change Staff and beam collision |
Date: |
Sun, 2 Nov 2014 21:17:44 +0200 |
> On Nov 2, 2014, at 8:40 PM, Gilberto Agostinho <address@hidden> wrote:
>
> Hello all,
>
> Please have a look on the following code:
>
> \version "2.19.15"
>
> \new PianoStaff <<
> \new Staff = up {
> \override Score.Beam.damping = 3
> \stemUp a'8
> \ottava #1 a'''
> \ottava #0 a'
> a,
> }
> \new Staff = down {
> \clef bass
> s2
> }
>>>
>
> \new PianoStaff <<
> \new Staff = up {
> \override Score.Beam.damping = 3
> \stemUp a'8
> \ottava #1 a'''
> \ottava #0 a'
> \change Staff = "down" a,
> }
> \new Staff = down {
> \clef bass
> s2
> }
>>>
>
> Which produces:
>
> <http://lilypond.1069038.n5.nabble.com/file/n168324/11.png>
>
> As you can see, without changing staff the ottava position is high enough
> not to collide with the beam, but when changing staff the ottava position
> gets lower (!) and collides with the beam. Anyone know any workaround for
> this problem?
>
> Best,
> Gilberto
>
This is a persistent issue in LilyPond development - there was some work on it
in course a couple years ago that has since been put on hold but I hope to pick
it back up one day.
The gist of the problem (and others like it) is that, because the beam is cross
staff, the layout engine does not know where it will be placed because it does
not know how far apart vertically the notes are until final page spacing is
done. That means that all objects that depend on the beam for placement (such
as the ottava) ignore it when being placed and, as a result, you get collisions.
I know that Keith has several cross-staff-related workarounds in his piano
scores. Sorry I can’t be of more help, but it is not an easy issue.
Cheers,
MS