lilypond-user
[Top][All Lists]
Advanced

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

Show TacetStaff when StaffGroup empty


From: Pierre-Luc Gauthier
Subject: Show TacetStaff when StaffGroup empty
Date: Mon, 30 Oct 2023 09:56:42 -0400

Hello there,

Please let this not be a duplicate.

Is there a way for the tacet staff to be shown *only* when all the other staves are empty ? Manual intervention is not a viable option here.

\version "2.25.10"

\language "english"

\layout {
  \context {
    \StaffGroup
    \RemoveAllEmptyStaves
  }
  % remove-layer = ?
  % keepAliveInterfaces = ?
}

tacet = {
  R1*100
}

musicA = {
  \repeat unfold 32 g'4 |
  R1*10
  \repeat unfold 16 g'4 |
}
musicB = {
  R1*4
  \break
  \repeat unfold 16 c'4 |
  \break
  R1*10
  \break
  \repeat unfold 16 c'4 |
}

\new StaffGroup \with {
} <<
  \new Staff \with {
    shortInstrumentName = "Tacet"
  } \tacet
  \new Staff \with {
    instrumentName = "A"
    shortInstrumentName = "A"
  } \musicA
  \new Staff \with {
    shortInstrumentName = "B"
  } \musicB
>>


Thanks for any pointers
--
Pierre-Luc Gauthier




reply via email to

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