Jump to content

Repeat percent and chords (alternate): Difference between revisions

From LilyPond wiki
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
m New category
Tags: Mobile edit Mobile web edit
 
(One intermediate revision by the same user not shown)
Line 25: Line 25:
[[Category:Chords]]
[[Category:Chords]]
[[Category:Symbols and glyphs]]
[[Category:Symbols and glyphs]]
[[Category:Snippet]]

Latest revision as of 23:24, 21 November 2025

This snippet shows how to put the percent sign for a duplicate chord.

\version "2.24"

%% Credits: Klaus Blum
%% => http://lilypond.1069038.n5.nabble.com/feature-request-getting-repeat-percent-to-work-in-ChordNames-td174393.html

\chords {
  \repeat percent 4 { a2:m f }
  \repeat percent 4 { g1 c }
}

\layout {
  \context {
    \ChordNames
    \consists "Percent_repeat_engraver"
    \consists "Double_percent_repeat_engraver"
    \override ChordName.Y-offset = #-1
    % delete the following two lines if you don't need barlines:
    \override BarLine.bar-extent = #'(-2 . 2)
    \consists "Bar_engraver"
  }
}