From 671821ba1f1e9a065593b25ef427b2c66be83518 Mon Sep 17 00:00:00 2001 From: gpercival Date: Thu, 23 Sep 2004 17:32:33 +0000 Subject: [PATCH] More editing. --- ChangeLog | 6 + Documentation/user/notation.itely | 100 ++++++----- Documentation/user/tutorial.itely | 279 +++++++++++++----------------- 3 files changed, 181 insertions(+), 204 deletions(-) diff --git a/ChangeLog b/ChangeLog index 13525cd03e..5d5bcc9e55 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-09-23 Graham Percival + + * Documentation/user/tutorial.itely: do manual style 2-space indents in examples + + * Documentation/user/notation.itely: more editing. + 2004-09-23 Jan Nieuwenhuizen * lily/slur-scoring.cc (get_bezier): Fix for broken beziers. diff --git a/Documentation/user/notation.itely b/Documentation/user/notation.itely index d5d39e02ea..bea79c5414 100644 --- a/Documentation/user/notation.itely +++ b/Documentation/user/notation.itely @@ -2120,7 +2120,7 @@ Metronome settings can be entered as follows 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 @@ -2727,27 +2727,37 @@ objects. Vertical positioning of these symbols is handled by the @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 @@ -2758,22 +2768,14 @@ used to typeset two lines of lyrics in songs with repeats, see @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 @@ -2879,27 +2881,28 @@ example by setting @code{Score.measurePosition} or entering @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 @{ @@ -2959,17 +2962,17 @@ Program reference: @internalsref{VoltaBracket}, @internalsref{RepeatedMusic}, 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 @@ -2999,10 +3002,11 @@ length is omitted, the last value (stored in @code{tremoloFlags}) is 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 @@ -3026,9 +3030,9 @@ Patterns of one and two measures are replaced by percent-like signs, 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 diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index 0840e96c46..3cb6f8e3d7 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -24,7 +24,7 @@ LilyPond input that was used to generate that image. 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 @@ -68,14 +68,14 @@ of music, a scale. A note can be entered by typing its name, from @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. @@ -88,9 +88,9 @@ a1 a2 a4 a16 a32 @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 @@ -98,12 +98,12 @@ used for the next notes. The duration of the first note in input 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 @@ -111,67 +111,64 @@ Rests are entered just like notes, but with the name @samp{r} @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 @@ -179,12 +176,10 @@ Remember to enclose the notes and commands in curly braces @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 @@ -227,7 +222,7 @@ the file @file{INSTALL.txt}.} In your text editor, enter the following input and save the file as @file{test.ly} @example -@{ c'4 e' g' @} + @{ c'4 e' g' @} @end example @noindent @@ -277,7 +272,7 @@ word processor, since these insert formatting codes that will confuse 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 @@ -296,12 +291,12 @@ derived from note naming conventions in Nordic and Germanic languages, 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 @@ -309,17 +304,17 @@ The key signature is set with the command @code{\key}, followed by 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 @@ -341,33 +336,28 @@ not be added automatically, and you must enter what you want to hear. 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 @@ -395,7 +385,7 @@ A tie is created by appending a tilde @samp{~} to the first note 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}. @@ -409,7 +399,7 @@ 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 @@ -418,7 +408,7 @@ hand. Mark the first note to be beamed with @samp{[} and the last one 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}. @@ -426,32 +416,13 @@ 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 } @@ -484,21 +455,17 @@ To raise a note by an octave, add a high quote @code{'} (apostrophe) to 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 @@ -569,14 +536,14 @@ expression}. We have already seen in the previous examples; 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 @@ -586,7 +553,7 @@ Here, the expression from the previous example is combined with two 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 @@ -599,9 +566,9 @@ two other notes) are combined simultaneously @lilypond[fragment,quote,verbatim,relative=3] << - { a4 g } - { f e } - { d b } + { a4 g } + { f e } + { d b } >> @end lilypond @@ -735,7 +702,7 @@ Common accents can be added to a note using a dash (@samp{-}) and a single character @lilypond[fragment,quote,verbatim,relative=2] -c-. c-- c-> c-^ c-+ c-_ + c-. c-- c-> c-^ c-+ c-_ @end lilypond @cindex fingering @@ -743,7 +710,7 @@ Similarly, fingering indications can be added to a note using a dash (@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 @@ -752,14 +719,14 @@ also use multiple articulations on the same note. In most cases, it is 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 @@ -771,7 +738,7 @@ Crescendi and decrescendi are started with the commands @code{\<} and 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 @@ -783,7 +750,7 @@ articulation. The starting note and ending note are marked with @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 @@ -794,7 +761,7 @@ and can be used on larger groups of notes. Slurs and ties can be nested @lilypond[quote,fragment,relative=2] -c2~( c8 fis fis4 ~ fis2 g2) + c2~( c8 fis fis4 ~ fis2 g2) @end lilypond @cindex phrasing slurs @@ -803,7 +770,7 @@ Slurs to indicate phrasing can be entered with @code{\(} and 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 @@ -833,7 +800,7 @@ Chords can be made by surrounding pitches with angle brackets. Angle brackets are the symbols @samp{<} and @samp{>}. @lilypond[quote,relative=1,fragment,verbatim] -r4 4 8 + r4 4 8 @end lilypond @@ -841,16 +808,16 @@ You can combine markings like beams and ties with chords. They must be placed outside the angled brackets @lilypond[quote,relative=1,fragment,verbatim] -r4 8[ ]~ + r4 8[ ]~ @end lilypond @example -r4 8\>( \!) + r4 8\>( \!) @end example @lilypond[quote,relative=1,fragment] -\slurUp -r4 8\>( \!) + \slurUp + r4 8\>( \!) @end lilypond @@ -865,8 +832,8 @@ is followed by a duration: @code{\partial 4} is a quarter note upstep 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 @@ -877,8 +844,8 @@ of music is multiplied by the fraction. Triplets make notes occupy 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 @@ -889,8 +856,8 @@ keyword @code{\appoggiatura} or @code{\acciaccatura} @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 @@ -925,7 +892,7 @@ ignored. The following fragment shows possible uses for comments @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 @@ -947,7 +914,7 @@ statement marks for which version of LilyPond the file was written. To mark a file for version 3.0.0, use @example -\version "3.0.0" + \version "3.0.0" @end example @noindent @@ -975,8 +942,8 @@ Consider the melody @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 @@ -1024,10 +991,10 @@ Twin -- kle twin -- kle @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 @@ -1046,7 +1013,7 @@ In popular music, it is common to denote accompaniment with chord names. Such chords can be entered like notes, @lilypond[quote,verbatim,raggedright] -\chordmode { c2 f4. g8 } + \chordmode { c2 f4. g8 } @end lilypond @noindent @@ -1058,7 +1025,7 @@ Other chords can be created by adding modifiers after a colon. The 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 @@ -1067,7 +1034,7 @@ line of themselves. Hence, we have to override the context with 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 @@ -1090,7 +1057,7 @@ a lead sheet, for example, 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 @@ -1192,7 +1159,7 @@ but now this entire expression must be interpreted as a @code{PianoStaff} @example -\new PianoStaff << \new Staff @dots{} >> + \new PianoStaff << \new Staff @dots{} >> @end example Here is a small example @@ -1219,7 +1186,7 @@ By using variables, also known as identifiers, it is possible to break up complex music expressions. An identifier is assigned as follows @example -namedMusic = @{ @dots{} @} + namedMusic = @{ @dots{} @} @end example @noindent @@ -1243,9 +1210,9 @@ It is possible to use variables for many other types of objects in the 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 @@ -1328,14 +1295,14 @@ duration, longer rests can be constructed. For example, this rest 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 @@ -1345,11 +1312,11 @@ this option to the music above, leads to the following result @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 @@ -1361,10 +1328,10 @@ that the other voice is in @code{bassoonNotes} in the file \include "bassoon-music.ly" \include "horn-music.ly" - << - \new Staff \hornNotes - \new Staff \bassoonNotes - >> +<< + \new Staff \hornNotes + \new Staff \bassoonNotes +>> @end example @noindent -- 2.39.5