]> git.donarmstrong.com Git - lilypond.git/commitdiff
docs Index fundamental.itely part 2
authorRalph Palmer <palmer.r.violin@gmail.com>
Thu, 11 Sep 2008 08:52:33 +0000 (09:52 +0100)
committerTrevor Daniels <t.daniels@treda.co.uk>
Thu, 11 Sep 2008 08:53:47 +0000 (09:53 +0100)
Documentation/user/fundamental.itely

index 453d8d2b760658610b105e7241f4b5d43d610d4f..b0a7da2510addb4d4b68c943ac9abab6073b6e37 100644 (file)
@@ -506,18 +506,17 @@ between or across notes: ties (marked by a tilde, @code{~}),
 tuplets written as @code{\times x/y @{..@}}, and grace notes
 written as @code{\grace@{..@}}.
 
-Outside LilyPond, the conventional use of brackets requires
-the different types to be properly nested, like this,
-@code{<< [ @{ ( .. ) @} ] >>}, with the closing brackets being
-encountered in exactly the 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 sense that they enclose something -- they are simply
-markers to indicate where something starts and ends.
+Outside LilyPond, the conventional use of brackets requires the
+different types to be properly nested, like this, @code{<< [ @{ ( .. )
+@} ] >>}, with the closing brackets being encountered in exactly the
+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 sense that they enclose something -- they are simply markers to
+indicate where something starts and ends.
 
 So, for example, a phrasing slur can start before a manually
 inserted beam and end before the end of the beam -- not very
@@ -580,16 +579,14 @@ score are called @q{Voice contexts} or just @q{Voices} for short.
 Voices are sometimes called @q{layers} in other notation
 packages.
 
-In fact, a Voice layer or context is the only one which can
-contain music.  If a Voice context is not explicitly declared
-one is created automatically, as we saw at the beginning of
-this chapter.  Some instruments such as an
-Oboe can play only one note at a time.  Music written for
-such instruments is monophonic and requires just a single
-voice.  Instruments which can play more than one note at a
-time like the piano will often require multiple voices to
-encode the different concurrent notes and rhythms they are
-capable of playing.
+In fact, a Voice layer or context is the only one which can contain
+music.  If a Voice context is not explicitly declared one is created
+automatically, as we saw at the beginning of this chapter.  Some
+instruments such as an Oboe can play only one note at a time.  Music
+written for such instruments is monophonic and requires just a single
+voice.  Instruments which can play more than one note at a time like
+the piano will often require multiple voices to encode the different
+concurrent notes and rhythms they are capable of playing.
 
 A single voice can contain many notes in a chord, of course,
 so when exactly are multiple voices needed?  Look first at
@@ -1567,15 +1564,13 @@ For example, the effect of an accidental is limited
 to a single staff, while a bar line must be synchronized across
 the entire score.
 
-Within LilyPond, these rules and bits of information are grouped
-in @emph{Contexts}.  We have already met the
-@code{Voice} context.
-Others are the @code{Staff} and @code{Score} contexts.
-Contexts are hierarchical to reflect the hierarchical nature of
-a musical score.
-For example: a @code{Staff} context can contain many
-@code{Voice} contexts, and a @code{Score} context can
-contain many @code{Staff} contexts.
+Within LilyPond, these rules and bits of information are grouped in
+@emph{Contexts}.  We have already met the @code{Voice} context.
+Others are the @code{Staff} and @code{Score} contexts.  Contexts are
+hierarchical to reflect the hierarchical nature of a musical score.
+For example: a @code{Staff} context can contain many @code{Voice}
+contexts, and a @code{Score} context can contain many @code{Staff}
+contexts.
 
 @quotation
 @sourceimage{context-example,5cm,,}
@@ -1623,21 +1618,20 @@ Notation Reference: @ruser{Contexts explained}.
 @subsection Creating contexts
 
 @funindex \new
+@funindex new
 @cindex new contexts
 @cindex creating contexts
 @cindex contexts, creating
 
-There can be only one top level context: the
-@code{Score}
-context.  This is created with the @code{\score} command,
-or, in simple scores, it is created automatically.
+There can be only one top level context: the @code{Score} context.
+This is created with the @code{\score} command, or, in simple scores,
+it is created automatically.
 
-For scores with only one voice and one staff, the
-@code{Voice} and @code{Staff} contexts may be left to be
-created automatically, but for more complex scores it is
-necessary to create them by hand.
-The simplest command that does this is @code{\new}.
-It is prepended to a music expression, for example
+For scores with only one voice and one staff, the @code{Voice} and
+@code{Staff} contexts may be left to be created automatically, but for
+more complex scores it is necessary to create them by hand.  The
+simplest command that does this is @code{\new}.  It is prepended to a
+music expression, for example
 
 @example
 \new @var{type} @var{music-expression}
@@ -1744,10 +1738,10 @@ Fortunately, for most scores it is not necessary to know about
 more than a few, and for simple scores you do not need to know
 about any.
 
