Changing the default bar lines: Difference between revisions
Appearance
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series |
mNo edit summary |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
Default bar lines can be changed when re-defined in a | Default bar lines can be changed when re-defined in a <code>Score</code> context. | ||
<lilypond version="2.24"> | <lilypond version="2.24"> | ||
% | % LSR https://lists.gnu.org/archive/html/lilypond-user/2014-03/msg00126.html | ||
% LSR https://lists.gnu.org/archive/html/lilypond-user/2014-12/msg00189.html | |||
% | |||
\layout { | \layout { | ||
\context { | \context { | ||
\Score | \Score | ||
% Changing the defaults from engraver-init.ly | |||
measureBarType = "!" | measureBarType = "!" | ||
startRepeatBarType = "[|:" | startRepeatBarType = "[|:" | ||
| Line 17: | Line 16: | ||
} | } | ||
{ | { | ||
c'1 | c'1 | ||
\repeat volta 2 { | \repeat volta 2 { c' c' } | ||
\repeat volta 2 { | \repeat volta 2 { c' c' \alternative { \volta 1 { c' } | ||
\volta 2 { c' } } } | |||
\bar "|." | \bar "|." | ||
} | } | ||
</lilypond> | </lilypond> | ||
[[Category:Repeats]] | |||
[[Category:Staff notation]] | [[Category:Staff notation]] | ||
[[Category:Included in the official documentation]] | [[Category:Included in the official documentation]] | ||
[[Category:Snippet]] | |||
Latest revision as of 08:27, 10 December 2025
Default bar lines can be changed when re-defined in a Score context.
\version "2.24"
% LSR https://lists.gnu.org/archive/html/lilypond-user/2014-03/msg00126.html
% LSR https://lists.gnu.org/archive/html/lilypond-user/2014-12/msg00189.html
\layout {
\context {
\Score
% Changing the defaults from engraver-init.ly
measureBarType = "!"
startRepeatBarType = "[|:"
endRepeatBarType = ":|]"
doubleRepeatBarType = ":|][|:"
}
}
{
c'1
\repeat volta 2 { c' c' }
\repeat volta 2 { c' c' \alternative { \volta 1 { c' }
\volta 2 { c' } } }
\bar "|."
}