In NR 3.1.3 Nesting music expressions

the following example is given for a temporary staff:

\new Staff {
  \relative {
    r4 g'8 g c4 c8 d |
    e4 r8
    <<
      { f8 c c }
      \new Staff {
        f8 f c
      }
    >>
    r4 |
  }
}

While this looks mostly right it is wrong because the temporary staff isn't properly ended, which you can see if you add more music:

\new Staff {
  \relative {
    r4 g'8 g c4 c8 d |
    e4 r8
    <<
      { f8 c c }
      \new Staff {
        f8 f c
      }
    >>
    r4 |
    c1
 }
}

If I'm not mistaken this temporary staff is only ended automatically if the polyphonic section aligns with a barline:

\new Staff {
  \relative {
    r4 g'8 g c4 c8 d |
    e4 r8
    <<
      { f8 c c r4 }
      \new Staff {
        f8 f c s4
      }
    >>
    c2
  }
}

If this behaviour is considered a bug it should be addressed.

Otherwise the documentation should be changed:

a) the cheap solution would be to simply make the example work properly by aligning it to a full measure b) the proper solution would be to explain that when the polyphony doesn't align with a bar the temporary staff has to be stopped explicitly with \stopStaff.

The same is true for the second example in that section.

How should we proceed about this?
Urs

_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to