%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm,paper-height=845.047\pt,paper-width=597.508\pt,papersize='(cons (* 597.508 pt) (* 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 (* 597.508 pt) (* 845.047 pt)))
  indent = 0\mm
  line-width = 160\mm
  % offset the left padding, also add 1mm as lilypond creates cropped
  % images with a little space on the right
  line-width = #(- line-width (* mm  3.000000) (* mm 1))
}

\layout {
  
}




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

%% additional definitions required by the score:
Cresc = #(make-music 'CrescendoEvent 'span-direction START
                                     'span-type 'text)

Decresc = #(make-music 'DecrescendoEvent 'span-direction START
                                         'span-type 'text)

#(define edge-height-alist
   '((up . -0.7)
     (down . 0.7)
     (none . 0)))

#(define (get-height type)
   (or (assv-ref edge-height-alist type)
       (begin
         (ly:warning "bracket edge type '~a' not implemented" type)
         0)))

% Make the `edge-height` property independent of a bracket's direction.
#(define (make-edge-height left right)
   (grob-transformer
    'edge-height
    (lambda (grob orig)
      (let ((dir (ly:grob-property grob 'direction))
            (left-height (get-height left))
            (right-height (get-height right)))
        (cons (* dir left-height) (* dir right-height))))))

RH = \rightHandFinger \etc

#(define-markup-command (square layout props arg)
   (markup?)
   (let* ((stil (interpret-markup layout props arg))
          (x-size (interval-length (ly:stencil-extent stil X)))
          (y-size (interval-length (ly:stencil-extent stil Y)))
          (axis (if (> x-size y-size) Y X)))
     (interpret-markup
      layout props
      #{
        \markup \box \with-dimension-from #axis \rotate #90 #arg #arg
      #})))

% 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
     #}))

D = \tweak Stem.direction #DOWN \etc
U = \tweak Stem.direction #UP \etc


\header {
  texidoc = "Colors. The elements in the first bar have the ‘color’ attribute
    set to red for <note>, <notehead>, <stem>, <dot>, and <accidental>,
    respectively.

    The elements in the second bar have the ‘color’ attribute set to red for
    <down-bow>, <tremolo>, <accent>, and <note> again (for the rest),
    respectively, followed by a red unpitched note.

    The third and fourth bar consists of a red two-bar rest.

    The fifth bar has a red rehearsal mark on its starting bar line. The first
    note has three fingerings, with the middle one in red; also attached is a
    red ‘ff’ sign. The second note has three plucks, with the first one in red.
    A red ‘Adagio’ tempo indication is on top of the third beat, which consists
    of a quadruplet with a red number. The fourth beat holds a red arpeggio, and
    the fifth beat demonstrates lyrics in red.

    The sixth bar holds a red beamlet, a red beam, a red slur, a red pedal
    marker that gets continued with a blue one, and a red octave shift.

    Measure 7 contains a red trill with a black wavy line, a black trill with a
    red wavy line, a red bracket, a red glissando, and a red wedge.

    Bar 8 starts with a red and black tie connecting two chords, followed by
    ‘cresc.’ and dashes in red, followed by ‘dim.’ in black with red dashes.

    The ninth measure demonstrates a red 6/8 time signature, followed by a red
    two-stem tremolo, a red breath mark.

    Bar 10 begins with a red, non-traditional key change, followed by a red,
    traditional one.

    The eleventh bar starts with a red bass clef (actually, still in bar ten),
    followed by a blue percussion clef on a red two-line staff (where the middle
    line is omitted).

    Measures 12 to 14 hold a repeat structure with two endings, with red bar
    lines at the beginning of measures 12 and 14, a blue bar line at the
    beginning of measure 13, and a red prima-volta bracket and number."
}
\layout {
  \context {
    \Staff
    printKeyCancellation = ##f
    \override MultiMeasureRest.expand-limit = 1
  }
  \context {
    \Score
    skipBars = ##t
    doubleRepeatBarType = ":|.|:"
    autoBeaming = ##f
  }
}
PartPOneVoiceOne = \relative gis' {
  \clef "treble" \time 15/8 \key c \major \tweak Stem.color "#FF0000" \tweak
  color "#FF0000" \tweak Accidental.color "#FF0000" \tweak Dots.color "#FF0000"
  gis4. -\tweak color "#FF0000" \downbow \tweak color "#FF0000" :32 -\tweak
  color "#FF0000" -> \tweak color "#FF0000" ges4. \downbow :32 -> \U \tweak
  Stem.color "#FF0000" fis4. \downbow :32 -> \tweak Dots.color "#FF0000" fes4.
  \downbow :32 -> \tweak Accidental.color "#FF0000" eis4. \downbow :32 -> | % 1
  gis4. -\tweak color "#FF0000" \downbow :32 -> ges4. \downbow \tweak color
  "#FF0000" :32 -> fis4. \downbow :32 -\tweak color "#FF0000" -> \tweak
  Stem.color "#FF0000" \tweak Stem.stemlet-length #1 \tweak color "#FF0000"
  \tweak Dots.color "#FF0000" r4. \tweak Stem.color "#FF0000" \tweak color
  "#FF0000" \tweak Dots.color "#FF0000" b4. | % 2
  \tweak color "#FF0000" \tweak MultiMeasureRestNumber.color "#FF0000" R8*15*2 | % 4
  \break \mark \markup \with-color "#FF0000" \square \with-color "#FF0000" A f4.
  -\finger \markup \concat { "0" \with-color "#FF0000" "1" "2" } -\tweak color
  "#FF0000" -\ff f4. ^\RH \markup \concat { \with-color "#FF0000" a \char
    ##x200A m \char ##x200A i } \tweak TupletNumber.color "#FF0000" \tuplet 4/3
  {
    f8 [ ^\markup \bold \with-color "#FF0000" Adagio f8 f8 f8 ] }
  <f c' f>4. \tweak color "#FF0000" \arpeggio f4. | % 5
  f8 [ \U \tweak Stem.color "#FF0000" \tweak Stem.stemlet-length #1 r8 f8 ] f8
  \tweak color "#FF0000" [ f8 f8 ] f8 -\tweak color "#FF0000" ( [ f8 f8 ) ] \set
  Staff.pedalSustainStyle = #'bracket f8 [ \tweak color "#FF0000" \sustainOn f8
  \sustainOff \tweak color "#0000FF" \sustainOn <> \sustainOff f8 ] \tweak color
  "#FF0000" \ottava #1 f'8 [ f8 f8 ] \ottava #0 \break | % 6
  f,4. \tweak bound-details.left.text \markup \with-color "#FF0000"
  \with-true-dimension #X \musicglyph "scripts.trill" \startTrillSpan <>
  \stopTrillSpan f4. \tweak color "#FF0000" \tweak bound-details.left.text
  \markup \with-color "#000000" \with-true-dimension #X \musicglyph
  "scripts.trill" \startTrillSpan \tweak edge-height #(make-edge-height 'up 'up)
  \tweak color "#FF0000" \tweak direction #DOWN \[ <> \stopTrillSpan f8 [ f8 f8
  ] \] \once \override Glissando.style = #'trill \once \override Glissando.color
  = "#FF0000" b4 \glissando f8 f4 -\tweak color "#FF0000" ^\< f8 <>\! | % 7
  <f \tweak color "#FF0000" ~ a ~>4 <f a>8 f4. \tweak color "#FF0000" \tweak
  text \markup \normal-text \italic \with-color "#FF0000" "cresc." ^\Cresc f4.
  <>\! f4. \tweak color "#FF0000" \tweak text \markup \normal-text \with-color
  "#000000" \italic "dim." ^\Decresc f4. <>\! \break | % 8
  \once \override Staff.TimeSignature.color = "#FF0000" \time 6/8 \once
  \override Beam.gap-count = 2 \once \override Beam.color = "#FF0000" \repeat
  tremolo 12 { f32 f'32 \tweak color "#FF0000" \breathe } | % 9

  \barNumberCheck #10
  \set Staff.keyAlterations = #`((1 . ,SHARP) (5 . ,SHARP) (0 . ,SHARP)) \once
  \override Staff.KeySignature.color = "#FF0000" f,4. \tweak color "#FF0000"
  \key bes \major f4. | % 10
  \once \override Staff.Clef.color = "#FF0000" \clef "bass" f,4. \staffLines
  #'((details . (1 3)) (clef-color . "#0000FF") (staff-color . "#FF0000"))
  "percussion" 3 g'4. | % 11
  \staffLines "treble" 5 | \once \override Staff.BarLine.color = "#FF0000"
  \repeat volta 2 {
    f2. \once \override Staff.BarLine.color = "#0000FF" \bar "|" % 12
    \alternative {
      \volta 1 {
        \once \override Score.VoltaBracket.text = \markup "1." \once \override
        Score.VoltaBracket.color = "#FF0000" f2. | \once \override
        Staff.BarLine.color = "#FF0000" % 13
      }
      \volta 2 {
        \once \override Score.VoltaBracket.text = \markup "2." f2. \bar "|."
      }
    }
  }
}

PartPOneVoiceOneLyricsOne = \lyricmode {
  \set ignoreMelismata = ##t
  \set includeGraceNotes = ##t
  \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1
  \skip1 \skip1 \skip1 \skip1 \skip1 \markup \with-color "#FF0000" lyrics \skip1
  \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1
  \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1
  \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1
  \skip1 \skip1 \skip1 \skip1
}


% The score definition
\score {
  <<
    \new Staff = "P1" <<
      \context Staff <<
        \override Staff.BarLine.allow-span-bar = ##f
        \mergeDifferentlyDottedOn
        \mergeDifferentlyHeadedOn
        \context Voice = "PartPOneVoiceOne" {
          \PartPOneVoiceOne
        }
        \new Lyrics \lyricsto "PartPOneVoiceOne" {
          \PartPOneVoiceOneLyricsOne
        }
      >>
    >>
  >>
  \layout {}
  % To create MIDI output, uncomment the following line:
  % \midi { \tempo 4 = 100 }
}




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