Jump to content

Measure counter (obsolete in 2.17): Difference between revisions

From LilyPond wiki
No edit summary
m New category
Line 23: Line 23:
[[Category:Repeats]]
[[Category:Repeats]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Workaround]][[Category:Snippet]]
[[Category:Workaround]]
[[Category:Snippet]]

Revision as of 23:31, 21 November 2025

This snippet provides a workaround for emitting measure counters using transparent percent repeats.

\version "2.24"

<<
  \context Voice = "foo" {
    \clef bass
    c4 r g r
    c4 r g r
    c4 r g r
    c4 r g r
  }
  \context Voice = "foo" {
    \set countPercentRepeats = ##t
    \hide PercentRepeat
    \override PercentRepeatCounter.staff-padding = #1
    \repeat percent 4 { s1 }
  }
>>