particular effect.
-@cindex Program reference
+@cindex Internals Reference
The controls available for tuning are described in a separate
document, the
@iftex
-Program reference manual.
+Internals Reference manual.
@end iftex
@ifnottex
-@ref{Top,Program reference,,lilypond-internals}.
+@ref{Top,Internals Reference,,lilypond-internals}.
@end ifnottex
That manual
lists all different variables, functions and options available in
entire score.
Within LilyPond, these rules and bits of information are grouped in
-@emph{Contexts}. Some examples of contexts are @context{Voice},
-@context{Staff}, and @context{Score}. They are hierarchical, for
-example: a @context{Staff} can contain many @context{Voice}s, and a
-@context{Score} can contain many @context{Staff} contexts.
+@emph{Contexts}. Some examples of contexts are @code{Voice},
+@code{Staff}, and @code{Score}. They are hierarchical, for
+example: a @code{Staff} can contain many @code{Voice}s, and a
+@code{Score} can contain many @code{Staff} contexts.
@quotation
-@image{context-example,5cm,,}
+@sourceimage{context-example,5cm,,}
@end quotation
Each context has the responsibility for enforcing some notation rules,
creating some notation objects and maintaining the associated
-properties. For example, the @context{Voice} context may introduce an
-accidental and then the @context{Staff} context maintains the rule to
+properties. For example, the @code{Voice} context may introduce an
+accidental and then the @code{Staff} context maintains the rule to
show or suppress the accidental for the remainder of the measure. The
-synchronization of bar lines is handled at @context{Score} context.
+synchronization of bar lines is handled at @code{Score} context.
However, in some music we may not want the bar lines to be
synchronized -- consider a polymetric score in 4/4 and 3/4 time. In
-such cases, we must modify the default settings of the @context{Score}
-and @context{Staff} contexts.
+such cases, we must modify the default settings of the @code{Score}
+and @code{Staff} contexts.
For very simple scores, contexts are created implicitly, and you need
not be aware of them. For larger pieces, such as anything with more
arts = @{ s4-. s4-> @}
@end example
-They are combined by sending both to the same @context{Voice} context,
+They are combined by sending both to the same @code{Voice} context,
@example
<<
This variant is used with music expressions that can be interpreted at
several levels. For example, the @code{\applyOutput} command (see
@ref{Running a function on all layout objects}). Without an explicit
-@code{\context}, it is usually applied to @context{Voice}
+@code{\context}, it is usually applied to @code{Voice}
@example
\applyOutput #'@var{context} #@var{function} % apply to Voice
@end example
-To have it interpreted at the @context{Score} or @context{Staff} level use
+To have it interpreted at the @code{Score} or @code{Staff} level use
these forms
@example
this case, it is @code{#t}, the boolean True value.
If the @var{context} argument is left out, then the current bottom-most
-context (typically @context{ChordNames}, @context{Voice}, or
-@context{Lyrics}) is used. In this example,
+context (typically @code{ChordNames}, @code{Voice}, or
+@code{Lyrics}) is used. In this example,
@lilypond[quote,verbatim,relative=2,fragment]
c8 c c c
@end lilypond
Contexts are hierarchical, so if a bigger context was specified, for
-example @context{Staff}, then the change would also apply to all
-@context{Voice}s in the current stave. The change is applied
+example @code{Staff}, then the change would also apply to all
+@code{Voice}s in the current stave. The change is applied
@q{on-the-fly}, during the music, so that the setting only affects the
second group of eighth notes.
@internalsref{Engravers}.
@end ifhtml
@ifnothtml
-Program reference @expansion{} Translation @expansion{} Engravers.
+Internals Reference @expansion{} Translation @expansion{} Engravers.
@end ifnothtml
Every context described in
@ifhtml
@internalsref{Contexts}
@end ifhtml
@ifnothtml
-Program reference @expansion{} Translation @expansion{} Context.
+Internals Reference @expansion{} Translation @expansion{} Context.
@end ifnothtml
lists the engravers used for that context.
@noindent
makes stems thicker (the default is 1.3, with staff line thickness as a
-unit). Since the command specifies @context{Staff} as context, it only
+unit). Since the command specifies @code{Staff} as context, it only
applies to the current staff. Other staves will keep their normal
appearance. Here we see the command in action:
@end lilypond
The @code{\override} command changes the definition of the @code{Stem}
-within the current @context{Staff}. After the command is interpreted
+within the current @code{Staff}. After the command is interpreted
all stems are thickened.
Analogous to @code{\set}, the @var{context} argument may be left out,
-causing the default context @context{Voice} to be used. Adding
+causing the default context @code{Voice} to be used. Adding
@code{\once} applies the change during one timestep only.
@lilypond[quote,fragment,verbatim,relative=2]
@node Defining new contexts
@subsection Defining new contexts
-Specific contexts, like @context{Staff} and @code{Voice}, are made of
+Specific contexts, like @code{Staff} and @code{Voice}, are made of
simple building blocks. It is possible to create new types of
contexts with different combinations of engraver plug-ins.
The next example shows how to build a different type of
-@context{Voice} context from scratch. It will be similar to
-@code{Voice}, but only prints centered slash noteheads. It can be used
+@code{Voice} context from scratch. It will be similar to
+@code{Voice}, but only prints centered slash note heads. It can be used
to indicate improvisation in jazz pieces,
@lilypond[quote,ragged-right]
\name ImproVoice
@end example
-Since it is similar to the @context{Voice}, we want commands that work
-on (existing) @context{Voice}s to remain working. This is achieved by
-giving the new context an alias @context{Voice},
+Since it is similar to the @code{Voice}, we want commands that work
+on (existing) @code{Voice}s to remain working. This is achieved by
+giving the new context an alias @code{Voice},
@example
\alias Voice
@end example
@funindex \accepts
-Contexts form hierarchies. We want to hang the @context{ImproVoice}
-under @context{Staff}, just like normal @code{Voice}s. Therefore, we
+Contexts form hierarchies. We want to hang the @code{ImproVoice}
+under @code{Staff}, just like normal @code{Voice}s. Therefore, we
modify the @code{Staff} definition with the @code{\accepts}
command,
could be useful in setting up a vocal staff (@rlearning{Vocal ensembles}) and
in ossia,
+FIXME: this section doens't work in pdf. (?)
+
@cindex ossia
@findex alignAboveContext
@findex alignBelowContext
To construct this tweak we must determine these bits of information:
@itemize
-@item the context: here @context{Voice}.
+@item the context: here @code{Voice}.
@item the layout object: here @code{Stem}.
@item the layout property: here @code{thickness}.
@item a sensible value: here @code{3.0}.
@quotation
@seealso
-Program reference: @internalsref{Fingering}.
+Internals Reference: @internalsref{Fingering}.
@end quotation
@item
Horizontally, the center of the symbol should be aligned to the
-center of the notehead.
+center of the note head.
@item
Vertically, the symbol is placed next to the note and the staff.
@noindent
As you can see, the @code{Fingering} object is nothing more than a
-bunch of variable settings, and the webpage in the Program Reference
+bunch of variable settings, and the webpage in the Internals Reference
is directly generated from this definition.
@end quotation
By increasing the value of @code{padding}, we can move the
-fingering away from the notehead. The following command inserts
+fingering away from the note head. The following command inserts
3 staff spaces of white
between the note and the fingering:
@example
@end lilypond
-In this case, the context for this tweak is @context{Voice}. This
+In this case, the context for this tweak is @code{Voice}. This
fact can also be deduced from the program reference, for the page for
the @internalsref{Fingering_engraver} plug-in says
@noindent
With other words, @code{\tweak} doesn't behave like an articulation
regarding the syntax; in particular, it can't be attached with
-@samp{^} and @samp{_}.
+@code{^} and @code{_}.
Using Scheme, this problem can be circumvented. The route to the
result is given in @ref{Adding articulation to notes (example)},
@noindent
Here, the @code{tweaks} properties of the flageolet object
-@samp{m} (created with @code{make-music}) are extracted with
+@code{m} (created with @code{make-music}) are extracted with
@code{ly:music-property}, a new key-value pair to change the
font size is prepended to the property list with the
@code{acons} Scheme function, and the result is finally
written back with @code{set!}. The last element of the
-@code{let} block is the return value, @samp{m} itself.
+@code{let} block is the return value, @code{m} itself.
@node \set versus \override
@code{studlyCaps}. They mostly control the translation from
music to notatino, eg. @code{localKeySignature} (for determining
whether to print accidentals), @code{measurePosition} (for
-determining when to print a barline). Context properties can
+determining when to print a bar line). Context properties can
change value over time while interpreting a piece of music;
@code{measurePosition} is an obvious example of
this. Context properties are modified with @code{\set}.