% This is a file to test the Lilypond highlighting features of Katepart.
% This is NOT a valid lilypond file, because it also shows the
% highlighting of some invalid lilypond constructs!
% This is a line comment.

<beginfold id='1'>%{</beginfold id='1'>
this is a block comment, that can occur inside a line, or across
multiple lines.
<endfold id='1'>%}</endfold id='1'>

\header <beginfold id='2'>{</beginfold id='2'>
  title = "Katepart Lilypond syntax highlighting test file"
  composer = <beginfold id='1'>%{</beginfold id='1'>"Wilbert Berendsen"<endfold id='1'>%}</endfold id='1'> "Anonymus"
  poet = "The KDE team"
  opus = "1"
  copyright = "Share and enjoy!"
<endfold id='2'>}</endfold id='2'>

\paper <beginfold id='2'>{</beginfold id='2'>
  #<beginfold id='3'>(</beginfold id='3'>set-paper-size "a4"<endfold id='3'>)</endfold id='3'>  % a hash introduces scheme
  indent = 0              % recognize variable names inside \paper, \layout etc.
  between-system-space = 3\mm
<endfold id='2'>}</endfold id='2'>

\layout <beginfold id='2'>{</beginfold id='2'>
  \context <beginfold id='2'>{</beginfold id='2'>
    \Score
    \remove Bar_number_engraver   % recognize engraver names
    \remove "Bar_number_engraver" % also when quoted!
  <endfold id='2'>}</endfold id='2'>
<endfold id='2'>}</endfold id='2'>

