]> git.donarmstrong.com Git - lilypond.git/commitdiff
Doc: add grid line example.
authorGraham Percival <graham@percival-music.ca>
Mon, 30 Apr 2007 08:42:29 +0000 (01:42 -0700)
committerGraham Percival <graham@percival-music.ca>
Mon, 30 Apr 2007 08:42:29 +0000 (01:42 -0700)
Documentation/user/advanced-notation.itely

index 76ae0a4eeff4c688dfebb580c599abe5d09403ab..6187b7aedd0a4c30fb040ec294bf4728c82a08ee 100644 (file)
@@ -2581,9 +2581,44 @@ This only functions inside chords, even for single notes
 @node Grid lines
 @subsection Grid lines
 
-@c FIXME: get an example for grid lines.  -gp
 Vertical lines can be drawn between staves synchronized with
 the notes.
 
+@lilypond[ragged-right,quote,verbatim]
+\layout {
+  \context {
+    \Staff
+    \consists "Grid_point_engraver" %% sets of grid
+    gridInterval = #(ly:make-moment 1 4)
+  }
+}
+
+\new Score \with {
+  \consists "Grid_line_span_engraver"
+  %% centers grid lines  horizontally below noteheads
+  \override NoteColumn #'X-offset = #-0.5
+}
+
+\new ChoirStaff <<
+  \new Staff {
+    \stemUp
+    \relative {
+      c'4. d8 e8 f g4
+    }
+  }
+  \new Staff {
+    %% centers grid lines  vertically
+    \override Score.GridLine #'extra-offset = #'( 0.0 . 1.0 )
+    \stemDown
+    \clef bass
+    \relative c {
+      c4  g'  f  e
+    }
+  }
+>>
+@end lilypond
+
 Examples: @inputfileref{input/@/regression,grid@/-lines@/.ly}.
 
+
+