lilypond-user
[Top][All Lists]
Advanced

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

repeating bar numbers and rehearsal marks in frenched score


From: Mark Knoop
Subject: repeating bar numbers and rehearsal marks in frenched score
Date: Tue, 26 Jul 2016 11:43:02 +0100

Further to this thread from 2013
(https://lists.gnu.org/archive/html/lilypond-user/2013-09/msg00857.html)
I've still not come up with a satisfactory method of duplicating a
dedicated BarNumber/RehearsalMark context at two or more vertical
positions in a frenched score. The context should only stay alive only
while one or more Staff contexts are alive within the same StaffGroup.

I was hoping to solve this by using the newer property
VerticalAxisGroup.remove-layer introduced by David Kastrup in 2014 as a
solution for issue 3518. However I can only get this to solve one
problem - that of making the instrument staves invisible to the
Keep_alive_together_engraver.

Is there any way that the VerticalAxisGroup.keep-alive-with array can be
set directly in scheme?

%%%%%%%%%%%%%
\version "2.19.45"
bars = \repeat unfold 12 { \mark \default R1*2 }
winds = \repeat unfold 96 { c''4 }
brass = \repeat unfold 24 { R1 }
brasstwo = { \repeat unfold 12 c'1 \repeat unfold 12 { R1 } }
strings = \repeat unfold 192 { c''8 }
#(set-global-staff-size 16)

\layout {
  \context {
    \Dynamics
    \consists Mark_engraver
    \consists Bar_number_engraver
  }
  \context {
    \Staff
    \RemoveEmptyStaves
  }
  \context {
    \Score
    \remove Mark_engraver
    \remove Bar_number_engraver
  }
}

\markup "remove-layer unset for all => bars context behaves correctly,
but b1 staff still alive in 2nd system when we want it dead"
\score {
  <<
    \new Dynamics { \bars }
    \new Staff = "winds" { \winds }
    \new StaffGroup \with {
      \consists Keep_alive_together_engraver
    } <<
      \new Dynamics \with {
        keepAliveInterfaces = #'()
        \override VerticalAxisGroup.remove-empty = ##t
        \override RehearsalMark.color = #red
      } { \bars }
      \new Staff = "brass" \with {
        shortInstrumentName = "b1"
      } { \brass }
      \new Staff = "brasstwo" \with {
        shortInstrumentName = "b2"
      } { \brasstwo }
    >>
    \new Dynamics { \bars }
    \new Staff = "strings" { \strings }
  >>
}

\markup "remove-layer bars=unset or '() or 1 or #f, b1=#f, b2=#f => b1
and b2 staves behave correctly, but bars context dies in 2nd system"
\score {
  <<
    \new Dynamics { \bars }
    \new Staff = "winds" { \winds }
    \new StaffGroup \with {
      \consists Keep_alive_together_engraver
    } <<
      \new Dynamics \with {
        keepAliveInterfaces = #'()
        \override VerticalAxisGroup.remove-empty = ##t
        \override RehearsalMark.color = #red
        %\override VerticalAxisGroup.remove-layer = 1
        %\override VerticalAxisGroup.remove-layer = #'()
        %\override VerticalAxisGroup.remove-layer = ##f
      } { \bars }
      \new Staff = "brass" \with {
        \override VerticalAxisGroup.remove-layer = ##f
      } { \brass }
      \new Staff = "brasstwo" \with {
        \override VerticalAxisGroup.remove-layer = ##f
      } { \brasstwo }
    >>
    \new Dynamics { \bars }
    \new Staff = "strings" { \strings }
  >>
}

--
Mark Knoop



reply via email to

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