Repeat with brackets: Difference between revisions
m New category Tags: Mobile edit Mobile web edit |
m Clearer text |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
This snippet adds brackets with the number of repetitions above a bar or a group of | This snippet adds brackets with the number of repetitions above a bar or a group of bars. This is very useful when dealing with minimal music, for instance. To execute it, simply use <code>\repeatBracket <var>N</var> music</code>, where <var>N</var> is the number of repetitions. Example: <code>\repeatBracket 7 { c'2 e' }</code> | ||
<lilypond version="2.24" | <lilypond version="2.24"> | ||
% | % LSR based on the wonderful spanner by David Nalesnik; see | ||
% LSR http://lists.gnu.org/archive/html/lilypond-user/2014-10/msg00446.html | |||
#(define (test-stencil grob text) | #(define (test-stencil grob text) | ||
| Line 128: | Line 127: | ||
% necessary layout options | % necessary layout options | ||
% note that you can have more than one single layout block (some of them may even be outside and some inside \score) | % note that you can have more than one single layout block | ||
% (some of them may even be outside and some inside \score) | |||
\layout { | \layout { | ||
\context { | \context { | ||
| Line 162: | Line 162: | ||
\repeatBracket 1048 {g'1} | \repeatBracket 1048 {g'1} | ||
} | } | ||
</lilypond> | </lilypond> | ||