-Engravers live and operate in Contexts.
-Engravers such as the @code{Metronome_mark_engraver}, whose
-action and output apply to the score as a whole, operate in
-the highest level context -- the @code{Score} context.
+Engravers live and operate in Contexts.  Engravers such as the
+@code{Metronome_mark_engraver}, whose action and output apply to the
+score as a whole, operate in the highest level context -- the
+@code{Score} context.
 
 The @code{Clef_engraver} and @code{Key_engraver} are to be
 found in every @code{Staff} Context, as different staves may require
@@ -1823,7 +1817,9 @@ Internals reference: @rinternals{Engravers and Performers}.
 @cindex context properties, modifying
 @cindex modifying context properties
 @funindex \set
+@funindex set
 @funindex \unset
+@funindex unset
 
 Contexts are responsible for holding the values of a number of
 context @emph{properties}.  Many of them can be changed to
@@ -1887,6 +1883,9 @@ value before the @code{t} or @code{f}, and before @emph{value}
 in the @code{\set} statement.  So when a Boolean is being
 entered you need to code two hash signs, e.g., @code{##t}.
 
+@cindex properties operating in contexts
+@cindex setting properties within contexts
+
 Before we can set any of these properties we need to know
 in which context they operate.  Sometimes this is obvious,
 but occasionally it can be tricky.  If the wrong context
@@ -2012,6 +2011,7 @@ general way by using the very powerful @code{markup} command.
 @unnumberedsubsubsec Setting context properties with @code{\with}
 
 @funindex \with
+@funindex with
 @cindex context properties, setting with \with
 
 Context properties may also be set at the time the context is
@@ -2046,6 +2046,8 @@ like this:
 Properties set in this way may still be changed dynamically using
 @code{\set} and returned to their default value with @code{\unset}.
 
+@cindex fontSize, default and setting
+
 The @code{fontSize} property is treated differently.  If this is
 set in a @code{\with} clause it effectively resets the default
 value of the font size.  If it is later changed with @code{\set},
@@ -2054,6 +2056,10 @@ this new default value may be restored with the
 
 @unnumberedsubsubsec Setting context properties with @code{\context}
 
+@cindex context properties, setting with \context
+@funindex \context
+@funindex context
+
 The values of context properties may be set in @emph{all} contexts
 of a particular type, such as all @code{Staff} contexts, with a single
 command.  The context type is identified by using its
@@ -2103,10 +2109,14 @@ Internals Reference:
 @subsection Adding and removing engravers
 
 @cindex engravers, adding
+@cindex adding engravers
 @cindex engravers, removing
+@cindex removing engravers
 
 @funindex \consists
+@funindex consists
 @funindex \remove
+@funindex remove
 
 We have seen that contexts each contain several engravers, each
 of which is responsible for producing a particular part of the
@@ -2198,6 +2208,7 @@ the notes in all the voices on that staff:
 @subsubheading Changing all contexts of the same type
 
 @funindex \layout
+@funindex layout
 
 The examples above show how to remove or add engravers to
 individual contexts.  It is also possible to remove or add
@@ -2264,6 +2275,7 @@ But what if you want something that isn't covered there?  Read on.
 @subsection Soprano and cello
 
 @cindex template, modifying
+@cindex modifying templates
 
 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
@@ -2539,17 +2551,16 @@ accompaniment which is not derived automatically from the vocal parts.
 The variables holding the music and words for the vocal parts are
 fine, but we shall need to add variables for the piano reduction.
 
-The order in which the contexts appear in the ChoirStaff of
-the template do not correspond with the order in the vocal
-score shown above.  We need to rearrange them so there are
-four staves with the words written directly underneath the
-notes for each part.
-All the voices should be @code{\voiceOne}, which is
-the default, so the @code{\voiceXXX} commands should be removed.
-We also need to specify the tenor clef for the tenors.
-The way in which lyrics are specified in the template has not yet
-been encountered so we need to use the method with which we are
-familiar.  We should also add the names of each staff.
+The order in which the contexts appear in the ChoirStaff of the
+template do not correspond with the order in the vocal score shown
+above.  We need to rearrange them so there are four staves with the
+words written directly underneath the notes for each part.  All the
+voices should be @code{\voiceOne}, which is the default, so the
+@code{\voiceXXX} commands should be removed.  We also need to specify
+the tenor clef for the tenors.  The way in which lyrics are specified
+in the template has not yet been encountered so we need to use the
+method with which we are familiar.  We should also add the names of
+each staff.
 
 Doing this gives for our ChoirStaff:
 
@@ -2709,6 +2720,9 @@ lower = \relative c, {
 @subsection Building a score from scratch
 
 @cindex template, writing your own
+@cindex example of writing a score
+@cindex writing a score, example
+@cindex score, example of writing
 
 After gaining some facility with writing LilyPond code, you
 may find that it is easier to build a score from scratch