In the MIDI output, they are interpreted as a tempo change. In the
paper output, a metronome marking is printed
@cindex @code{\tempo}
-@lilypond[quote,fragment,verbatim]
+@lilypond[quote,verbatim,fragment]
\tempo 8.=120 c''1
@end lilypond
@node Repeats
@section Repeats
+Repetition is a central concept in music, and multiple notations exist
+for repetitions.
-@cindex repeats
-@cindex @code{\repeat}
+@menu
+* Repeat types::
+* Repeat syntax::
+* Repeats and MIDI::
+* Manual repeat commands::
+* Tremolo repeats::
+* Tremolo subdivisions::
+* Measure repeats::
+@end menu
+@node Repeat types
+@subsection Repeat types
-Repetition is a central concept in music, and multiple notations exist
-for repetitions. In LilyPond, most of these notations can be captured
-in a uniform syntax. One of the advantages is that repeats entered in
-this way can be rendered in MIDI accurately.
+@cindex repeats
+@cindex @code{\repeat}
The following types of repetition are supported
@table @code
@item unfold
-Repeated music is fully written (played) out. Useful for MIDI
-output, and entering repetitive music.
+Repeated music is fully written (played) out. This is useful when
+entering repetitious music. This is the only kind of repeat that
+is included in MIDI output.
@item volta
Repeats are not written out, but alternative endings (volte) are
printed, left to right with brackets. This is the standard notation
-for repeats with alternatives.
+for repeats with alternatives. These are not played in MIDI output by default.
@ignore
@item fold
@c tremolo, beamed
@item tremolo
-Make tremolo beams.
+Make tremolo beams. These are not played in MIDI output by default.
@item percent
-Make beat or measure repeats. These look like percent signs.
+Make beat or measure repeats. These look like percent signs. These are not played
+in MIDI output by default.
@end table
-@menu
-* Repeat syntax::
-* Repeats and MIDI::
-* Manual repeat commands::
-* Tremolo repeats::
-* Tremolo subdivisions::
-* Measure repeats::
-@end menu
-
@node Repeat syntax
@subsection Repeat syntax
@cindex expanding repeats
-An advantage of the unified syntax for repeats, is that all repeats
-may be played out for the MIDI output. This is achieved by
-applying the @code{\unfoldrepeats} music function.
-
-@lilypond[verbatim,raggedright]
-\new Staff
- \unfoldrepeats {
- \repeat tremolo 8 {c'32 e' }
- \repeat percent 2 { c''8 d'' }
- \repeat volta 2 {c'4 d' e' f'}
- \alternative {
- { g' a' a' g' }
- {f' e' d' c' }
- }
- \bar "|."
+With a little bit of tweaking, all types of repeats can be present
+in the MIDI output. This is achieved by applying the
+@code{\unfoldrepeats} music function. This functions changes all
+repeats to unfold repeats.
+
+@lilypond[verbatim,raggedright,fragment]
+\unfoldrepeats {
+ \repeat tremolo 8 {c'32 e' }
+ \repeat percent 2 { c''8 d'' }
+ \repeat volta 2 {c'4 d' e' f'}
+ \alternative {
+ { g' a' a' g' }
+ {f' e' d' c' }
}
+}
+\bar "|."
@end lilypond
When creating a score file using @code{\unfoldrepeats} for midi, then
-it is necessary to make two @code{\score} blocks. One for MIDI, with
-unfolded repeats, and one for notation, eg.
+it is necessary to make two @code{\score} blocks. One for MIDI (with
+unfolded repeats) and one for notation (with volta, tremolo, and
+percent repeats). For example,
@example
\score @{
To place tremolo marks between notes, use @code{\repeat} with tremolo
style
@lilypond[quote,verbatim,raggedright]
- \context Voice \relative c' {
- \repeat "tremolo" 8 { c16 d16 }
- \repeat "tremolo" 4 { c16 d16 }
- \repeat "tremolo" 2 { c16 d16 }
- }
+\new Voice \relative c' {
+ \repeat "tremolo" 8 { c16 d16 }
+ \repeat "tremolo" 4 { c16 d16 }
+ \repeat "tremolo" 2 { c16 d16 }
+}
@end lilypond
Tremolo marks can also be put on a single note. In this case, the
note should not be surrounded by braces.
@lilypond[quote,verbatim,raggedright]
-\repeat "tremolo" 4 c'16
+ \repeat "tremolo" 4 c'16
@end lilypond
Similar output is obtained using the tremolo subdivision, described in
used
@lilypond[quote,verbatim,fragment]
-c'2:8 c':32 | c': c': |
+ c'2:8 c':32 | c': c': |
@end lilypond
@c [TODO : stok is te kort bij 32en]
+@c somebody want to translate that into English? :)
@refbugs
patterns that divide the measure length are replaced by slashes
@lilypond[quote,verbatim,raggedright]
-\new Voice {
- \repeat "percent" 4 { c'4 }
- \repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 }
+\new Voice \relative c' {
+ \repeat "percent" 4 { c4 }
+ \repeat "percent" 2 { c2 es2 f4 fis4 g4 c4 }
}
@end lilypond
Try it on this image
@lilypond[fragment,quote,raggedright,relative=2]
-c-\markup { \bold \huge { Click here. } }
+ c-\markup { \bold \huge { Click here. } }
@end lilypond
@end ifhtml
@samp{a} through @samp{g}. So, if you enter
@example
-c d e f g a b
+ c d e f g a b
@end example
@noindent
the result looks like this
@lilypond[fragment,quote,notime,relative=1]
-c d e f g a b
+ c d e f g a b
@end lilypond
The duration of a note is specified by a number after the note name.
@c FIXME: have NOTIME also remove Score.timing?
@lilypond[fragment,quote,notime,relative=2]
-\set Score.timing = ##f
-\set Staff.autoBeaming = ##f
-{ a1 a2 a4 a16 a32 s16_" " }
+ \set Score.timing = ##f
+ \set Staff.autoBeaming = ##f
+ { a1 a2 a4 a16 a32 s16_" " }
@end lilypond
If you do not specify a @rglos{duration}, the duration last entered is
defaults to a quarter
@example
-a a8 a a2 a
+ a a8 a a2 a
@end example
@lilypond[fragment,quote,notime,relative=2]
-\set Score.timing = ##f
-{ a a8 a a2 a s16_" " }
+ \set Score.timing = ##f
+ { a a8 a a2 a s16_" " }
@end lilypond
@cindex rests
@example
-r2 r4 r8 r16
+ r2 r4 r8 r16
@end example
@lilypond[fragment,quote,notime]
-\set Score.timing = ##f
-r2 r4 r8 r16 s16_" "
+ \set Score.timing = ##f
+ r2 r4 r8 r16 s16_" "
@end lilypond
Add a dot @samp{.} after the duration to get a @rglos{dotted note}
@example
-a2. a4 a8. a16
+ a2. a4 a8. a16
@end example
@lilypond[fragment,quote,notime,relative=1]
-\set Score.timing = ##f
-{ a2. a4 a8. a16 s16_" " }
+ \set Score.timing = ##f
+ { a2. a4 a8. a16 s16_" " }
@end lilypond
The @rglos{meter} (or @rglos{time signature}) can be set with the
@code{\time} command
@example
-\time 3/4
-\time 6/8
-\time 4/4
+ \time 3/4
+ \time 6/8
+ \time 4/4
@end example
@c A clef here may lead to confusion, remove it.
@lilypond[fragment,quote]
-\override Staff.Clef #'transparent = ##t
-\time 3/4
-s4_" "
-\time 6/8
-s4_" "
-\time 4/4
-s16_" "
+ \override Staff.Clef #'transparent = ##t
+ \time 3/4
+ s4_" "
+ \time 6/8
+ s4_" "
+ \time 4/4
+ s16_" "
@end lilypond
The @rglos{clef} can be set using the @code{\clef} command
-@c what is more common name treble or violin?
-@c in Dutch, it is violin.
-@c in English it is definitely treble.
@example
-\clef treble
-\clef bass
-\clef alto
-\clef tenor
+ \clef treble
+ \clef bass
+ \clef alto
+ \clef tenor
@end example
@lilypond[fragment,quote,notime]
-\set Score.timing = ##f
-\clef violin
-s4_" "
-\clef bass
-s4_" "
-\clef alto
-s4_" "
-\clef tenor
-s16_" "
+ \set Score.timing = ##f
+ \clef treble
+ s4_" "
+ \clef bass
+ s4_" "
+ \clef alto
+ s4_" "
+ \clef tenor
+ s16_" "
@end lilypond
@code{@{@tie{}@dots{}@tie{}@}} to convert it to printable output.
@lilypond[fragment,quote,noindent,linewidth=55\staffspace]
-{
\time 3/4
\clef bass
c2 e4 g2.
f4 e d c2 r4
-}
@end lilypond
For more elaborate information on
input and save the file as @file{test.ly}
@example
-@{ c'4 e' g' @}
+ @{ c'4 e' g' @}
@end example
@noindent
LilyPond.} and enter
@example
-@{ c'4 e' g' @}
+ @{ c'4 e' g' @}
@end example
Save it on the desktop as @file{test.ly} and make sure that it is not
like German and Dutch.}
@example
-cis1 ees fisis aeses
+ cis1 ees fisis aeses
@end example
@lilypond[fragment,quote,notime]
-\set Score.timing = ##f
-\transpose c c' { cis1 ees fisis aeses s16_" " }
+ \set Score.timing = ##f
+ \transpose c c' { cis1 ees fisis aeses s16_" " }
@end lilypond
@cindex key signature, setting
a pitch and @code{\major} or @code{\minor}
@example
-\key d \major
-g1
-\key c \minor
-g
+ \key d \major
+ g1
+ \key c \minor
+ g
@end example
@lilypond[fragment,quote,notime,fragment]
-\key d \major
-g'1
-\key c \minor
-g'
+ \key d \major
+ g'1
+ \key c \minor
+ g'
@end lilypond
@noindent
In this example
@lilypond[quote,notime,fragment]
-\key d \major
-d' cis' fis'
+ \key d \major
+ d' cis' fis'
@end lilypond
@noindent
no note has an explicit accidental, but you still must enter
@example
-\key d \major
-d cis fis
+ \key d \major
+ d cis fis
@end example
@noindent
The code @samp{d} does not mean `print a black dot just below the
staff.' Rather, it means: `a note with pitch D-natural.' In the key
-of A-flat, it does get an accidental
+of A-flat major, it does get an accidental
-@lilypond[quote,notime,fragment]
-\key as \major
-d'
+@lilypond[quote,notime,fragment,relative=1,verbatim]
+ \key as \major
+ d
@end lilypond
-@example
-\key as \major
-d
-@end example
-
Adding all alterations explicitly might require a little more effort
when typing, but the advantage is that transposing is easier, and
accidentals can be printed according to different conventions. See
being tied
@lilypond[quote,notime,fragment,verbatim,relative=3]
-g4~ g a2~ a4
+ g4~ g a2~ a4
@end lilypond
For more information on Ties see @ref{Ties}.
Beams are drawn automatically
@lilypond[quote,fragment,relative=2,verbatim]
-a8 ais d es r d
+ a8 ais d es r d
@end lilypond
@noindent
with @samp{]}.
@lilypond[quote,fragment,relative=2,verbatim]
-a8[ ais] d[ es r d]
+ a8[ ais] d[ es r d]
@end lilypond
For more information on beams, see @ref{Beaming}.
Here are key signatures, accidentals and ties in action
-@example
-@{
+@lilypond[fragment,quote,noindent,linewidth=50\staffspace,verbatim]
+\relative c'' {
\time 4/4
\key g \minor
\clef violin
r4 r8 a8 gis4 b
- a8 d4.~ d e8
- fis4 fis8 fis8 eis4 a8 gis~
- gis2 r2
-@}
-@end example
-
-@ignore
-FIXME
-ugr: removing the ignore block, leaving the comment line below
-@c TODO: use relative mode, verbatim, junk \transpose and above @example
-@end ignore
-
-
-@lilypond[fragment,quote,noindent,linewidth=50\staffspace]
-\transpose c c' {
- \time 4/4
- \key g \minor
- \clef violin
- r4 r8 a8 gis4 b
- a8 d4.~ d e8
+ a8 d4.~ d e,8
fis4 fis8 fis8 eis4 a8 gis~
gis2 r2
}
the note name, to lower a note one octave, add a `low quote' @code{,}
(a comma). Middle C is @code{c'}
-@example
-c'4 c'' c''' \clef bass c c,
-@end example
-
-@lilypond[quote,notime,fragment]
+@lilypond[quote,notime,fragment,verbatim]
c'4 c'' c''' \clef bass c c,
@end lilypond
An example of the use of quotes is in the following Mozart fragment
@lilypond[quote,raggedright,fragment,verbatim]
-\key a \major
-\time 6/8
-cis''8. d''16 cis''8 e''4 e''8
-b'8. cis''16 b'8 d''4 d''8
+ \key a \major
+ \time 6/8
+ cis''8. d''16 cis''8 e''4 e''8
+ b'8. cis''16 b'8 d''4 d''8
@end lilypond
@noindent
a single note is a music expression
@lilypond[fragment,quote,verbatim,relative=3]
-a4
+ a4
@end lilypond
Enclosing group of notes in braces creates a new music
expression
@lilypond[fragment,quote,verbatim,relative=3]
-{ a4 g4 }
+ { a4 g4 }
@end lilypond
Putting a bunch of music expressions (notes) in braces, means that
notes
@lilypond[fragment,quote,verbatim,relative=3]
-{ { a4 g } f g }
+ { { a4 g } f g }
@end lilypond
This technique is useful for non-monophonic music. To enter music
@lilypond[fragment,quote,verbatim,relative=3]
<<
- { a4 g }
- { f e }
- { d b }
+ { a4 g }
+ { f e }
+ { d b }
>>
@end lilypond
single character
@lilypond[fragment,quote,verbatim,relative=2]
-c-. c-- c-> c-^ c-+ c-_
+ c-. c-- c-> c-^ c-+ c-_
@end lilypond
@cindex fingering
(@samp{-}) and the digit to be printed
@lilypond[fragment,quote,verbatim,relative=2]
-c-3 e-5 b-2 a-1
+ c-3 e-5 b-2 a-1
@end lilypond
Articulations and fingerings are usually placed automatically, but you
best to let LilyPond determine the articulation directions.
@lilypond[fragment,quote,verbatim,relative=2]
-c_-^1 d^. f^4_2-> e^-_+
+ c_-^1 d^. f^4_2-> e^-_+
@end lilypond
Dynamic signs are made by adding the markings (with a backslash) to
the note
@lilypond[fragment,quote,verbatim,relative=2]
-c\ff c\mf
+ c\ff c\mf
@end lilypond
@cindex dynamics
crescendo, or the command @code{\!} can be used
@lilypond[fragment,quote,verbatim,relative=2]
-c2\< c2\ff\> c2 c2\!
+ c2\< c2\ff\> c2 c2\!
@end lilypond
@samp{(} and @samp{)}, respectively
@lilypond[fragment,quote,fragment,relative=2,verbatim]
-d4( c16) cis( d e c cis d) e( d4)
+ d4( c16) cis( d e c cis d) e( d4)
@end lilypond
@cindex slurs versus ties
nested
@lilypond[quote,fragment,relative=2]
-c2~( c8 fis fis4 ~ fis2 g2)
+ c2~( c8 fis fis4 ~ fis2 g2)
@end lilypond
@cindex phrasing slurs
same time.
@lilypond[quote,fragment,relative=2,verbatim]
-a8(\( ais b c) cis2 b'2 a4 cis, c\)
+ a8(\( ais b c) cis2 b'2 a4 cis, c\)
@end lilypond
Angle brackets are the symbols @samp{<} and @samp{>}.
@lilypond[quote,relative=1,fragment,verbatim]
-r4 <c e g>4 <c f a>8
+ r4 <c e g>4 <c f a>8
@end lilypond
be placed outside the angled brackets
@lilypond[quote,relative=1,fragment,verbatim]
-r4 <c e g>8[ <c f a>]~ <c f a>
+ r4 <c e g>8[ <c f a>]~ <c f a>
@end lilypond
@example
-r4 <c e g>8\>( <c e g> <c e g> <c f a>\!)
+ r4 <c e g>8\>( <c e g> <c e g> <c f a>\!)
@end example
@lilypond[quote,relative=1,fragment]
-\slurUp
-r4 <c e g>8\>( <c e g> <c e g> <c f a>\!)
+ \slurUp
+ r4 <c e g>8\>( <c e g> <c e g> <c f a>\!)
@end lilypond
and @code{\partial 8} an eighth note
@lilypond[quote,relative=2,verbatim,fragment]
-\partial 8
-f8 c2 d e
+ \partial 8
+ f8 c2 d e
@end lilypond
@cindex tuplets
2/3 of their notated duration, so a triplet has 2/3 as its fraction
@lilypond[quote,relative=1,verbatim,fragment]
-\times 2/3 { f8 g a }
-\times 2/3 { c r c }
+ \times 2/3 { f8 g a }
+ \times 2/3 { c r c }
@end lilypond
@cindex grace notes
@cindex acciaccatura
@lilypond[quote,relative=2,verbatim,fragment]
-c4 \appoggiatura b16 c4
-c4 \acciaccatura b16 c4
+ c4 \appoggiatura b16 c4
+ c4 \acciaccatura b16 c4
@end lilypond
@noindent
@example
% notes for twinkle twinkle follow
-c4 c g' g a a g2
+ c4 c g' g a a g2
%@{
This line, and the notes below
To mark a file for version 3.0.0, use
@example
-\version "3.0.0"
+ \version "3.0.0"
@end example
@noindent
@lilypond[quote,verbatim,fragment,raggedright]
\relative {
- r4 c \times 2/3 { f g g }
- \times 2/3 { g4( a2) }
+ r4 c \times 2/3 { f g g }
+ \times 2/3 { g4( a2) }
}
@end lilypond
@lilypond[fragment,quote,raggedright]
<<
\relative {
- \time 2/4
- f4 f c' c
- }
- \addlyrics { Twin -- kle twin -- kle }
+ \time 2/4
+ f4 f c' c
+ }
+ \addlyrics { Twin -- kle twin -- kle }
>>
@end lilypond
Such chords can be entered like notes,
@lilypond[quote,verbatim,raggedright]
-\chordmode { c2 f4. g8 }
+ \chordmode { c2 f4. g8 }
@end lilypond
@noindent
following example shows a few common modifiers
@lilypond[quote,verbatim]
-\chordmode { c2 f4:m g4:maj7 gis1:dim7 }
+ \chordmode { c2 f4:m g4:maj7 gis1:dim7 }
@end lilypond
For lead sheets, chords are not printed on staves, but as names on a
context
@lilypond[quote,verbatim]
-\chordmode { c2 f4.:m g4.:maj7 gis8:dim7 }
+ \chordmode { c2 f4.:m g4.:maj7 gis8:dim7 }
@end lilypond
@cindex lead sheet
r4 c' \times 2/3 { f g g }
\times 2/3 { g4( a2) }
}
- \addlyrics { I want to break free __ }
+ \addlyrics { I want to break free __ }
>>
@end lilypond
@code{PianoStaff}
@example
-\new PianoStaff << \new Staff @dots{} >>
+ \new PianoStaff << \new Staff @dots{} >>
@end example
Here is a small example
up complex music expressions. An identifier is assigned as follows
@example
-namedMusic = @{ @dots{} @}
+ namedMusic = @{ @dots{} @}
@end example
@noindent
input. For example,
@example
-width = 4.5\cm
-name = "Wendy"
-aFivePaper = \paper @{ paperheight = 21.0 \cm @}
+ width = 4.5\cm
+ name = "Wendy"
+ aFivePaper = \paper @{ paperheight = 21.0 \cm @}
@end example
Depending on its contents, the identifier can be used in different
takes 3@tie{}measures in 2/4 time
@example
-R2*3
+ R2*3
@end example
When printing the part, multi-rests
must be condensed. This is done by setting a run-time variable
@example
-\set Score.skipBars = ##t
+ \set Score.skipBars = ##t
@end example
@noindent
@lilypond[quote,raggedright]
\transpose f c' \relative c {
- \time 2/4
- \set Score.skipBars = ##t
- R2*3
- r4 f8 a cis4 f e d
- }
+ \time 2/4
+ \set Score.skipBars = ##t
+ R2*3
+ r4 f8 a cis4 f e d
+}
@end lilypond
\include "bassoon-music.ly"
\include "horn-music.ly"
- <<
- \new Staff \hornNotes
- \new Staff \bassoonNotes
- >>
+<<
+ \new Staff \hornNotes
+ \new Staff \bassoonNotes
+>>
@end example
@noindent