(also sent to bug-lilypond@gnu.org, to make sure they see this)
The following lilypond fragment will produce a bit of music which
incorrectly has two visible repeat bars. Running it through lilypond is
probably the best way to see what I mean. The "a" grace note is visible
between the two repeat bars.
---------------------------------------------------------------------------
\score {
\context PianoStaff \notes <
\context Staff=top \context Voice=top \notes \relative c' {
\repeat volta 2 {
\grace {d16}
c4 d e f
}
\grace {a16} g8 f e d c2
}
\context Staff=bottom \context Voice=bottom \notes \relative c {
\clef bass
\repeat volta 2 {
c4 <e-. g> c <e-. g> }|
g g, c <e-. g>
} >
}
---------------------------------------------------------------------------
However (and this is the interesting part), if you remove "\grace {a16}"
from the above score or use a standard (non-piano) staff, correct output
is produced. (well, I also seem to be getting an extra bass clef that
overlaps the time signature, but that's not related)
Daniel
The 2.8-compatible version of Daniels's excerpt is:
==CUT==
\version "2.7.40"
\score {
\context PianoStaff <<
\context Staff = "top" \context Voice = "top" \relative c' {
\repeat volta 2 {
\grace { d16 }
c4 d e f
}
\grace { a16 } g8 f e d c2
}
\context Staff = "bottom" \context Voice = "bottom" \relative c {
\clef bass
\repeat volta 2 {
c4 <e g>-. c <e g>-. }|
g g, c <e g>-.
} >>
}
==CUT==
The problem still occurs in 2.8.7-3. There was no response on
bug-lilypond@gnu.org to Daniel's bug forwarding. [0]
Regards,
/Lamby
[0] http://osdir.com/ml/gnu.lilypond.bugs/2002-07/threads.html#00099
This bug is caused by a failure to maintain appropriate grace music in
parallel staves at the start of a special music block.
The solution is to add a \grace {s16} at the beginning of the repeat in the
bottom staff.
This is now documented in the notation reference.
Thanks,
Carl Sorensen
Here's the link to the relevant part in the documentation for current stable: http://lilypond.org/doc/v2.16/Documentation/notation/special-rhythmic-concerns#index-grace_002dnote-synchronization This bug is already recorded on the lilypond tracker: https://code.google.com/p/lilypond/issues/detail?id=34