Jump to content

Percent repeat count visibility: Difference between revisions

From LilyPond wiki
No edit summary
m New category
 
Line 13: Line 13:
[[Category:Repeats]]
[[Category:Repeats]]
[[Category:Tweaks and overrides]]
[[Category:Tweaks and overrides]]
[[Category:Included in the official documentation]][[Category:Snippet]]
[[Category:Included in the official documentation]]
[[Category:Snippet]]

Latest revision as of 23:23, 21 November 2025

Percent repeat counters can be shown at regular intervals by setting the context property repeatCountVisibility.

\version "2.24"

\relative c'' {
  \set countPercentRepeats = ##t
  \set repeatCountVisibility = #(every-nth-repeat-count-visible 5)
  \repeat percent 10 { c1 } \break
  \set repeatCountVisibility = #(every-nth-repeat-count-visible 2)
  \repeat percent 6 { c1 d1 }
}