lilypond-user
[Top][All Lists]
Advanced

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

Re: print bass staff not always


From: Gianmaria Lari
Subject: Re: print bass staff not always
Date: Thu, 24 Jan 2019 13:48:39 +0100



On Wed, 23 Jan 2019 at 16:31, Simon Albrecht <address@hidden> wrote:
On 22.01.19 09:56, Gianmaria Lari wrote:
>
> I found an issue with \RemoveEmptyStaves. It also remove \Dynamics.

Just write a layout block like this:
\layout {
   \context {
     \PianoStaff
     \remove Keep_alive_together_engraver
   }
   \context {
     \Staff
     \RemoveAllEmptyStaves
   }
}

This is the use case for which I introduced the latter command, and if
you apply it specifically to Staff contexts, Dynamics will not be affected.

Super Simon, thanks a lot!

Here it is a complete example that compiles.
 
\version "2.19.82"
rh = { \clef treble 
       a1 b1 c'1 d'1 \break
       a1 b1 c'1 d'1 \break
       a1 b1 c'1 d'1 \break}

lh = { \clef bass 
       r1 r r r 
       a1 a a a 
       s1 s s s}

dynamics = {
  s1\p s1 s1 s1
  s1\f s1 s1 s1
  s1\sf s1 s1 s1
}

\score 
  \new PianoStaff <<
    \new Staff \rh
    \new Dynamics \dynamics
    \new Staff \with {
      keepAliveInterfaces = 
      #'( rest-interface bass-figure-interface chord-name-interface cluster-beacon-interface
          fret-diagram-interface lyric-syllable-interface note-head-interface tab-note-head-interface lyric-interface
          percent-repeat-item-interface percent-repeat-interface stanza-number-interface
          )
    } \lh
  >>
  \layout {
    \context {
      \PianoStaff
      \remove Keep_alive_together_engraver
    }
    \context {
      \Staff
      \RemoveAllEmptyStaves
    }
  }
}

reply via email to

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