From ee691b8408230c4d289ee962a1acf5e80ce96e61 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 13 Feb 2004 01:05:13 +0000 Subject: [PATCH] *** empty log message *** --- Documentation/user/internals.itely | 37 +++----------- Documentation/user/refman.itely | 82 ++++++------------------------ Documentation/user/tutorial.itely | 66 ++++++++++++------------ 3 files changed, 54 insertions(+), 131 deletions(-) diff --git a/Documentation/user/internals.itely b/Documentation/user/internals.itely index 083687ffe7..ad325068bb 100644 --- a/Documentation/user/internals.itely +++ b/Documentation/user/internals.itely @@ -29,7 +29,7 @@ associated with each step. Syntax: c4 \context \set #'padding = - \property + \override Objects: Music expressions Contexts Layout object Engravers (aka. Grob) @@ -85,7 +85,7 @@ These properties use Scheme-style naming: @code{c0-position}, @code{break-align-symbol}. They most often assigned as follows: @example - \override Score.RehearsalMark #'break-align-symbol = ... + \override Score.RehearsalMark #'break-align-symbol = ... @end example @noindent @@ -239,7 +239,6 @@ voice. Contexts have properties. These properties are set from the @file{.ly} file using the following expression: -@cindex @code{\property} @cindex context properties @cindex properties, context @@ -258,31 +257,6 @@ contained contexts. This means that a property valid for the @internalsref{Voice} context can be set in the @internalsref{Score} context (for example) and thus take effect in all @internalsref{Voice} contexts. -@cindex @code{Current} -If you do not wish to specify the name of the context in the -@code{\property}-expression itself, you can refer to the abstract context -name, @code{Current}. The @code{Current} context is the latest -used context. This will typically mean the @internalsref{Voice} context, -but you can force another context with the -@code{\property}-command. Hence the expressions - -@example -\set @var{contextname}.@var{propname} = @var{value} -@end example - -@noindent -and - -@example -\context @var{contextname} -\set Current.@var{propname} = @var{value} -@end example - -@noindent -do the same thing. The main use for this is in predefined variables. -This construction allows the specification of a property-setting -without restriction to a specific context. - Properties can be unset using the following statement. @example \unset @var{contextname}.@var{propname} @@ -296,9 +270,10 @@ This removes the definition of @var{propname} in @var{contextname}. If @var{propname} was not defined in @var{contextname} (but was inherited from a higher context), then this has no effect. -@refbugs +If @var{contextname} is left out, then it defaults to the current +``bottom'' context: this is a context like @internalsref{Voice} that +cannot contain any other contexts. -The context @code{Current} is confusing. @node Context evaluation @@ -354,7 +329,7 @@ e.g. defaultBarType = #"||" @} @end example -These assignments happen before interpretation starts, so a @code{\property} +These assignments happen before interpretation starts, so a property command will override any predefined settings. @cindex engraver diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index ebbf8507ac..2729fc5556 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -774,7 +774,6 @@ such as keys, clefs and time signatures. @subsection Staff symbol @cindex adjusting staff symbol -@cindex StaffSymbol, using \property Notes, dynamic signs, etc. are grouped with a set of horizontal lines, into a staff (plural `staves'). In our @@ -1144,7 +1143,7 @@ created. At the start of a measure it is set to @code{defaultBarType}. The contents of @code{repeatCommands} are used to override default measure bars. -Property @code{whichBar} can also be set directly, using @code{\property} +Property @code{whichBar} can also be set directly, using @code{\set} or @code{\bar}. These settings take precedence over the automatic @code{whichBar} settings. @@ -1431,7 +1430,7 @@ The value of @code{autoBeamSettings} is changed using @code{\override} and restored with @code{\revert}: @example \override autoBeamSettings #'(@var{BE} @var{P} @var{Q} @var{N} @var{M}) = @var{dur} -\property autoBeamSettings \revert #'(@var{BE} @var{P} @var{Q} @var{N} @var{M}) +\revert autoBeamSettings #'(@var{BE} @var{P} @var{Q} @var{N} @var{M}) @end example Here, @var{BE} is the symbol @code{begin} or @code{end}. It determines whether the rule applies to begin or end-points. The quantity @@ -3317,11 +3316,11 @@ syllable includes a @code{@}}, and hence the opening brace is not balanced: @end example @cindex @code{\property}, in @code{\lyrics} -Similarly, a period following a alphabetic sequence, is included in the -resulting string. As a consequence, spaces must be inserted around -@code{\property} commands: +Similarly, a period following a alphabetic sequence, is included in +the resulting string. As a consequence, spaces must be inserted around +property commands: @example - \override Lyrics .LyricText #'font-shape = #'italic + \override Score . LyricText #'font-shape = #'italic @end example @cindex @code{_} @@ -3917,8 +3916,8 @@ by using @code{/+}@var{pitch}. Chords is a mode similar to @code{\lyrics}, @code{\notes} etc. Most of the commands continue to work, for example, @code{r} and -@code{\skip} can be used to insert rests and spaces, and -@code{\property} may be used to change various settings. +@code{\skip} can be used to insert rests and spaces, and property +commands may be used to change various settings. @@ -7540,7 +7539,7 @@ object, and set a layout property in that object. Do not confuse layout properties with translation properties. Translation properties always use a mixed caps style -naming, and are manipulated using @code{\property}: +naming, and are manipulated using @code{\set} and @code{\unset}: @example \set Context.propertyName = @var{value} @end example @@ -7608,7 +7607,7 @@ changed from its original setting: @lilypond[verbatim,fragment,relative=1] c4 - \once \override Stem #'thickness = #4 + \once \override Voice.Stem #'thickness = #4 c4 c4 @end lilypond @@ -7629,13 +7628,6 @@ An existing definition may be removed by the following command: \property @var{context}.@var{objectname} \revert @var{symbol} @end example @c -All @code{\override} and @code{\revert} commands should be balanced. -The @code{\set} shorthand performs a revert followed by an override, -and is often more convenient to use - -@example -\override @var{context}.@var{objectname} @var{symbol} = @var{value} -@end example Some examples: @lilypond[verbatim,quote] @@ -7656,51 +7648,8 @@ one (assuming the system default for stem thickness is 1.3): @end lilypond Reverting a setting which was not set in the first place has no -effect. However, if the setting was set as a system default, this may -remove the default value, and this may give surprising results, -including crashes. In other words, @code{\override} and -@code{\revert} must be carefully balanced. The following are examples -of correct nesting of @code{\override}, @code{\set}, @code{\revert}: - -@itemize @bullet -@item -a clumsy but correct form: -@example - \override \revert \override \revert \override \revert -@end example - -@item -shorter version of the same: -@example - \override \set \set \revert -@end example - -@item -a short form, using only @code{\set}. This requires you to know the -default value: -@example - \set \set \set \set @var{to default value} -@end example - -@item -if there is no default (i.e. by default, the object property is unset), -then you can use -@example - \set \set \set \revert -@end example -@end itemize +effect. -The object description is an Scheme association list. Since a Scheme -list is a singly linked list, we can treat it as a stack, and -@code{\override} and @code{\revert} are push and pop operations. The -association list is stored in a normal context property, hence -@example - \set NoteHead = #'() -@end example -will effectively erase @internalsref{NoteHead}s from the current -@internalsref{Voice}. Typically, this will blank the object. However, -this mechanism should not be used: it may cause crashes or other -anomalous behavior. @seealso @@ -7712,9 +7661,8 @@ Internals: @internalsref{OverrideProperty}, @internalsref{RevertProperty}, @refbugs The backend is not very strict in type-checking object properties. -Cyclic references in Scheme values for properties cause hangs and/or -crashes. Reverting properties that are system defaults may also lead -to crashes. +Cyclic references in Scheme values for properties can cause hangs +and/or crashes. @menu * Constructing a tweak:: @@ -7862,7 +7810,7 @@ Fingering_engraver is part of contexts: Voice @end example so tuning the settings for Fingering should be done with @example - \override Fingering @dots{} + \override Fingering @dots{} @end example Of course, the tweak may also done in a larger context than @@ -8507,7 +8455,7 @@ exaggerated corrections: Properties of the @internalsref{SpacingSpanner} must be overridden from the @code{\paper} block, since the @internalsref{SpacingSpanner} is -created before any @code{\property} statements are interpreted. +created before any property commands are interpreted. @example \paper @{ \translator @{ \ScoreContext diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index 44d66e0bca..1a4198c931 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -100,8 +100,8 @@ a1 a2 a4 a16 a32 @end example @lilypond[notime] -\set Score.timing = ##f -\set Staff.autoBeaming = ##f +\set Score.timing = ##f +\set Staff.autoBeaming = ##f \transpose c c' { a1 a2 a4 a16 a32 s16_" " } @end lilypond @@ -112,7 +112,7 @@ a4 a a2 a @end example @lilypond[notime] -\set Score.timing = ##f +\set Score.timing = ##f \transpose c c' { a a a2 a s16_" " } @end lilypond @@ -126,7 +126,7 @@ r2 r4 r8 r16 @end example @lilypond[fragment] -\set Score.timing = ##f +\set Score.timing = ##f \set Staff.Clef = \turnOff \set Staff.TimeSignature = \turnOff r2 r4 r8 r16 @@ -143,7 +143,7 @@ a2. a4 a8. a16 @end example @lilypond[notime] -\set Score.timing = ##f +\set Score.timing = ##f \transpose c c' { a2. a4 a8. a16 s16_" " } @end lilypond @@ -159,7 +159,7 @@ The @rglos{meter} (or @rglos{time signature}) can be set with the @c a clef here may lead to confusion @lilypond -\override Staff.Clef #'transparent = ##t +\override Staff.Clef #'transparent = ##t \time 3/4 s4_" " \time 6/8 @@ -182,7 +182,7 @@ The @rglos{clef} can be set using the @code{\clef} command: @end example @lilypond[notime] -\set Score.timing = ##f +\set Score.timing = ##f \clef violin s4_" " \clef bass @@ -383,7 +383,7 @@ cis1 ees fisis aeses @end example @lilypond[notime] -\set Score.timing = ##f +\set Score.timing = ##f \transpose c c' { cis1 ees fisis aeses s16_" " } @end lilypond @@ -566,7 +566,7 @@ c'4 c'' c''' \clef bass c c, @end example @lilypond[fragment] -\set Score.timing = ##f +\set Score.timing = ##f \set Staff.TimeSignature = \turnOff c'4 c'' c''' \clef bass c c, @end lilypond @@ -599,7 +599,7 @@ one. For example, @code{c f} goes up while @code{c g} goes down: @end example @lilypond[fragment] -\set Score.timing = ##f +\set Score.timing = ##f \set Staff.TimeSignature = \turnOff \relative c'' { c f c g c @@ -636,7 +636,7 @@ Larger intervals are made by adding octavation quotes. @end example @lilypond[fragment] -\set Score.timing = ##f +\set Score.timing = ##f \set Staff.TimeSignature = \turnOff \relative c'' { c f, f c' c g' c, @@ -665,7 +665,7 @@ Here is an example of the difference between relative mode and @end example @lilypond[fragment] -\set Score.timing = ##f +\set Score.timing = ##f \set Staff.TimeSignature = \turnOff \relative a { \clef bass @@ -682,7 +682,7 @@ Here is an example of the difference between relative mode and @end example @lilypond[fragment] -\set Score.timing = ##f +\set Score.timing = ##f \set Staff.TimeSignature = \turnOff \clef bass a d a e d c' d' @@ -1401,7 +1401,7 @@ accidentals to print, and where barlines must be placed, are stored in variables. These variables are called @emph{context properties}. The properties can also be manipulated from input files. Consider this input: @example -\set Staff.autoBeaming = ##f +\set Staff.autoBeaming = ##f @end example @noindent @@ -1411,13 +1411,13 @@ property controls whether beams are printed automatically: @c @lilypond[relative=1,fragment,verbatim] c8 c c c - \set Staff.autoBeaming = ##f + \set Staff.autoBeaming = ##f c8 c c c @end lilypond @noindent LilyPond includes a built-in programming language, namely, a dialect -of Scheme. The argument to @code{\property}, @code{##f}, is an +of Scheme. The argument to @code{\set}, @code{##f}, is an expression in that language. The first hash-mark signals that a piece of Scheme code follows. The second hash character is part of the boolean value true (@code{#t}). Values of other types may be @@ -1425,23 +1425,23 @@ entered as follows: @itemize @bullet @item a string, enclosed in double quotes, for example, @example - \set Staff.instrument = #"French Horn" + \set Staff.instrument = #"French Horn" @end example @item a boolean: either @code{#t} or @code{#f}, for true and false respectively, e.g. @example - \set autoBeaming = ##f - \set Score.skipBars = ##t + \set autoBeaming = ##f + \set Score.skipBars = ##t @end example @item a number, such as @example - \set Score.currentBarNumber = #20 + \set Score.currentBarNumber = #20 @end example @item a symbol, which is introduced by a quote character, as in @example - \set Staff.crescendoSpanner = #'dashed-line + \set Staff.crescendoSpanner = #'dashed-line @end example @item a pair, which is also introduced by a quote character, like in @@ -1449,8 +1449,8 @@ the following statements, which set properties to the pairs (-7.5, 6) and (3, 4) respectively: @example - \set Staff.minimumVerticalExtent = #'(-7.5 . 6) - \set Staff.timeSignatureFraction = #'(3 . 4) + \set Staff.minimumVerticalExtent = #'(-7.5 . 6) + \set Staff.timeSignatureFraction = #'(3 . 4) @end example @item a list, which is also introduced by a quote character. In the @@ -1458,7 +1458,7 @@ following example, the @code{breakAlignOrder} property is set to a list of symbols: @example \set Score.breakAlignOrder = - #'(left-edge time-signature key-signatures) + #'(left-edge time-signature key-signatures) @end example @@ -1489,27 +1489,27 @@ values, we can alter the look of a formatted score: @lilypond[verbatim,relative] c4 - \override Stem #'thickness = #3.0 + \override Stem #'thickness = #3.0 c4 c4 c4 @end lilypond @noindent In the example shown here, the layout property @code{thickness} (a symbol) is set to 3 in the @code{Stem} layout objects of the current - As a result, the notes following @code{\property} have thicker +As a result, the notes following @code{\override} have thicker stems. In most cases of manual overrides, only a single object must be changed. This can be achieved by prefixing @code{\once} to the -@code{\property} statement, i.e. +@code{\override} statement, i.e. @example - \once \override Stem #'thickness = #3.0 + \once \override Stem #'thickness = #3.0 @end example @lilypond[relative] c4 - \once \override Stem #'thickness = #3.0 + \once \override Stem #'thickness = #3.0 c4 c4 c4 @end lilypond @@ -1568,7 +1568,7 @@ in that voice, the tie appears to cross voices: @lilypond[fragment,relative=1,verbatim] c4 << { - \once \override Stem #'transparent = ##t + \once \override Stem #'transparent = ##t b8~ b8 } \\ { b[ g8] @@ -1585,7 +1585,7 @@ tweak}: @lilypond[relative=1,verbatim] c2\fermata - \override Script #'padding = #3 + \override Script #'padding = #3 b2\fermata @end lilypond @@ -1712,14 +1712,14 @@ When printing the part, the following @code{skipBars} property must be set to false, to prevent the rest from being expanded in three one bar rests: @example - \set Score.skipBars = ##t + \set Score.skipBars = ##t @end example Prepending the rest and the property setting above, leads to the following result: @lilypond[raggedright] \score {\notes { \transpose f c' \relative c { \time 2/4 -\set Score.skipBars = ##t +\set Score.skipBars = ##t R2*3 r4 f8 a cis4 f e d } }} @end lilypond -- 2.39.5