%% Generated by lilypond-book
%% Options: [book,exampleindent=10.16\mm,indent=20\mm,line-width=160\mm,no-tagline,paper-height=845.047\pt,paper-width=160\mm,papersize='(cons (* 160 mm) (* 845.047 pt))]
\include "lilypond-book-preamble.ly"


% ****************************************************************
% Start cut-&-pastable-section
% ****************************************************************

#(ly:set-option 'eps-box-padding 3.000000)



\paper {
  #(set-paper-size '(cons (* 160 mm) (* 845.047 pt)))
  indent = 20\mm
}

\layout {
  
}




% ****************************************************************
% ly snippet:
% ****************************************************************
\sourcefilename "/lilypond-2.26.0/input/regression/musicxml/41c-StaffGroups.xml"
\sourcefileline 0
\version "2.26.0"
% automatically converted by musicxml2ly from -
\pointAndClickOff

%% additional definitions required by the score:
% Change the number of staff lines to `num-lines`.
%
% The argument `clef` makes the function emit a clef with the given
% name.  If `clef` contains the substring `"percussion"` or `"tab"`,
% use both even and odd staff line positions.  If set to `""`, do the
% same but don't set `Staff.clefPosition` (which means that no clef
% gets triggered).  If `clef` is set to any other value, use even
% staff line positions only and set `Staff.clefPosition`, which
% triggers a clef if its value changes.
%
% The optional argument `properties` is an alist of properties to
% control the appearance of both the staff and the clef:
%
% * `details` is a list of staff line numbers that should be
%   displayed.  An empty list suppresses any display of staff lines;
%   omitting the argument means to display all lines.
% * `staff-color` holds the color of the staff.
% * `clef-font-size` holds the font size of the clef
% * `clef-color` holds the color of the clef.
%
% \staffLines [<properties>] <clef> <num-lines>

