Hello. I'm writing a score of a song of which there are 16 measures of only
rests in two instruments (the rhythm and the drumkit). I've used the
RemoveAllEmptyStaves command to remove (obviously) the unnecessary staffs.
However, the drumkit doesn't get removed like it should.
The drumkit staff is independent by itself; it is not part of a group
staff. It is, however, a DrumStaff.
I've looked at the documentation (Hiding Staves
<https://lilypond.org/doc/v2.25/Documentation/notation/hiding-staves>) and
found a similar situation (the double bass not being removed). However, the
D.B was not removed because it was part of a section/group staff. Adding
injury to the cause, I was not able comprehend the use of "Keep_alive"
commands.

Any help would be appreciated
Lucas
\version "2.24.3"

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

tempomapnormal = {
      \numericTimeSignature
      \repeat unfold 2 {
          \time 6/4 \repeat unfold 6 { s4 }
          \time 4/4 \repeat unfold 3 {s4 s4 s4 s4} \break
          \repeat unfold 3 {s4 s4 s4 s4}
          \time 5/4 \repeat unfold 5 {s4} \break
      }
}
drumkit = \drummode { 
    {
      
      \numericTimeSignature
      \time 6/4 
      <bd cymcb>4 \repeat unfold 5 r4
      \time 4/4
      \repeat unfold 6 {r4 r4 r4 r4}
      \time 5/4 r4 r4 r4 r4 r4
      %They have no difference. 
      %Both methods don't solve the issue.
      \time 6/4 \repeat unfold 6 r4
      \time 4/4 \repeat unfold 6 { r4 r4 r4 r4 }
      \time 5/4 \repeat unfold 5 r4
      %\repeat unfold 35 s4
    }
    
}
Melody = { << \relative c' 
    {
      %Just notes. No problem here.
      %\sectionLabel "Intro"
      r4 e' f e8 d4 e a,,8
      f''4 e8 d4
      c a,8 e''4 d8 c4
      b a,8 c'4 b8 a4. a,4 f'' e8 d4 e a,,8 f''4 e8 d4 c
      a,8 e''4 d8 c4 b a,8
      c' r8 gis a4 a,8 c'4 d
      %\break
      a,^\markup"Only the Melody staff should appear." e'' f
      e8 d4 e a,,8
      gis''4 f8 e4 d a,8 f''4
      e8 d4 c a,8 d'4
      c8 b4. a,4 
      %\break
      f''
      e8 d4 e a,,8 f''4
      e8 d4 c a,8 e''4
      d8 c4 b a,8 
      c' r8
      gis a4 a,8 <c g' >4 <d a' >
      
    }
    { \tempomapnormal }
>>}

Rhythm = {<< \relative c' 
    {
      %No problem here.
      <a e>4 \repeat unfold 5 {r4} 
      \repeat unfold 6 {r4 r4 r4 r4}
      r4 r4 r4 <c g>4 <d a>4 \break
      \repeat unfold 6 r4
      \repeat unfold 6 { r4 r4 r4 r4 }
      \repeat unfold 5 r4
    }
    { \tempomapnormal }
>>}
music = {<<
  
  { \new Staff \with { instrumentName="Melody" } \Melody }
  { \new Staff \with { instrumentName="Rhythm" } \Rhythm }
  { \new DrumStaff \with { instrumentName="Drumkit" } \drumkit }
>>}

\score { \music 
         \layout { 
           %I've enabled polymeter because the drums will play
           %a 7/8 against the main rhythm and melody.
           \enablePolymeter 
        } }

Attachment: Witchcraft-help.pdf
Description: Adobe PDF document

Reply via email to