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 bar. Very useful when dealing with minimal music, for instance. To summon it, simply use <code>\repeatBracket </code><code>N</code><code> </code><code>music</code>, where <code>N</code> is the number of repetitions. Example: <code>\repeatBracket 7 { c'2 e' }</code>
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" full>
<lilypond version="2.24">
% repeatBracket snippet
% LSR based on the wonderful spanner by David Nalesnik; see
% will add .----Nx----. above a bar, where N is the number of repetitions
% LSR  http://lists.gnu.org/archive/html/lilypond-user/2014-10/msg00446.html
% based on the wonderful spanner by David Nalesnik (see: 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}   
}
}
\paper { tagline = ##f }
</lilypond>
</lilypond>