\RemoveEmptyStaves for drums?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

\RemoveEmptyStaves for drums?

Molly Preston
Hello,

I am making parts and have glockenspiel and the non-pitched percussion on one part.
However I can't seem to get it to \RemoveEmptyStaves for the \DrumStaff. This is what I tried.

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

}

Thanks!

Molly

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: \RemoveEmptyStaves for drums?

Kieren MacMillan
Hi Molly,

> However I can't seem to get it to \RemoveEmptyStaves for the \DrumStaff. This is what I tried.
>
> \layout {
> \context {
> \Staff
> \RemoveEmptyStaves
> \DrumStaff
> \RemoveEmptyStaves
>   }

To be honest, I'm not even sure *what* that would do…   =\

Here's what I just tried, and it seems to work:

%%%%  SNIPPET BEGINS
\version "2.19"

\layout {
  \context {
    \DrumStaff
    \RemoveAllEmptyStaves
  }
}

<<
  \new DrumStaff << R1 >>
  \new Staff << c''1 >>
>>
%%%%  SNIPPET ENDS

Hope that helps!
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: \RemoveEmptyStaves for drums?

tisimst
Hi, Molly!

On Sat, Aug 5, 2017 at 7:34 PM, Kieren MacMillan <[hidden email]> wrote:

> However I can't seem to get it to \RemoveEmptyStaves for the \DrumStaff. This is what I tried.
>
> \layout {
> \context {
> \Staff
> \RemoveEmptyStaves
> \DrumStaff
> \RemoveEmptyStaves
>   }

To be honest, I'm not even sure *what* that would do…   =\

Here's what I just tried, and it seems to work:

%%%%  SNIPPET BEGINS
\version "2.19"

\layout {
  \context {
    \DrumStaff
    \RemoveAllEmptyStaves
  }
}

The problem you ran into is that you were combining things that shouldn't have been. In other words, \Staff and \DrumStaff need to be in their own \context block, as Kieren hinted at. More fully, this should work for you:

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

HTH,
Abraham 

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Loading...