Grid lines: changing their appearance: Difference between revisions
Appearance
No edit summary |
mNo edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 2: | Line 2: | ||
<lilypond version="2.24"> | <lilypond version="2.24"> | ||
\new ChoirStaff << | |||
\new Staff { | |||
\relative c'' { | |||
\stemUp | |||
c'4. d8 e8 f g4 | |||
} | } | ||
} | |||
\new Staff { | |||
\relative c { | |||
% this moves them up one staff space from the default position | |||
\override Score.GridLine.extra-offset = #'(0.0 . 1.0) | |||
\stemDown | |||
\clef bass | |||
\once \override Score.GridLine.thickness = 5.0 | |||
c4 | |||
\once \override Score.GridLine.thickness = 1.0 | |||
g'4 | |||
\once \override Score.GridLine.thickness = 3.0 | |||
f4 | |||
\once \override Score.GridLine.thickness = 5.0 | |||
e4 | |||
} | } | ||
>> | } | ||
>> | |||
\layout { | |||
\context { | |||
\Staff | |||
% set up grids | |||
\consists "Grid_point_engraver" | |||
% set the grid interval to one quarter note | |||
gridInterval = #(ly:make-moment 1/4) | |||
} | } | ||
\context { | |||
\Score | |||
\consists "Grid_line_span_engraver" | |||
% this moves them to the right half a staff space | |||
\override NoteColumn.X-offset = -0.5 | |||
} | } | ||
} | } | ||
</lilypond> | </lilypond> | ||
[[Category:Contexts and engravers]] | |||
[[Category:Editorial annotations]] | [[Category:Editorial annotations]] | ||
[[Category:Included in the official documentation]][[Category:Snippet]] | [[Category:Included in the official documentation]] | ||
[[Category:Snippet]] | |||
Latest revision as of 11:48, 12 December 2025
The appearance of grid lines can be changed by overriding some of their properties.
\version "2.24"
\new ChoirStaff <<
\new Staff {
\relative c'' {
\stemUp
c'4. d8 e8 f g4
}
}
\new Staff {
\relative c {
% this moves them up one staff space from the default position
\override Score.GridLine.extra-offset = #'(0.0 . 1.0)
\stemDown
\clef bass
\once \override Score.GridLine.thickness = 5.0
c4
\once \override Score.GridLine.thickness = 1.0
g'4
\once \override Score.GridLine.thickness = 3.0
f4
\once \override Score.GridLine.thickness = 5.0
e4
}
}
>>
\layout {
\context {
\Staff
% set up grids
\consists "Grid_point_engraver"
% set the grid interval to one quarter note
gridInterval = #(ly:make-moment 1/4)
}
\context {
\Score
\consists "Grid_line_span_engraver"
% this moves them to the right half a staff space
\override NoteColumn.X-offset = -0.5
}
}