Jump to content

Changing the default bar lines: Difference between revisions

From LilyPond wiki
mNo edit summary
mNo edit summary
Line 16: Line 16:
}  
}  


%% example:
{  
{  
   c'1
   c'1

Revision as of 12:37, 9 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 "|."
}