Jump to content

Spacing out percent repeats with hidden notes: Difference between revisions

From LilyPond wiki
No edit summary
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 2: Line 2:


<lilypond version="2.24">
<lilypond version="2.24">
%% http://lsr.di.unimi.it/LSR/Item?id=11
\new Staff <<
\new Staff <<
   \new Voice {
   \new Voice {
     \repeat percent 3 \relative c'' { e e e e }
     \repeat percent 3 \relative c'' { e e e e }
     \repeat percent 3 \relative c'' { e e e e }
     \repeat percent 3 \relative c'' { e e e e }
   }
   }
 
   \new Voice {
   \new Voice {
     s1 s s
     s1 s s
     s1 \hideNotes \repeat unfold 8 c4 \unHideNotes  
     s1 \hideNotes \repeat unfold 8 c4 \unHideNotes  
   }
   }
>>
>>
</lilypond>
</lilypond>
Line 22: Line 17:
[[Category:Spacing]]
[[Category:Spacing]]
[[Category:Symbols and glyphs]]
[[Category:Symbols and glyphs]]
[[Category:Workaround]][[Category:Snippet]]
[[Category:Workaround]]
[[Category:Snippet]]

Latest revision as of 14:37, 31 January 2026

If you don't like the spacing used for percent repeats, you can enlarge the percent bars by suitably adding hidden notes.

\version "2.24"

\new Staff <<
  \new Voice {
    \repeat percent 3 \relative c'' { e e e e }
    \repeat percent 3 \relative c'' { e e e e }
  }
  \new Voice {
    s1 s s
    s1 \hideNotes \repeat unfold 8 c4 \unHideNotes 
  }
>>