Hi,
How about:

%%%%
\version "2.20.0"
\language "english"

\layout {
  \context {
    \Staff
    \RemoveEmptyStaves
  }
}

%% => http://lsr.di.unimi.it/LSR/Item?id=312
showMultiRests = {
 \set Staff.keepAliveInterfaces = #'(
    rhythmic-grob-interface
    multi-measure-rest-interface
    lyric-interface
    stanza-number-interface
    percent-repeat-interface)
}
hideMultiRests = \unset Staff.keepAliveInterfaces

fillBar = \relative c' { g'8[ g g g g g] | }
fillLine = { \fillBar \fillBar \fillBar \fillBar }

partA = {
  \key d \major \time 6/8 \clef "G"
  \fillLine \break
  \fillLine \break
  \fillLine
}

partB = {
  \key d \major \time 6/8 \clef "G"
  R2.*4  \break
  R2.*4  \break
  R2. R R \showMultiRests  R  \break
}

\score {
  <<
  \new Staff
    \with {shortInstrumentName = #"Pt A"}
    \partA
  \new Staff
    \with {shortInstrumentName = #"Pt B"}
    \partB
  >>
}
%%%%

Cheers,
Pierre

Le lun. 29 juin 2020 à 10:33, Aberforth D - Instrumentals <
aberfor...@gmail.com> a écrit :

> Hello,
>
> I'm currently working on a piano-vocal score for an opera. I'm using a
> Frenched score layout so empty staves are removed from the systems. I
> usually aim for 12 to 14 staves on a page. If necessary I am willing to
> accept a minimum of 10 and a maximum of 15 staves, but I try to avoid that.
>
> I have now run into a situation where I have a system with only 8 staves
> and it is impossible to fit another system on that same page. The result is
> that the system is stretched out enormously and it just looks terrible. In
> such a case professional engravers often choose to show the empty staves as
> well in that specific system because it's visually more pleasing that way.
>
> I tried to do that with
> \override Staff.VerticalAxisGroup.remove-empty = ##f
> but this only works at the beginning of a score, not halfway.
>
> So I looked into a way to make Lilypond think there is actually music on
> the staff and the solution I came up with is to add a second voice with
> just one note and remove its stencil. I use a whole note so I only have to
> omit the notehead and I make it a grace note to avoid problems with time
> signatures other than 4/4. Like this:
>
>   \omit Staff.NoteHead
>   << R2.*4 \new Voice \grace g'1 >>
>   \undo \omit Staff.NoteHead
>
> There is a script below this message that demonstrates how it works.
> Although it works, it feels like an ugly hack and something tells me there
> must be a more elegant way to do this. I would be grateful for any help.
>
> Another solution in this specific case would also be acceptable: It so
> happens that 2 singers have exactly the same notes and lyrics (in that
> system, not the whole score) so it should be possible to omit one of the
> two staves and change the shortInstrumentName of the other to represent
> both singers. The same is true for the next system, so they would then fit
> together on one page. Changing the name of a staff on the fly is easy, but
> I have found no way to omit the staff of the other singer, other than
> replacing the music itself by rests. Removing the stencil of all grobs just
> leaves an empty space where the staff used to be. Any suggestions?
>
> Aberforth D
>
>
> %%%%
> \version "2.20.0"
> \language "english"
>
> \layout {
>   \context {
>     \Staff
>     \RemoveAllEmptyStaves
>   }
> }
>
> fillBar = \relative c' { g'8[ g g g g g] | }
> fillLine = { \fillBar \fillBar \fillBar \fillBar }
>
> partA = {
>   \key d \major \time 6/8 \clef "G"
>   \fillLine \break
>   \fillLine \break
>   \fillLine
> }
>
> partB = {
>   \key d \major \time 6/8 \clef "G"
>   \fillLine \break                  % Staff with notes is shown
>   R2.*4 \break                      % Staff without notes is hidden
>   \omit Staff.NoteHead
>   << R2.*4 \new Voice \grace g'1 >> % Staff without notes is shown...
>   \undo \omit Staff.NoteHead        % ...but is there a better way?
> }                                   % How to hide a staff with notes?
>
> \score {
>   <<
>   \new Staff
>     \with {shortInstrumentName = #"Pt A"}
>     \partA
>   \new Staff
>     \with {shortInstrumentName = #"Pt B"}
>     \partB
>   >>
> }
> %%%%
>

Reply via email to