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


Manual repeat marks

Note: These methods are only used for displaying unusual repeat constructs, and may produce unexpected behavior. 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) ... (volta #f)
Create a new volta with the specified number. The volta bracket must be explicitly terminated, or it will not be printed.
          
          f4 g a b
          \set Score.repeatCommands = #'((volta "2"))
          g4 a g a
          \set Score.repeatCommands = #'((volta #f))
          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

Printing a repeat sign at the beginning of a piece

A |: bar line can be printed at the beginning of a piece, by overriding the relevant property:

     
     \relative c'' {
       \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.

Cette page documente LilyPond-2.11.58 (branche de développement).

Rapportez toute anomalie en français à lilypond-user-fr@gnu.org ou en anglais à http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs

Vos suggestions à propos de la documentation sont les bienvenues.

Autres langues : español.