lilypond-user
[Top][All Lists]
Advanced

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

Re: unhiding a hidden staff at the NEXT line break (instead of previous


From: Keith OHara
Subject: Re: unhiding a hidden staff at the NEXT line break (instead of previous line break)
Date: Sat, 15 Dec 2012 06:38:44 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

<nothingwavering <at> gmail.com> writes:
> 
> Anyone know how I can get Lilypond to unhide a staff at the NEXT line break?

No.

It looks like you have a part for a cello section with the form
    unison  |A|  simple-divisi  |B|  complex-divisi
where the complex-divisi music demands a separate staff for each part.

If you put your wished-for \showStaffNextBreak at |A| then you would
be assuming there is at least one line break between |A| and |B|.

Placing your \showStaff at |B| on the two separate-part staves makes more
sense.   But I do not see a way to stop the combined-part staff at the 
same linebreak where the seaparate-part staves need to begin.  For a dirty
way to get your job done, you could mark the combined-part staff as 
removable starting _almost_one_line_ before |B| (see below).

> hideStaff = \set Staff.keepAliveInterfaces = #'()
> This ends up working quite well for 
> * short to moderate-length pieces 
> * where only one score is to be created from music 
>   so annotated with \hideStaff and \showStaff 
> * and where explicit line breaks (\beak and \noBreak) are used.

Without the transition from chords to separate staves, you can use 
RemoveEmptyStaves to set the second staff, with automatic line-breaking
<http://lists.gnu.org/archive/html/lilypond-user/2012-12/msg00061.html>
  
\version "2.16.0"
\paper { #(set-paper-size "a6") indent = 1.0\cm short-indent = 1.2\cm }

letStaffVanish = \set Staff.keepAliveInterfaces = #'()
showStaff = \unset Staff.keepAliveInterfaces

violinII = \relative c' {
  c4 d e f \letStaffVanish g f e d 
  <c e>-"divisi" <d f> <e g> <f a>
  \stopStaff s1 \startStaff
  c4-"unison" d e f g f e d
  \showStaff c d e f c1 
  \bar "|."}

violinIIa = \relative c' {
  \letStaffVanish \quoteDuring "violinII" s1*2
  e4 f g a \showStaff b g d g
  \letStaffVanish \quoteDuring "violinII" s1*4
}

violinIIb = \relative c' {
  \letStaffVanish \quoteDuring #"violinII" s1*2
  c4 d e f \showStaff g b d b 
  \letStaffVanish \quoteDuring #"violinII" s1*4 }

\addQuote "violinII" \violinII

\new StaffGroup <<
  \new Staff \with {
    instrumentName = "Vn 1"
    shortInstrumentName = "Vn1"  
  } \repeat unfold 8 c''1
  \new GrandStaff \with {
    instrumentName = "Vn 2"
    shortInstrumentName = "Vn2"  
  } <<
    \new Staff \with { shortInstrumentName="outer"} \new Voice \violinIIa
    \new Staff \violinII
    \new Staff \with {shortInstrumentName="inner"} \new Voice \violinIIb >> >>
\layout {
  \context {
    \Staff \RemoveEmptyStaves 
    \override VerticalAxisGroup #'remove-first = ##t }}




reply via email to

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