%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\cm,line-width=6\cm,noragged-right,paper-height=845.047\pt,paper-width=597.508\pt,papersize='(cons (* 597.508 pt) (* 845.047 pt)),quote]
\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\cm
  line-width = 6\cm
  % 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))
  ragged-right = ##f
  line-width = 6\cm - 2.0 * 10.16\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:
% ****************************************************************
\sourcefileline 919
\layout {
  \override ChordGrid.GridChordName.stencil =
  #(lambda (grob)
     (let* ((ev (event-cause grob))
            (mus (ly:event-property ev 'music-cause))
            (dur (ly:music-property mus 'duration))
            (num (number->string (1+ (ly:grob-property grob 'index)))))
       (grob-interpret-markup
        grob
        #{ \markup { \note #dur #UP \hspace #0.7 \circle #num } #})))
}


#(define-markup-command (demo layout props measure init) (ly:music? ly:music?)
   (interpret-markup
    layout
    props
    #{
      \markup \column {
        \score { \new ChordGrid { #init #measure } }
      }
    #}))

\markup \column {
  \override #'(baseline-skip . 13)
  \override #'(padding . 2)
  \table #`(,CENTER ,CENTER) {
    "Default style" \typewriter "\\medianChordGridStyle"
    \demo { r2 r4 r4 } {} \demo { r2 r4 r4 } \medianChordGridStyle
    \demo { r4 r4 r2 } {} \demo { r4 r4 r2 } \medianChordGridStyle
    \demo { r2. r4 } {} \demo { r2. r4 } \medianChordGridStyle
    \demo { r4 r2. } {} \demo { r4 r2. } \medianChordGridStyle
    \demo { r4 r4 r4 r4 } {} \demo { r4 r4 r4 r4 } \medianChordGridStyle
  }
}


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