]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/learning/fundamental.itely
Merge branch 'lilypond/translation' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / Documentation / learning / fundamental.itely
index 3d6bf5ea0183cda8639c99084db11176a48d00b4..690c7352f20d41b76fea2d20e8434431ce42292a 100644 (file)
@@ -71,7 +71,7 @@ example serves as a useful starting place.
 @cindex book
 @cindex score
 
-Up to this point none of the examples you have seen has used a
+Up to this point none of the examples you have seen have used a
 @code{\score@{@}} command.  This is because LilyPond automatically
 adds the extra commands which are needed when you give it simple
 input.  LilyPond treats input like this:
@@ -215,8 +215,8 @@ For details see @ruser{Multiple scores in a book}.
 
 @cindex variables
 
-Another great shorthand is the ability to define variables.  All
-the templates use this
+Another great shorthand is the ability to define variables (see
+@ref{Organizing pieces with variables}.  All the templates use this
 
 @example
 melody = \relative c' @{
@@ -276,24 +276,11 @@ music expression, you may find it useful to review the tutorial,
 @ref{Music expressions explained}.  In that section, we saw how to
 build big music expressions from small pieces -- we started from
 notes, then chords, etc.  Now we're going to start from a big
-music expression and work our way down.
-
-@example
-\score @{
-  @{ % this brace begins the overall compound music expression
-    \new StaffGroup <<
-      @var{...insert the whole score of a Wagner opera in here...}
-    >>
-  @} % this brace ends the overall compound music expression
-  \layout @{ @}
-@}
-@end example
-
-A whole Wagner opera would easily double the length of this
-manual, so let's just add a singer and piano.  We don't need a
+music expression and work our way down.  For simplicity, we'll use
+just a singer and piano in our example.  We don't need a
 @code{StaffGroup} for this ensemble, which simply groups a number
-of staves together with a bracket at the left, so we shall remove
-it.  We @emph{do} need a singer and a piano, though.
+of staves together with a bracket at the left, but we do need
+staves for a singer and a piano, though.
 
 @example
 \score @{
@@ -307,16 +294,23 @@ it.  We @emph{do} need a singer and a piano, though.
 @}
 @end example
 
+Here we have given names to the staves -- @qq{singer} and
+@qq{piano}.  This is not essential here, but it is a useful habit
+to cultivate so that you can see at a glance what each stave is
+for.
+
 Remember that we use @code{<< ... >>} instead of @code{@{ ... @}} to
-show simultaneous music.  And we definitely want to show the vocal
-part and piano part at the same time, not one after the other!  Note
-that the @code{<< ... >>} construct is not really necessary for the
-Singer staff, as it contains only one sequential music expression;
-however, using @code{<< ... >>} instead of braces is still necessary
-if the music in the Staff is made of two simultaneous expressions,
-e.g. two simultaneous Voices, or a Voice with lyrics.  We'll add some
-real music later; for now let's just put in some dummy notes and
-lyrics.
+show simultaneous music.  This causes the vocal part and piano part
+to appear one above the other in the score.  The @code{<< ... >>}
+construct would not be necessary for the Singer staff in the example
+above if it were going to contain only one sequential music
+expression, but @code{<< ... >>} rather than braces is necessary if
+the music in the Staff is to contain two or more simultaneous
+expressions, e.g. two simultaneous Voices, or a Voice with lyrics.
+We're going to have a voice with lyrics, so angle brackets are
+required.  We'll add some real music later; for now let's just put
+in some dummy notes and lyrics.  If you've forgotten how to add lyrics
+you may wish to review @code{\addlyrics} in @ref{Setting simple songs}.
 
 @lilypond[verbatim,quote,ragged-right]
 \score {
@@ -339,7 +333,8 @@ contains a @code{Voice} (in LilyPond, this term refers to a set of
 notes, not necessarily vocal notes -- for example, a violin
 generally plays one voice) and some lyrics.  We also have a piano
 staff: it contains an upper staff (right hand) and a lower staff
-(left hand).
+(left hand), although the lower staff has yet to be given a bass
+clef.
 
 At this stage, we could start filling in notes.  Inside the curly
 braces next to @code{\new Voice = "vocal"}, we could start writing
@@ -353,8 +348,15 @@ braces next to @code{\new Voice = "vocal"}, we could start writing
 But if we did that, the @code{\score} section would get pretty
 long, and it would be harder to understand what was happening.  So
 let's use variables instead.  These were introduced at the end
-of the previous section, remember?  So, adding a few notes, we
-now have a piece of real music:
+of the previous section, remember?  To ensure the contents of the
+@code{text} variable are interpreted as lyrics we preface them with
+@code{\lyricmode}.  Like @code{\addlyrics}, this switches the input
+mode to lyrics.  Without that, LilyPond would try to interpret the
+contents as notes, which would generate errors.  (Several other
+input modes are available, see @ruser{Input modes}.)
+
+So, adding a few notes and a bass clef for the left hand, we now
+have a piece of real music:
 
 @lilypond[verbatim,quote,ragged-right]
 melody = \relative c'' { r4 d8\noBeam g, c4 r }
@@ -380,14 +382,6 @@ lower  = \relative c { b2 e2 }
 }
 @end lilypond
 
-
-Be careful about the difference between notes, which are introduced
-with @code{\relative} or which are directly included in a music
-expression, and lyrics, which are introduced with
-@code{\lyricmode}.  These are essential to tell LilyPond
-to interpret the following content as music and text
-respectively.
-
 When writing (or reading) a @code{\score} section, just take it
 slowly and carefully.  Start with the outer level, then work on
 each smaller level.  It also really helps to be strict with
@@ -477,10 +471,11 @@ and @ruser{Ossia staves}.
 @cindex bracket types
 @cindex brackets, enclosing vs. marking
 
-You have already met a number of different types of bracket in
-writing the input file to LilyPond.  These obey different rules
-which can be confusing at first.  Before we explain the rules
-let's first review the different types of bracket.
+You have already met a number of different types of bracket and
+bracket-like constructs in writing the input file to LilyPond.
+These obey different rules which can be confusing at first.
+Let's first review the different types of brackets and bracket-like
+constructs.
 
 @c attempt to force this onto a new page
 @need 50
@@ -512,9 +507,10 @@ different types to be properly nested, like this, @code{<< [ @{ ( .. )
 opposite order to the opening brackets.  This @strong{is} a
 requirement for the three types of bracket described by the word
 @q{Encloses} in the table above -- they must nest properly.  However,
-the remaining brackets, described with the word @q{Marks} in the table
-above together with ties and tuplets, do @strong{not} have to nest
-properly with any of the brackets.  In fact, these are not brackets in
+the remaining bracket-like constructs, described with the word
+@q{Marks} in the table above together with ties and tuplets, do
+@strong{not} have to nest properly with any of the brackets or
+bracket-like constructs.  In fact, these are not brackets in
 the sense that they enclose something -- they are simply markers to
 indicate where something starts and ends.
 
@@ -526,13 +522,12 @@ musical, perhaps, but possible:
  { g8\( a b[ c b\) a] }
 @end lilypond
 
-In general, different kinds of brackets, and those implied by
-tuplets, ties and grace notes, may be mixed freely.
-This example shows a beam extending into a tuplet (line 1),
-a slur extending into a tuplet (line 2),
-a beam and a slur extending into a tuplet, a tie crossing
-two tuplets, and a phrasing slur extending out of a tuplet
-(lines 3 and 4).
+In general, different kinds of brackets, bracket-like constructs,
+and those implied by tuplets, ties and grace notes, may be mixed
+freely.  This example shows a beam extending into a tuplet (line 1),
+a slur extending into a tuplet (line 2), a beam and a slur
+extending into a tuplet, a tie crossing two tuplets, and a
+phrasing slur extending out of a tuplet (lines 3 and 4).
 
 @lilypond[quote,verbatim,fragment,ragged-right]
 {
@@ -1703,7 +1698,7 @@ brackets because it requires only one voice.)
 @cindex contexts, naming
 @cindex naming contexts
 
-The @code{\new} command may also give a identifying name to the
+The @code{\new} command may also give an identifying name to the
 context to distinguish it from other contexts of the same type,
 
 @example
@@ -2006,7 +2001,7 @@ hash sign, @code{#}, while a true or false value is specified by
 @code{##t} and @code{##f}, with two hash signs.  A text property
 should be enclosed in double quotation signs, as above, although we
 shall see later that text can actually be specified in a much more
-general way by using the very powerful @code{markup} command.
+general way by using the very powerful @code{\markup} command.
 
 @subsubheading Setting context properties with @code{\with}
 
@@ -2281,7 +2276,7 @@ But what if you want something that isn't covered there?  Read on.
 
 Start off with the template that seems closest to what you want to end
 up with.  Let's say that you want to write something for soprano and
-cello.  In this case, we would start with @q{Notes and lyrics} (for the
+cello.  In this case, we would start with the @q{Notes and lyrics} template (for the
 soprano part).
 
 @example
@@ -2936,7 +2931,7 @@ violin = \new Staff { \fragmentA \fragmentA \fragmentB \fragmentA }
 @end lilypond
 
 However, you can also use these variables (also known as
-variables, macros, or (user-defined) command) for tweaks:
+macros, or user-defined commands) for tweaks:
 
 @c TODO Avoid padtext - not needed with skylining
 @lilypond[quote,verbatim,ragged-right]