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: David Kastrup
Subject: Re: print bass staff not always
Date: Thu, 24 Jan 2019 14:03:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Gianmaria Lari <address@hidden> writes:

> On Wed, 23 Jan 2019 at 14:53, David Kastrup <address@hidden> wrote:
>
>> Gianmaria Lari <address@hidden> writes:
>> [...]
>
>> To make lilypond print anyway a staff only containing rests [....]
>>
>
>
>> That does not look simpler than
>>
>> \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
>>
>>      ;; need this, as stanza numbers are items, and appear only once.
>>      stanza-number-interface
>>    )
>> } ...
>>
>
> Thanks a lot David!!!
> Here it is a complete example that compiles (just in case others need it).
>
> \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}
>
> \score
> {
>   \new PianoStaff <<
>     \new Staff \rh
>     \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
>       \RemoveEmptyStaves
>       \remove "Keep_alive_together_engraver"
>       \override VerticalAxisGroup.remove-first = ##t
>     }
>   }
> }

AFAIR, \PianoStaff \remove "Keep_alive_together_engraver" is the same as
\GrandStaff .  And \RemoveEmptyStaves \override
VerticalAxisGroup.remove-first = ##t is the same as
\RemoveAllEmptyStaves .

So it's more like you want

\score
{
  \new GrandStaff <<
    \new Staff \rh
    \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 {
      \GrandStaff
      \RemoveAllEmptyStaves
    }
  }
}


-- 
David Kastrup



reply via email to

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