Una repetición simple sin finales alternativos:
-@lilypond[verbatim,quote,relative=2]
-\repeat volta 2 { c4 d e f }
-c2 d
-\repeat volta 2 { d4 e f g }
+@lilypond[verbatim,quote]
+\relative {
+ \repeat volta 2 { c''4 d e f }
+ c2 d
+ \repeat volta 2 { d4 e f g }
+}
@end lilypond
Los filanes alternativos (casillas de primera y segunda vez)
Repetición única con primera y segunda vez:
-@lilypond[verbatim,quote,relative=2]
-\repeat volta 2 { c4 d e f | }
-\alternative {
- { c2 e | }
- { f2 g | }
+@lilypond[verbatim,quote]
+\relative {
+ \repeat volta 2 { c''4 d e f | }
+ \alternative {
+ { c2 e | }
+ { f2 g | }
+ }
+ c1
}
-c1
@end lilypond
Varias repeticiones con primera y segunda vez:
-@lilypond[verbatim,quote,relative=2]
-\repeat volta 4 { c4 d e f | }
-\alternative {
- { c2 e | }
- { f2 g | }
+@lilypond[verbatim,quote]
+\relative {
+ \repeat volta 4 { c''4 d e f | }
+ \alternative {
+ { c2 e | }
+ { f2 g | }
+ }
+ c1
}
-c1
@end lilypond
Más de una repetición con más de un final alternativo:
-@lilypond[verbatim,quote,relative=2]
-\repeat volta 3 { c4 d e f | }
-\alternative {
- { c2 e | }
- { f2 g | }
- { a2 g | }
+@lilypond[verbatim,quote]
+\relative {
+ \repeat volta 3 { c''4 d e f | }
+ \alternative {
+ { c2 e | }
+ { f2 g | }
+ { a2 g | }
+ }
+ c1
}
-c1
@end lilypond
@warning{Si hay dos o más alternativas, no debe aparecer
instrucciones @code{\partial} o comprobaciones de compás en los
lugares en que se imprimen estos símbolos de repetición:
-@lilypond[verbatim,quote,relative=1]
-% no \partial here
-c4 e g % no bar check here
-% no \partial here
-\repeat volta 4 {
- e4 |
- c2 e |
+@lilypond[verbatim,quote]
+\relative { % no \partial here
+ c'4 e g % no bar check here
% no \partial here
- g4 g g % no bar check here
+ \repeat volta 4 {
+ e4 |
+ c2 e |
+ % no \partial here
+ g4 g g % no bar check here
+ }
+ % no \partial here
+ g4 |
+ a2 a |
+ g1 |
}
-% no \partial here
-g4 |
-a2 a |
-g1 |
@end lilypond
De forma similar, si una repetición compienza con el compás de
este caso se necesita la instrucción @code{\partial} al principio de
la partitura:
-@lilypond[verbatim,quote,relative=1]
-\partial 4 % required
-\repeat volta 4 {
- e4 |
- c2 e |
+@lilypond[verbatim,quote]
+\relative {
+ \partial 4 % required
+ \repeat volta 4 {
+ e'4 |
+ c2 e |
+ % no \partial here
+ g4 g g % no bar check here
+ }
% no \partial here
- g4 g g % no bar check here
+ g4 |
+ a2 a |
+ g1 |
}
-% no \partial here
-g4 |
-a2 a |
-g1 |
@end lilypond
Cuando se añaden primera y segunda vez a una repetición que comienza
Se pueden añadir ligaduras de unión al segundo final:
-@lilypond[verbatim,quote,relative=2]
-c1
-\repeat volta 2 { c4 d e f~ }
-\alternative {
- { f2 d }
- { f2\repeatTie f, }
+@lilypond[verbatim,quote]
+\relative {
+ c''1
+ \repeat volta 2 { c4 d e f~ }
+ \alternative {
+ { f2 d }
+ { f2\repeatTie f, }
+ }
}
@end lilypond
Salida de una repetición:
-@lilypond[verbatim,quote,relative=1]
-e1
-\inStaffSegno
-f2 g a b
-c1_"D.S." \bar "|."
+@lilypond[verbatim,quote]
+\relative {
+ e'1
+ \inStaffSegno
+ f2 g a b
+ c1_"D.S." \bar "|."
+}
@end lilypond
Al comienzo de una repetición:
-@lilypond[verbatim,quote,relative=1]
-e1
-\repeat volta 2 {
- \inStaffSegno % start repeat
- f2 g a b
+@lilypond[verbatim,quote]
+\relative {
+ e'1
+ \repeat volta 2 {
+ \inStaffSegno % start repeat
+ f2 g a b
+ }
+ c1_"D.S." \bar "|."
}
-c1_"D.S." \bar "|."
@end lilypond
Al final de una repetición:
-@lilypond[verbatim,quote,relative=1]
-e1
-\repeat volta 2 {
+@lilypond[verbatim,quote]
+\relative {
+ e'1
+ \repeat volta 2 {
+ f2 g a b
+ \inStaffSegno % end repeat
+ }
f2 g a b
- \inStaffSegno % end repeat
+ c1_"D.S." \bar "|."
}
-f2 g a b
-c1_"D.S." \bar "|."
@end lilypond
Entre dos repeticiones:
-@lilypond[verbatim,quote,relative=1]
-e1
-\repeat volta 2 {
- f2 g a b
-}
-\inStaffSegno % double repeat
-\repeat volta 2 {
- f2 g a b
+@lilypond[verbatim,quote]
+\relative {
+ e'1
+ \repeat volta 2 {
+ f2 g a b
+ }
+ \inStaffSegno % double repeat
+ \repeat volta 2 {
+ f2 g a b
+ }
+ c1_"D.S." \bar "|."
}
-c1_"D.S." \bar "|."
@end lilypond
Se pueden obtener símbolos de línea divisoria alternativos
definidos anteriormente con la instrucción @code{\defineBarLine}
(véase @ref{Barras de compás}).
-@lilypond[verbatim,quote,relative=1]
+@lilypond[verbatim,quote]
\defineBarLine ":|.S[" #'(":|." "S[" "")
\defineBarLine "]" #'("]" "" "")
-e1
-\repeat volta 2 {
- f2 g a b
- \once \set Score.endRepeatSegnoType = ":|.S["
- \inStaffSegno
+\relative {
+ e'1
+ \repeat volta 2 {
+ f2 g a b
+ \once \set Score.endRepeatSegnoType = ":|.S["
+ \inStaffSegno
+ }
+ f2 g \bar "]" a b
+ c1_"D.S." \bar "|."
}
-f2 g \bar "]" a b
-c1_"D.S." \bar "|."
@end lilypond
@snippets
@item start-repeat
Imprimir una barra de compás @code{.|:}
-@lilypond[verbatim,quote,relative=2]
-c1
-\set Score.repeatCommands = #'(start-repeat)
-d4 e f g
-c1
+@lilypond[verbatim,quote]
+\relative {
+ c''1
+ \set Score.repeatCommands = #'(start-repeat)
+ d4 e f g
+ c1
+}
@end lilypond
En la práctica habitual del grabado no se imprimen signos de
@item @code{end-repeat}
Imprimir una barra de compás @code{:|.}
-@lilypond[verbatim,quote,relative=2]
-c1
-d4 e f g
-\set Score.repeatCommands = #'(end-repeat)
-c1
+@lilypond[verbatim,quote]
+\relative {
+ c''1
+ d4 e f g
+ \set Score.repeatCommands = #'(end-repeat)
+ c1
+}
@end lilypond
@item (volta @var{number}) @dots{} (volta #f)
El corchete de vez se debe terminar de forma explícita, pues en caso
contrario no se imprime.
-@lilypond[verbatim,quote,relative=2]
-f4 g a b
-\set Score.repeatCommands = #'((volta "2"))
-g4 a g a
-\set Score.repeatCommands = #'((volta #f))
-c1
+@lilypond[verbatim,quote]
+\relative {
+ f''4 g a b
+ \set Score.repeatCommands = #'((volta "2"))
+ g4 a g a
+ \set Score.repeatCommands = #'((volta #f))
+ c1
+}
@end lilypond
@end table
Se pueden producir varias instrucciones de repetición en el mismo
punto:
-@lilypond[verbatim,quote,relative=2]
-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
-\set Score.repeatCommands = #'((volta #f))
+@lilypond[verbatim,quote]
+\relative {
+ f''4 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
+ \set Score.repeatCommands = #'((volta #f))
+}
@end lilypond
@cindex corchete de casilla de repetición con texto
@code{@var{número_de_repeticiones}} es el número de veces que
@code{@var{expresión_musical}} se repite.
-@lilypond[verbatim,quote,relative=2]
-\repeat unfold 2 { c4 d e f }
-c1
+@lilypond[verbatim,quote]
+\relative {
+ \repeat unfold 2 { c''4 d e f }
+ c1
+}
@end lilypond
En ciertos casos, especialmente dentro de un contexto
Se pueden hacer repeticiones desplegadas con finales alternativos.
-@lilypond[verbatim,quote,relative=2]
-\repeat unfold 2 { c4 d e f }
-\alternative {
- { c2 g' }
- { c,2 b }
+@lilypond[verbatim,quote]
+\relative {
+ \repeat unfold 2 { c''4 d e f }
+ \alternative {
+ { c2 g' }
+ { c,2 b }
+ }
+ c1
}
-c1
@end lilypond
Si hay más repeticiones que finales alternativos, el primer final
las alternativas restantes completan el número total
de repeticiones.
-@lilypond[verbatim,quote,relative=2]
-\repeat unfold 4 { c4 d e f }
-\alternative {
- { c2 g' }
- { c,2 b }
- { e2 d }
- }
-c1
+@lilypond[verbatim,quote]
+\relative {
+ \repeat unfold 4 { c''4 d e f }
+ \alternative {
+ { c2 g' }
+ { c,2 b }
+ { e2 d }
+ }
+ c1
+}
@end lilypond
Si existen más finales alternativos que repeticiones,
se aplican solo los primeros finales alternativos.
Las alternativas restantes se ignoran y no se imprimen.
-@lilypond[verbatim,quote,relative=2]
-\repeat unfold 2 { c4 d e f }
-\alternative {
- { c2 g' }
- { c,2 b }
- { e2 d }
+@lilypond[verbatim,quote]
+\relative {
+ \repeat unfold 2 { c''4 d e f }
+ \alternative {
+ { c2 g' }
+ { c,2 b }
+ { e2 d }
+ }
+ c1
}
-c1
@end lilypond
Es posible también anidar varias funciones
@code{unfold} (con finales alternativos o sin ellos).
-@lilypond[verbatim,quote,relative=2]
-\repeat unfold 2 {
- \repeat unfold 2 { c4 d e f }
- \alternative {
- { c2 g' }
- { c,2 b }
+@lilypond[verbatim,quote]
+\relative {
+ \repeat unfold 2 {
+ \repeat unfold 2 { c''4 d e f }
+ \alternative {
+ { c2 g' }
+ { c,2 b }
+ }
}
+ c1
}
-c1
@end lilypond
Las construcciones de acorde se pueden repetir mediante el
Los patrones más cortos que un compás se sustituyen por
barras inclinadas.
-@lilypond[verbatim,quote,relative=2]
-\repeat percent 4 { c128 d e f }
-\repeat percent 4 { c64 d e f }
-\repeat percent 5 { c32 d e f }
-\repeat percent 4 { c16 d e f }
-\repeat percent 4 { c8 d }
-\repeat percent 4 { c4 }
-\repeat percent 2 { c2 }
+@lilypond[verbatim,quote]
+\relative c'' {
+ \repeat percent 4 { c128 d e f }
+ \repeat percent 4 { c64 d e f }
+ \repeat percent 5 { c32 d e f }
+ \repeat percent 4 { c16 d e f }
+ \repeat percent 4 { c8 d }
+ \repeat percent 4 { c4 }
+ \repeat percent 2 { c2 }
+}
@end lilypond
Los patrones de repetición de uno o dos compases se sustituyen
por signos parecidos al símbolo de porcentaje.
-@lilypond[verbatim,quote,relative=2]
-\repeat percent 2 { c4 d e f }
-\repeat percent 2 { c2 d }
-\repeat percent 2 { c1 }
+@lilypond[verbatim,quote]
+\relative c'' {
+ \repeat percent 2 { c4 d e f }
+ \repeat percent 2 { c2 d }
+ \repeat percent 2 { c1 }
+}
@end lilypond
-@lilypond[verbatim,quote,relative=2]
-\repeat percent 3 { c4 d e f | c2 g' }
+@lilypond[verbatim,quote]
+\relative {
+ \repeat percent 3 { c''4 d e f | c2 g' }
+}
@end lilypond
Los patrones más cortos que un compás pero que contienen
duraciones mezcladas utilizan un símbolo de porcentaje doble.
-@lilypond[verbatim,quote,relative=2]
-\repeat percent 4 { c8. <d f>16 }
-\repeat percent 2 { \tuplet 3/2 { r8 c d } e4 }
+@lilypond[verbatim,quote]
+\relative {
+ \repeat percent 4 { c''8. <d f>16 }
+ \repeat percent 2 { \tuplet 3/2 { r8 c d } e4 }
+}
@end lilypond
@snippets
Para colocar marcas de trémolo entre las notas, use @code{\repeat} con
el estilo @code{tremolo} (trémolo):
-@lilypond[quote,verbatim,relative=2]
-\repeat tremolo 8 { c16 d }
-\repeat tremolo 6 { c16 d }
-\repeat tremolo 2 { c16 d }
+@lilypond[quote,verbatim]
+\relative c'' {
+ \repeat tremolo 8 { c16 d }
+ \repeat tremolo 6 { c16 d }
+ \repeat tremolo 2 { c16 d }
+}
@end lilypond
La sintaxis de @code{\repeat tremolo} espera que se escriban
Si @code{@var{N}} se omite, se utiliza el último valor (almacenado en
@code{tremoloFlags}):
-@lilypond[quote,verbatim,relative=2]
-c2:8 c:32
-c: c:
+@lilypond[quote,verbatim]
+\relative {
+ c''2:8 c:32
+ c: c:
+}
@end lilypond
@snippets