]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/grid-lines--emphasizing-rhythms-and-notes-synchronization.ly
Release: update news.
[lilypond.git] / Documentation / snippets / grid-lines--emphasizing-rhythms-and-notes-synchronization.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.dsi.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.17.11"
8
9 \header {
10   lsrtags = "editorial-annotations"
11
12   texidoc = "
13 Regular vertical lines can be drawn between staves to show note
14 synchronization; however, in case of monophonic music, you may want to
15 make the second stave invisible, and make the lines shorter like in
16 this snippet.
17
18 "
19   doctitle = "Grid lines: emphasizing rhythms and notes synchronization"
20 } % begin verbatim
21
22
23 \score {
24   \new ChoirStaff {
25     \relative c'' <<
26       \new Staff {
27         \time 12/8
28         \stemUp
29         c4. d8 e8 f g4 f8 e8. d16 c8
30       }
31       \new Staff {
32         % hides staff and notes so that only the grid lines are visible
33         \hideNotes
34         \override Staff.BarLine.transparent = ##t
35         \override Staff.StaffSymbol.line-count = #0
36         \override Staff.TimeSignature.transparent = ##t
37         \override Staff.Clef.transparent = ##t
38
39         % dummy notes to force regular note spacing
40         \once  \override Score.GridLine.thickness = #4.0
41         c8 c c
42         \once  \override Score.GridLine.thickness = #3.0
43         c8 c c
44         \once  \override Score.GridLine.thickness = #4.0
45         c8 c c
46         \once  \override Score.GridLine.thickness = #3.0
47         c8 c c
48       }
49     >>
50   }
51   \layout {
52     \context {
53       \Score
54       \consists "Grid_line_span_engraver"
55       % center grid lines horizontally below note heads
56       \override NoteColumn.X-offset = #-0.5
57     }
58     \context {
59       \Staff
60       \consists "Grid_point_engraver"
61       gridInterval = #(ly:make-moment 1/8)
62       % set line length and positioning:
63       % two staff spaces above center line on hidden staff
64       % to four spaces below center line on visible staff
65       \override GridPoint.Y-extent = #'(2 . -4)
66     }
67     ragged-right = ##t
68   }
69 }