staffLines =
#(define-music-function (properties clef num-lines)
                        ((alist? '()) string? index?)
   (let* ((details (assoc-get 'details properties #f))
          (staff-color (assoc-get 'staff-color properties #f))
          (clef-color (assoc-get 'clef-color properties #f))
          (clef-font-size (assoc-get 'clef-font-size properties #f))
          (lines (or details (iota num-lines 1)))
          (only-even-pos (not (or (equal? clef "")
                                  (string-contains clef "percussion")
                                  (string-contains clef "tab"))))
          (offset (if only-even-pos
                      (if (even? num-lines) 1 0)
                      0))
          ;; MusicXML counts staff lines from the bottom.
          (delta (- -1 num-lines offset))
          (positions (filter (lambda (x) (<= x num-lines))
                             lines))
          (positions (map (lambda (x) (+ delta (* x 2)))
                      positions)))
     #{
       \stopStaff

       #(if staff-color
            #{
              \once \override Staff.StaffSymbol.color = #staff-color
            #})
       #(if clef-color
            #{
              \once \override Staff.Clef.color = #clef-color
            #})
       #(if clef-font-size
            #{
              \once \override Staff.Clef.font-size = #clef-font-size
            #})

       #(if (equal? clef "")
            #{
              \unset Staff.middleCPosition
              \unset Staff.middleCClefPosition
              % To suppress the clef inserted by default by LilyPond at the
              % beginning of a piece.
              \once \omit Staff.Clef
            #}
            #{ \clef #clef #})

       \override Staff.StaffSymbol.line-positions = #positions

       \applyContext
       #(lambda (ctx)
          (let* ((c (ly:context-find ctx 'Staff))
                 (clef-p (ly:context-property c 'clefPosition))
                 (middle-c-p (ly:context-property c 'middleCPosition))
                 (middle-c-clef-p (ly:context-property c 'middleCClefPosition))
                 (use-offset (not (string-contains clef "percussion")))
                 (delta (+ delta (if use-offset 6 0))))
            (when only-even-pos
              (ly:context-set-property! c 'clefPosition (+ clef-p delta))
              (ly:context-set-property! c 'forceClef #t))
            (ly:context-set-property! c 'middleCPosition (+ middle-c-p delta))
            (ly:context-set-property! c 'middleCClefPosition
                                      (+ middle-c-clef-p delta))))
       \startStaff
     #}))


\header {
  texidoc = "A huge orchestra score with 25 parts and different kinds of nested,
    bracketed groups, using quite a small staff size. Each part/group is
    assigned a name and an abbreviation (if necessary) to be shown before the
    staff. Also, most groups show unbroken bar lines, while the bar lines are
    broken between the groups.

    Both the harp and the organ are multi-staff parts; the latter also uses a
    <part-symbol> element to set up the brace delimiter (and the non-contiguous
    bar line of the three staves)."
}
#(set-global-staff-size 9.958464566929134)
\paper {
  tagline = ##f
}
\layout {
  \context {
    \Staff
    printKeyCancellation = ##f
  }
  \context {
    \Score
    autoBeaming = ##f
  }
}
PartPOneVoiceOne = \relative b' {
  \clef "treble^8" \time 4/4 \key c \major \transposition c'' b4 r4 r2 \bar "|."
}

PartPTwoVoiceOne = \relative f' {
  \clef "treble" \time 4/4 \key c \major f4 r4 r2 \bar "|."
}

PartPThreeVoiceOne = \relative a' {
  \clef "treble" \time 4/4 \key c \major a4 r4 r2 \bar "|."
}

PartPFourVoiceOne = \relative c'' {
  \clef "treble" \time 4/4 \key g \major \transposition f c4 r4 r2 \bar "|."
}

PartPFiveVoiceOne = \relative b' {
  \clef "treble" \time 4/4 \key a \major \transposition es' b4 r4 r2 \bar "|."
}

PartPSixVoiceOne = \relative fis' {
  \clef "treble" \time 4/4 \key d \major \transposition bes fis4 r4 r2 \bar "|."
}

PartPSevenVoiceOne = \relative b' {
  \clef "treble" \time 4/4 \key d \major \transposition bes, b4 r4 r2 \bar "|."
}

PartPEightVoiceOne = \relative d {
  \clef "bass" \time 4/4 \key c \major d4 r4 r2 \bar "|."
}

PartPNineVoiceOne = \relative b, {
  \clef "bass_8" \time 4/4 \key c \major \transposition c b4 r4 r2 \bar "|."
}

PartPOneZeroVoiceOne = \relative e'' {
  \clef "treble" \time 4/4 \key g \major \transposition f e4 r4 r2 \bar "|."
}

PartPOneOneVoiceOne = \relative g' {
  \clef "treble" \time 4/4 \key g \major \transposition f g4 r4 r2 \bar "|."
}

PartPOneTwoVoiceOne = \relative f' {
  \clef "treble" \time 4/4 \key c \major f4 r4 r2 \bar "|."
}

PartPOneThreeVoiceOne = \relative a' {
  \clef "treble" \time 4/4 \key c \major a4 r4 r2 \bar "|."
}

PartPOneFourVoiceOne = \relative b, {
  \clef "bass" \time 4/4 \key c \major b4 r4 r2 \bar "|."
}

PartPOneFiveVoiceOne = \relative e {
  \clef "bass" \time 4/4 \key c \major e4 r4 r2 \bar "|."
}

PartPOneSixVoiceOne = \relative e {
  \clef "bass" \time 4/4 \key c \major e4 r4 r2 \bar "|."
}

PartPOneSevenVoiceOne = \relative f {
  \clef "bass" \time 4/4 \key c \major f4 r4 r2 \bar "|."
}

PartPOneEightVoiceOne = \relative e'' {
  \staffLines "percussion" 5 \time 4/4 \key c \major e4 r4 r2 \bar "|."
}

PartPOneNineVoiceOne = \relative d'' {
  \clef "treble" \time 4/4 \key c \major d4 r4 r2 \bar "|."
}

PartPOneNineVoiceTwo = \relative a, {
  \clef "bass" \time 4/4 \key c \major a4 r4 r2 \bar "|."
}

PartPTwoZeroVoiceOne = \relative g' {
  \clef "treble" \time 4/4 \key c \major g4 r4 r2 \bar "|."
}

PartPTwoZeroVoiceTwo = \relative e {
  \clef "bass" \time 4/4 \key c \major e4 r4 r2 \bar "|."
}

PartPTwoZeroVoiceThree = \relative e {
  \clef "bass" \time 4/4 \key c \major e4 r4 r2 \bar "|."
}

PartPTwoOneVoiceOne = \relative e'' {
  \clef "treble" \time 4/4 \key c \major e4 r4 r2 \bar "|."
}

PartPTwoTwoVoiceOne = \relative f' {
  \clef "treble" \time 4/4 \key c \major f4 r4 r2 \bar "|."
}

PartPTwoThreeVoiceOne = \relative c' {
  \clef "alto" \time 4/4 \key c \major c4 r4 r2 \bar "|."
}

PartPTwoFourVoiceOne = \relative c {
  \clef "bass" \time 4/4 \key c \major c4 r4 r2 \bar "|."
}

PartPTwoFiveVoiceOne = \relative c {
  \clef "bass" \time 4/4 \key c \major \transposition c c4 r4 r2 \bar "|."
}


% The score definition
\book {
  \score {
    <<
      \new StaffGroup <<
        \new Staff = "P1" <<
          \set Staff.instrumentName = "Piccolo"
          \set Staff.shortInstrumentName = "Picc."
          \context Staff <<
            \mergeDifferentlyDottedOn
            \mergeDifferentlyHeadedOn
            \context Voice = "PartPOneVoiceOne" {
              \PartPOneVoiceOne
            }
          >>
        >>
        \new StaffGroup \with {
          \consists "Instrument_name_engraver"
        } <<
          \set StaffGroup.instrumentName = "Flute"
          \set StaffGroup.shortInstrumentName = "Fl."
          \new Staff = "P2" <<
            \set Staff.instrumentName = \markup \concat { \center-column { "1"
                "2" } }
            \override Staff.InstrumentName.self-alignment-X = #RIGHT
            \override Staff.InstrumentName.padding = #1
            \context Staff <<
              \mergeDifferentlyDottedOn
              \mergeDifferentlyHeadedOn
              \context Voice = "PartPTwoVoiceOne" {
                \PartPTwoVoiceOne
              }
            >>
          >>
        >>
        \new Staff = "P3" <<
          \set Staff.instrumentName = "Oboe"
          \set Staff.shortInstrumentName = "Ob."
          \context Staff <<
            \mergeDifferentlyDottedOn
            \mergeDifferentlyHeadedOn
            \context Voice = "PartPThreeVoiceOne" {
              \PartPThreeVoiceOne
            }
          >>
        >>
        \new Staff = "P4" <<
          \set Staff.instrumentName = "English Horn"
          \set Staff.shortInstrumentName = "E. Hn."
          \context Staff <<
            \mergeDifferentlyDottedOn
            \mergeDifferentlyHeadedOn
            \context Voice = "PartPFourVoiceOne" {
              \PartPFourVoiceOne
            }
          >>
        >>
        \new Staff = "P5" <<
          \set Staff.instrumentName = "Clarinet in Eb"
          \set Staff.shortInstrumentName = "Eb Cl."
          \context Staff <<
            \mergeDifferentlyDottedOn
            \mergeDifferentlyHeadedOn
            \context Voice = "PartPFiveVoiceOne" {
              \PartPFiveVoiceOne
            }
          >>
        >>
        \new StaffGroup \with {
          \consists "Instrument_name_engraver"
        } <<
          \set StaffGroup.instrumentName = "Clarinet in Bb"
          \set StaffGroup.shortInstrumentName = "Bb Cl."
          \new Staff = "P6" <<
            \set Staff.instrumentName = \markup \concat { \center-column { "1"
                "2" } }
            \override Staff.InstrumentName.self-alignment-X = #RIGHT
            \override Staff.InstrumentName.padding = #1
            \context Staff <<
              \mergeDifferentlyDottedOn
              \mergeDifferentlyHeadedOn
              \context Voice = "PartPSixVoiceOne" {
                \PartPSixVoiceOne
              }
            >>
          >>
        >>
        \new Staff = "P7" <<
          \set Staff.instrumentName = "Bass Clarinet"
          \set Staff.shortInstrumentName = "B. Cl."
          \context Staff <<
            \mergeDifferentlyDottedOn
            \mergeDifferentlyHeadedOn
            \context Voice = "PartPSevenVoiceOne" {
              \PartPSevenVoiceOne
            }
          >>
        >>
        \new StaffGroup \with {
          \consists "Instrument_name_engraver"
        } <<
          \set StaffGroup.instrumentName = "Bassoon"
          \set StaffGroup.shortInstrumentName = "Bsn."
          \new Staff = "P8" <<
            \set Staff.instrumentName = \markup \concat { \center-column { "1"
                "2" } }
            \override Staff.InstrumentName.self-alignment-X = #RIGHT
            \override Staff.InstrumentName.padding = #1
            \context Staff <<
              \mergeDifferentlyDottedOn
              \mergeDifferentlyHeadedOn
              \context Voice = "PartPEightVoiceOne" {
                \PartPEightVoiceOne
              }
            >>
          >>
        >>
        \new Staff = "P9" <<
          \set Staff.instrumentName = "Contrabassoon"
          \set Staff.shortInstrumentName = "C. Bn."
          \context Staff <<
            \override Staff.BarLine.allow-span-bar = ##f
            \mergeDifferentlyDottedOn
            \mergeDifferentlyHeadedOn
            \context Voice = "PartPNineVoiceOne" {
              \PartPNineVoiceOne
            }
          >>
        >>
      >>
      \new StaffGroup <<
        \new StaffGroup \with {
          \consists "Instrument_name_engraver"
          systemStartDelimiter = #'SystemStartSquare
        } <<
          \set StaffGroup.instrumentName = "Horn in F"
          \set StaffGroup.shortInstrumentName = "F Hn."
          \new Staff = "P10" <<
            \set Staff.instrumentName = "1"
            \override Staff.InstrumentName.self-alignment-X = #RIGHT
            \override Staff.InstrumentName.padding = #1
            \context Staff <<
              \mergeDifferentlyDottedOn
              \mergeDifferentlyHeadedOn
              \context Voice = "PartPOneZeroVoiceOne" {
                \PartPOneZeroVoiceOne
              }
            >>
          >>
          \new Staff = "P11" <<
            \set Staff.instrumentName = "2"
            \override Staff.InstrumentName.self-alignment-X = #RIGHT
            \override Staff.InstrumentName.padding = #1
            \context Staff <<
              \mergeDifferentlyDottedOn
              \mergeDifferentlyHeadedOn
              \context Voice = "PartPOneOneVoiceOne" {
                \PartPOneOneVoiceOne
              }
            >>
          >>
        >>
        \new StaffGroup \with {
          \consists "Instrument_name_engraver"
          systemStartDelimiter = #'SystemStartSquare
        } <<
          \set StaffGroup.instrumentName = "Trumpet in C"
          \set StaffGroup.shortInstrumentName = "C Tpt."
          \new Staff = "P12" <<
            \set Staff.instrumentName = "1"
            \override Staff.InstrumentName.self-alignment-X = #RIGHT
            \override Staff.InstrumentName.padding = #1
            \context Staff <<
              \mergeDifferentlyDottedOn
              \mergeDifferentlyHeadedOn
              \context Voice = "PartPOneTwoVoiceOne" {
                \PartPOneTwoVoiceOne
              }
            >>
          >>
          \new Staff = "P13" <<
            \set Staff.instrumentName = "2"
            \override Staff.InstrumentName.self-alignment-X = #RIGHT
            \override Staff.InstrumentName.padding = #1
            \context Staff <<
              \mergeDifferentlyDottedOn
              \mergeDifferentlyHeadedOn
              \context Voice = "PartPOneThreeVoiceOne" {
                \PartPOneThreeVoiceOne
              }
            >>
          >>
        >>
        \new StaffGroup \with {
          \consists "Instrument_name_engraver"
          systemStartDelimiter = #'SystemStartSquare
        } <<
          \set StaffGroup.instrumentName = "Trombone"
          \set StaffGroup.shortInstrumentName = "Tbn."
          \new Staff = "P14" <<
            \set Staff.instrumentName = "1"
            \override Staff.InstrumentName.self-alignment-X = #RIGHT
            \override Staff.InstrumentName.padding = #1
            \context Staff <<
              \mergeDifferentlyDottedOn
              \mergeDifferentlyHeadedOn
              \context Voice = "PartPOneFourVoiceOne" {
                \PartPOneFourVoiceOne
              }
            >>
          >>
          \new Staff = "P15" <<
            \set Staff.instrumentName = "2"
            \override Staff.InstrumentName.self-alignment-X = #RIGHT
            \override Staff.InstrumentName.padding = #1
            \context Staff <<
              \mergeDifferentlyDottedOn
              \mergeDifferentlyHeadedOn
              \context Voice = "PartPOneFiveVoiceOne" {
                \PartPOneFiveVoiceOne
              }
            >>
          >>
        >>
        \new Staff = "P16" <<
          \set Staff.instrumentName = "Tuba"
          \context Staff <<
            \override Staff.BarLine.allow-span-bar = ##f
            \mergeDifferentlyDottedOn
            \mergeDifferentlyHeadedOn
            \context Voice = "PartPOneSixVoiceOne" {
              \PartPOneSixVoiceOne
            }
          >>
        >>
      >>
      \new Staff = "P17" <<
        \set Staff.instrumentName = "Timpani"
        \set Staff.shortInstrumentName = "Timp."
        \context Staff <<
          \override Staff.BarLine.allow-span-bar = ##f
          \mergeDifferentlyDottedOn
          \mergeDifferentlyHeadedOn
          \context Voice = "PartPOneSevenVoiceOne" {
            \PartPOneSevenVoiceOne
          }
        >>
      >>
      \new Staff = "P18" <<
        \set Staff.instrumentName = "Percussion"
        \set Staff.shortInstrumentName = "Perc."
        \context Staff <<
          \override Staff.BarLine.allow-span-bar = ##f
          \mergeDifferentlyDottedOn
          \mergeDifferentlyHeadedOn
          \context Voice = "PartPOneEightVoiceOne" {
            \PartPOneEightVoiceOne
          }
        >>
      >>
      \new PianoStaff <<
        \set PianoStaff.instrumentName = "Harp"
        \set PianoStaff.shortInstrumentName = "Hp."
        \context Staff = "1" <<
          \mergeDifferentlyDottedOn
          \mergeDifferentlyHeadedOn
          \context Voice = "PartPOneNineVoiceOne" {
            \PartPOneNineVoiceOne
          }
        >>
        \context Staff = "2" <<
          \override Staff.BarLine.allow-span-bar = ##f
          \mergeDifferentlyDottedOn
          \mergeDifferentlyHeadedOn
          \context Voice = "PartPOneNineVoiceTwo" {
            \PartPOneNineVoiceTwo
          }
        >>
      >>
      \new StaffGroup <<
        \new PianoStaff \with {
          systemStartDelimiter = #'SystemStartBar
        } <<
          \set PianoStaff.instrumentName = "Organ"
          \set PianoStaff.shortInstrumentName = "Org."
          \new PianoStaff <<
            \context Staff = "1" <<
              \mergeDifferentlyDottedOn
              \mergeDifferentlyHeadedOn
              \context Voice = "PartPTwoZeroVoiceOne" {
                \PartPTwoZeroVoiceOne
              }
            >>
            \context Staff = "2" <<
              \override Staff.BarLine.allow-span-bar = ##f
              \mergeDifferentlyDottedOn
              \mergeDifferentlyHeadedOn
              \context Voice = "PartPTwoZeroVoiceTwo" {
                \PartPTwoZeroVoiceTwo
              }
            >>
          >>
          \context Staff = "3" <<
            \override Staff.BarLine.allow-span-bar = ##f
            \mergeDifferentlyDottedOn
            \mergeDifferentlyHeadedOn
            \context Voice = "PartPTwoZeroVoiceThree" {
              \PartPTwoZeroVoiceThree
            }
          >>
        >>
      >>
      \new StaffGroup <<
        \new StaffGroup \with {
          \consists "Instrument_name_engraver"
          systemStartDelimiter = #'SystemStartSquare
        } <<
          \set StaffGroup.instrumentName = "Violin"
          \set StaffGroup.shortInstrumentName = "Vln."
          \new Staff = "P21" <<
            \set Staff.instrumentName = "I"
            \override Staff.InstrumentName.self-alignment-X = #RIGHT
            \override Staff.InstrumentName.padding = #1
            \context Staff <<
              \mergeDifferentlyDottedOn
              \mergeDifferentlyHeadedOn
              \context Voice = "PartPTwoOneVoiceOne" {
                \PartPTwoOneVoiceOne
              }
            >>
          >>
          \new Staff = "P22" <<
            \set Staff.instrumentName = "II"
            \override Staff.InstrumentName.self-alignment-X = #RIGHT
            \override Staff.InstrumentName.padding = #1
            \context Staff <<
              \mergeDifferentlyDottedOn
              \mergeDifferentlyHeadedOn
              \context Voice = "PartPTwoTwoVoiceOne" {
                \PartPTwoTwoVoiceOne
              }
            >>
          >>
        >>
        \new Staff = "P23" <<
          \set Staff.instrumentName = "Viola"
          \set Staff.shortInstrumentName = "Vla."
          \context Staff <<
            \mergeDifferentlyDottedOn
            \mergeDifferentlyHeadedOn
            \context Voice = "PartPTwoThreeVoiceOne" {
              \PartPTwoThreeVoiceOne
            }
          >>
        >>
        \new Staff = "P24" <<
          \set Staff.instrumentName = "Cello"
          \set Staff.shortInstrumentName = "Vc."
          \context Staff <<
            \mergeDifferentlyDottedOn
            \mergeDifferentlyHeadedOn
            \context Voice = "PartPTwoFourVoiceOne" {
              \PartPTwoFourVoiceOne
            }
          >>
        >>
        \new Staff = "P25" <<
          \set Staff.instrumentName = "Contrabass"
          \set Staff.shortInstrumentName = "Cb."
          \context Staff <<
            \override Staff.BarLine.allow-span-bar = ##f
            \mergeDifferentlyDottedOn
            \mergeDifferentlyHeadedOn
            \context Voice = "PartPTwoFiveVoiceOne" {
              \PartPTwoFiveVoiceOne
            }
          >>
        >>
      >>
    >>
    \layout {}
    % To create MIDI output, uncomment the following line:
    % \midi { \tempo 4 = 100 }
  }
}




% ****************************************************************
% end ly snippet
% ****************************************************************
