Jump to content

Isolated percent repeats: Difference between revisions

From LilyPond wiki
Import snippet from LSR
 
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
Line 1: Line 1:
Isolated percents can also be printed.
Isolated percents can also be printed.


<lilypond version="2.24.0">
<lilypond version="2.24">
makePercent =
makePercent =
#(define-music-function (note) (ly:music?)
#(define-music-function (note) (ly:music?)

Revision as of 18:55, 16 November 2025

Isolated percents can also be printed.

\version "2.24"

makePercent =
#(define-music-function (note) (ly:music?)
   "Make a percent repeat the same length as NOTE."
   (make-music 'PercentEvent
               'length (ly:music-length note)))

\relative c'' {
  \makePercent s1
}