\version "2.19.82" #(define-markup-command (arrow-at-angle layout props angle length fill) (number? number? boolean?) (ly:stencil-rotate (interpret-markup layout props (markup #:concat (#:draw-line (cons length 0) #:hspace -0.1 #:arrow-head X RIGHT fill))) angle -1 0)) splitStaffMarkup = \markup \with-dimensions #'(0 . 0) #'(0 . 0) \overlay { \arrow-at-angle #45 #(sqrt 8) ##t \arrow-at-angle #-45 #(sqrt 8) ##t } splitStaff = #(define-music-function (grob-name) (string?) #{ { \once \override Staff.$grob-name stencil = #(grob-transformer 'stencil (lambda (grob orig) (if (= LEFT (ly:item-break-dir grob)) (ly:stencil-combine-at-edge orig X RIGHT (grob-interpret-markup grob splitStaffMarkup) (if (equal? "TimeSignature" grob-name) 0.5 0)) orig))) \break } #} ) convDownStaff = #(define-music-function (grob-name) (string?) #{ { \once \override Staff.$grob-name stencil = #(grob-transformer 'stencil (lambda (grob orig) (if (= LEFT (ly:item-break-dir grob)) (ly:stencil-combine-at-edge orig X RIGHT (grob-interpret-markup grob #{ \markup \with-dimensions #'(0 . 0) #'(0 . 0) \arrow-at-angle #-45 #(sqrt 8) ##t #}) (if (equal? "TimeSignature" grob-name) 0.5 0)) orig))) \break } #} ) convUpStaff = #(define-music-function (grob-name) (string?) #{ { \once \override Staff.$grob-name stencil = #(grob-transformer 'stencil (lambda (grob orig) (if (= LEFT (ly:item-break-dir grob)) (ly:stencil-combine-at-edge orig X RIGHT (grob-interpret-markup grob #{ \markup \with-dimensions #'(0 . 0) #'(0 . 0) \arrow-at-angle #45 #(sqrt 8) ##t #}) (if (equal? "TimeSignature" grob-name) 0.5 0)) orig))) \break } #} ) \paper { ragged-right = ##t short-indent = 10\mm } separateSopranos = { \set Staff.instrumentName = "AI AII" \set Staff.shortInstrumentName = "AI AII" \tag #'no-time-change \splitStaff BarLine \tag #'time-change \splitStaff TimeSignature \change Staff = "up" } convSopranos = { \tag #'no-time-change \convDownStaff BarLine \tag #'time-change \convDownStaff TimeSignature \change Staff = "shared" \set Staff.instrumentName = "S A" \set Staff.shortInstrumentName = "S A" } sI = { \voiceOne \repeat unfold 4 f''2 \separateSopranos \tag #'time-change \time 4/2 \repeat unfold 4 g''2 \convSopranos \tag #'time-change \time 4/4 \repeat unfold 4 c''2 } sII = { s1*2 \voiceTwo \change Staff = "up" \repeat unfold 4 d''2 } aI = { \voiceTwo \repeat unfold 4 a'2 \voiceOne \repeat unfold 4 b'2 \tag #'no-time-change \convUpStaff BarLine \tag #'time-change \convUpStaff TimeSignature \voiceTwo \repeat unfold 4 g'2 } aII = { s1*2 \voiceTwo \repeat unfold 4 g'2 } ten = { \voiceOne \repeat unfold 4 c'2 \repeat unfold 4 d'2 \repeat unfold 4 c'2 } bas = { \voiceTwo \repeat unfold 4 f2 \repeat unfold 4 g2 \repeat unfold 4 c2 } \score { \keepWithTag #'(no-time-change) << \new ChoirStaff << \new Staff = up \with { instrumentName = "SI SII" shortInstrumentName = "SI SII" } { s1*4 } \new Staff = shared \with { instrumentName = "S A" shortInstrumentName = "S A" } << \new Voice = sopI \sI \new Voice = sopII \sII \new Voice = altI \aI \new Voice = altII \aII >> \new Lyrics \with { alignBelowContext = up } \lyricsto sopII { e f g h } \new Lyrics \lyricsto altI { a b c d e f g h i j k l } \new Staff = men \with { instrumentName = "T B" shortInstrumentName = "T B" } << \clef F \new Voice = ten \ten \new Voice = bas \bas >> \new Lyrics \lyricsto bas { a b c d e f g h i j k l } >> >> \layout { \context { \Staff \RemoveEmptyStaves \override VerticalAxisGroup.remove-first = ##t } } } \score { \keepWithTag #'(time-change) << \new ChoirStaff << \new Staff = up \with { instrumentName = "SI SII" shortInstrumentName = "SI SII" } { s1*4 } \new Staff = shared \with { instrumentName = "S A" shortInstrumentName = "S A" } << \new Voice = sopI \sI \new Voice = sopII \sII \new Voice = altI \aI \new Voice = altII \aII >> \new Lyrics \with { alignBelowContext = up } \lyricsto sopII { e f g h } \new Lyrics \lyricsto altI { a b c d e f g h i j k l } \new Staff = men \with { instrumentName = "T B" shortInstrumentName = "T B" } << \clef F \new Voice = ten \ten \new Voice = bas \bas >> \new Lyrics \lyricsto bas { a b c d e f g h i j k l } >> >> \layout { \context { \Staff \RemoveEmptyStaves \override VerticalAxisGroup.remove-first = ##t } } }