% { and << block are folded
\score <beginfold id='4'>{</beginfold id='4'>
  \new StaffGroup <beginfold id='5'><<</beginfold id='5'>
    \new ChordNames \chordmode <beginfold id='4'>{</beginfold id='4'> c2sus4/f g2/d c1 <endfold id='4'>}</endfold id='4'>
    \new Staff \new Voice ="mel" <beginfold id='4'>{</beginfold id='4'>
      \key f \major
      \time 4/4
      \partial 4
      \set Staff.instrumentName = "Bla."
      \once \override Staff.NoteHead #'color = #red
      % dynamics, articulations and markup
      c8\p d\< e-. f-> g a\f c-5\markup <beginfold id='6'>{</beginfold id='6'>Hoi<endfold id='6'>}</endfold id='6'>
      \notemode <beginfold id='4'>{</beginfold id='4'> c d e f <endfold id='4'>}</endfold id='4'>
      \repeat volta 2 <beginfold id='4'>{</beginfold id='4'>
        % complex durations are highlighted:
        g4*2/3
      <endfold id='4'>}</endfold id='4'>
      \times 2/3 <beginfold id='4'>{</beginfold id='4'>e8 f g<endfold id='4'>}</endfold id='4'>
      % there is some error checking:
      % often made mistake to have octavemarks after the duration:
      c2'
      % invalid durations are caught:
      g3
    <endfold id='4'>}</endfold id='4'>
    \context Lyrics \lyricsto "mel" <beginfold id='4'>{</beginfold id='4'>
      \set fontSize = #1
      this is a line of ly -- rics.
      with4 dur -- a -- tions.2.
      % errors like forgetting spaces are found:
      space-- flight <beginfold id='1'>%{</beginfold id='1'>i.s.o.<endfold id='1'>%}</endfold id='1'> space -- flight
      space at end for -- got -- ten as <endfold id='4'>well.}</endfold id='4'>
    
    \new DrumStaff \drummode <beginfold id='4'>{</beginfold id='4'> hihat4 bassdrum8 <endfold id='4'>}</endfold id='4'>
    \new FiguredBass \figuremode <beginfold id='4'>{</beginfold id='4'>
      <5 4>8 <6->
    <endfold id='4'>}</endfold id='4'>
  <endfold id='5'>>></endfold id='5'>
  \midi <beginfold id='2'>{</beginfold id='2'>
    \context <beginfold id='2'>{</beginfold id='2'>
      \Score
      tempoWholesPerMinute = #<beginfold id='3'>(</beginfold id='3'>ly:make-moment 60 2<endfold id='3'>)</endfold id='3'>
    <endfold id='2'>}</endfold id='2'>
  <endfold id='2'>}</endfold id='2'>
<endfold id='4'>}</endfold id='4'>

av = #<beginfold id='3'>(</beginfold id='3'>define-music-function <beginfold id='3'>(</beginfold id='3'>parser location voice<endfold id='3'>)</endfold id='3'>
<beginfold id='3'>(</beginfold id='3'>string?<endfold id='3'>)</endfold id='3'>
; scheme comments are recognized in scheme
; Lilypond inside scheme works as well:
<beginfold id='7'>#{</beginfold id='7'>
  \set associatedVoice = $voice
<endfold id='7'>#}</endfold id='7'><endfold id='3'>)</endfold id='3'>



      
% inside scheme some elements are highlighted:    
#<beginfold id='3'>(</beginfold id='3'>define  <beginfold id='3'>(</beginfold id='3'>naturalise-pitch p<endfold id='3'>)</endfold id='3'>
  <beginfold id='3'>(</beginfold id='3'>let* <beginfold id='3'>(</beginfold id='3'><beginfold id='3'>(</beginfold id='3'>o <beginfold id='3'>(</beginfold id='3'>ly:pitch-octave p<endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'>
         <beginfold id='3'>(</beginfold id='3'>a <beginfold id='3'>(</beginfold id='3'>* 4 <beginfold id='3'>(</beginfold id='3'>ly:pitch-alteration p<endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'> 
         <beginfold id='3'>(</beginfold id='3'>n <beginfold id='3'>(</beginfold id='3'>ly:pitch-notename p<endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'>
         <beginfold id='3'>(</beginfold id='3'>bla 'ArticulationEvent 'ChoirStaff<endfold id='3'>)</endfold id='3'>
    <beginfold id='3'>(</beginfold id='3'>cond
     <beginfold id='3'>(</beginfold id='3'><beginfold id='3'>(</beginfold id='3'>> a 2<endfold id='3'>)</endfold id='3'> <beginfold id='3'>(</beginfold id='3'>set! a <beginfold id='3'>(</beginfold id='3'>- a 4<endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'> <beginfold id='3'>(</beginfold id='3'>set! n <beginfold id='3'>(</beginfold id='3'>+ n 1<endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'>
     <beginfold id='3'>(</beginfold id='3'><beginfold id='3'>(</beginfold id='3'>< a -2<endfold id='3'>)</endfold id='3'> <beginfold id='3'>(</beginfold id='3'>set! a <beginfold id='3'>(</beginfold id='3'>+ a 4<endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'> <beginfold id='3'>(</beginfold id='3'>set! n <beginfold id='3'>(</beginfold id='3'>- n 1<endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'>

    <beginfold id='3'>(</beginfold id='3'>if <beginfold id='3'>(</beginfold id='3'>< n 0<endfold id='3'>)</endfold id='3'> <beginfold id='3'>(</beginfold id='3'>begin <beginfold id='3'>(</beginfold id='3'>set!  o <beginfold id='3'>(</beginfold id='3'>- o 1<endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'> <beginfold id='3'>(</beginfold id='3'>set! n <beginfold id='3'>(</beginfold id='3'>+ n 7<endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'>
    <beginfold id='3'>(</beginfold id='3'>if <beginfold id='3'>(</beginfold id='3'>> n 6<endfold id='3'>)</endfold id='3'> <beginfold id='3'>(</beginfold id='3'>begin <beginfold id='3'>(</beginfold id='3'>set!  o <beginfold id='3'>(</beginfold id='3'>+ o 1<endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'> <beginfold id='3'>(</beginfold id='3'>set! n <beginfold id='3'>(</beginfold id='3'>- n 7<endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'>

    <beginfold id='3'>(</beginfold id='3'>ly:make-pitch o n <beginfold id='3'>(</beginfold id='3'>/ a 4<endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'><endfold id='3'>)</endfold id='3'>

% markup is also highlighted
\markup <beginfold id='6'>{</beginfold id='6'>
  \line <beginfold id='6'>{</beginfold id='6'>
    text test Voice Staff % note Lilypond keywords are not highlighted here
  <endfold id='6'>}</endfold id='6'>
  \score <beginfold id='4'>{</beginfold id='4'> \relative c' <beginfold id='4'>{</beginfold id='4'> <ceg>2( d) <endfold id='4'>}</endfold id='4'> <endfold id='4'>}</endfold id='4'>
  \italic bla
  \override #'<beginfold id='3'>(</beginfold id='3'>baseline-skip . 2<endfold id='3'>)</endfold id='3'> <beginfold id='6'>{</beginfold id='6'>
    \underline blu
  <endfold id='6'>}</endfold id='6'>
<endfold id='6'>}</endfold id='6'>
