Next: , Previous: Normal repeats, Up: Long repeats


1.4.1.2 Manual repeat marks

Note: These methods are only used for displaying unusual repeat constructs. In most cases, repeats should be created using the standard \repeat command or by printing the relevant bar lines. For more information, see Bar lines.

The property repeatCommands can be used to control the layout of repeats. Its value is a Scheme list of repeat commands.

start-repeat
Print a |: bar line.
          
          c1
          \set Score.repeatCommands = #'( start-repeat )
          d4 e f g
          c1
     

[image of music]

As per standard engraving practice, repeat signs are not printed at the beginning of a piece.

end-repeat
Print a :| bar line:
          
          c1
          d4 e f g
          \set Score.repeatCommands = #'( end-repeat )
          c1
     

[image of music]


(volta number)
Create a new volta with the specified number:
          
          f4 g a b
          \set Score.repeatCommands = #'( ( volta "2" ) )
          g4 a g a
          c1
     

[image of music]


(volta #f)
Stops a running volta bracket:
          
          c1
          \set Score.repeatCommands = #'( ( volta "2" ) )
          f4 g a b
          \set Score.repeatCommands = #'( ( volta #f ) )
          a4 g f e
          c1
     

[image of music]

Multiple repeat commands may occur at the same point:

     
     f4 g a b
     \set Score.repeatCommands = #'( ( volta "2, 5" ) end-repeat )
     g4 a g a
     c1
     \set Score.repeatCommands = #'( ( volta #f ) ( volta "95" ) end-repeat )
     b1

[image of music]

Text can be included with the volta bracket. The text can be a number or numbers or markup text, see Formatting text. The simplest way to use markup text is to define the markup first, then include the the markup in a Scheme list.

     
     voltaAdLib = \markup { 1. 2. 3... \text \italic { ad lib. } }
     \relative c'' {
       c1
       \set Score.repeatCommands = #(list (list 'volta voltaAdLib) 'start-repeat)
       c4 b d e
       \set Score.repeatCommands = #'((volta #f) (volta "4.") end-repeat)
       f1
       \set Score.repeatCommands = #'((volta #f))
     }

[image of music]

Selected Snippets

Manual control of the volte, including a |: bar line at the beginning and explicit volta numbers:

     
     s1*1/10
     \set Score.repeatCommands = #'( start-repeat )
     c1*9/10
     d4 e f g
     \set Score.repeatCommands = #'( ( volta "1, 2, 5" ) )
     f4 g a b
     \set Score.repeatCommands = #'( ( volta #f ) ( volta "95" ) end-repeat )
     g4 a g a
     \set Score.repeatCommands = #'( ( volta #f ) )
     c1

[image of music]

In order to print a |: bar line at the beginning of a piece, the BreakAlignment property must be overridden:

     
     \once \override Score.BreakAlignment #'break-align-orders =
     #(make-vector 3 '(
     instrument-name
     left-edge
     ambitus
     span-bar
     breathing-sign
     clef
     key-signature
     time-signature
     staff-bar
     custos
     span-bar
     ))
     \bar "|:"
     c1
     d1
     d4 e f g

[image of music]

See also

Notation Reference: Bar lines, Formatting text.

Snippets: Repeats.

Internals Reference: VoltaBracket, RepeatedMusic, VoltaRepeatedMusic.


Next: , Previous: Normal repeats, Up: Long repeats

This page is for LilyPond-2.11.50 (development-branch).

Report errors to http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.

Your suggestions for the documentation are welcome.

Other languages: espaƱol.
About automatic language selection.