lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Temporarily override frenched score


From: Lukas-Fabian Moser
Subject: Re: Temporarily override frenched score
Date: Mon, 29 Jun 2020 15:06:20 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

Hi,

Am 29.06.20 um 14:41 schrieb Aberforth D - Instrumentals:
It works although it doesn't seem to work when applied to the first bar on the staff, but I guess it's good enough.

Do you mean that the staff is not removed in the first system? That's just the difference between \RemoveEmptyStaves und \RemoveAllEmptyStaves.

I would still be grateful if somebody could answer my second question because it might be useful in specific circumstances. Namely, how to hide a redundant staff when it doubles another staff without having to replace the notes by rests, as described in my original message.

The keepAliveInterfaces list defines which types of "event" prevent a staff from being removed. So:

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

\layout {
  \context {
    \Staff
    \RemoveAllEmptyStaves
  }
}

killMeAtAllCosts = \set Staff.keepAliveInterfaces = #'()
resurrectMe = \undo \killMeAtAllCosts

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
  \killMeAtAllCosts \fillLine \break \resurrectMe
  \fillLine
}

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

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

%%%%

Lukas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]