lilypond-user
[Top][All Lists]
Advanced

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

Re: remove first empty staff and ambitus


From: Thomas Morley
Subject: Re: remove first empty staff and ambitus
Date: Sun, 5 Oct 2014 15:30:26 +0200

2014-10-02 20:50 GMT+02:00 Kai Lautenschläger <address@hidden>:
> Dear list,
>
> a few weeks ago I asked about removing the first empty staff in choir music 
> and inserting the ambitus in the n-th system for selected voices. From the 
> answers you gave, I could built the following example, which solved a whole 
> set of problems.
>
> Now, can anyone come up with an idea how to remove the upper staff in the 
> first system? I’m grateful for any hints. Thanks
>
> best regards, Kai
>
>  \version "2.19.15"
>
> musicI = \relative { \repeat unfold 5 { c'4^"first voice" b' c, g' } }
> musicII = \relative { \repeat unfold 5 { c''4^"second voice" b' c, g' } }
> ambitus = \with { \consists "Ambitus_engraver" }
> noAmbitusAtEnd = {
>   \override Voice.AmbitusNoteHead.break-visibility = ##(#f #f #t)
>   \override Voice.AmbitusLine.break-visibility = ##(#f #f #t)
> }
>
> \score {
>   <<
>     \new Staff = "StaffI"
>     \new Voice = "VoiceI" { s1*5 \break \new Voice \ambitus \musicI }
>     \new Staff = "StaffII"
>     \new Voice = "VoiceII" \ambitus { \musicII }
>   >>
>   \layout {
>     \context {
>       \Staff
>       \RemoveEmptyStaves

Delete "Staff" in the following command.
You are adding something to the Staff-context-definition here.
LilyPond will be confused by repeating the Staff-context, although you
are in there already.

>       \override Staff.VerticalAxisGroup.remove-first = ##t

I'm surprised the following works, because noAmbitusAtEnd is defined
for Voice-context

>       \noAmbitusAtEnd
>
>     }
>   }
> }


Though the main problem is that the ambitus appears end-of-line at a
line-break here This adds note-heads to this lines. And as default
this will cause this line alive.
Making them invisible via break-visibility is not enough, they're still there.

You could try to use settings for keep-AliveInterfaces as described here:
http://lsr.di.unimi.it/LSR/Item?id=312

Though, no clue if it will work in real life scores:

\version "2.19.13"

keep-AliveInterfaces =
#'(
  rhythmic-grob-interface
  lyric-interface
  stanza-number-interface
  percent-repeat-interface
)

musicI = \relative { \repeat unfold 5 { c'4^"first voice" b' c, g' } }
musicII = \relative { \repeat unfold 5 { c''4_"second voice" b' c, g' } }
ambitus = \with { \consists "Ambitus_engraver" }
noAmbitusAtEnd = {
  \override Staff.AmbitusNoteHead.break-visibility = ##(#f #f #t)
  \override Staff.AmbitusLine.break-visibility = ##(#f #f #t)
}

\score {
  <<
    \new Staff = "StaffI"
    \new Voice = "VoiceI" {
            \set Staff.keepAliveInterfaces = #'()
            s1*5
            \break
            \set Staff.keepAliveInterfaces = \keep-AliveInterfaces
            \new Voice \ambitus
            \musicI
    }
    \new Staff = "StaffII"
    \new Voice = "VoiceII" \ambitus {
            \musicII
            s1*5
    }
  >>
  \layout {
    \noAmbitusAtEnd
    \context {
      \Staff
      \RemoveEmptyStaves
      \override VerticalAxisGroup.remove-first = ##t
    }
  }
}



HTH,
  Harm



reply via email to

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