X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fuser%2Fadvanced-notation.itely;h=f446039c5c397acecf61dd1d3533424642264e0f;hb=b3cf2199183a184c7eef9a9f8f3c9a691db1f0ad;hp=959cfd1811ff72f1e95422a8c2bc0638b8c154ce;hpb=8233bc8ac54edb73af3754426adfaddf1105c772;p=lilypond.git diff --git a/Documentation/user/advanced-notation.itely b/Documentation/user/advanced-notation.itely index 959cfd1811..f446039c5c 100644 --- a/Documentation/user/advanced-notation.itely +++ b/Documentation/user/advanced-notation.itely @@ -1,7 +1,7 @@ @c -*- coding: utf-8; mode: texinfo; -*- @c This file is part of lilypond.tely -@c A menu is needed before every deeper *section nesting of @node's; run +@c A menu is needed before every deeper *section nesting of @node's; run @c M-x texinfo-all-menus-update @c to automatically fill in these menus before saving changes @@ -75,16 +75,16 @@ The @code{\markup} is described in more detail in @refcommands -@cindex @code{\fatText} +@funindex \fatText @code{\fatText}, -@cindex @code{\emptyText} +@funindex \emptyText @code{\emptyText}. @commonprop -Checking to make sure that text scripts and lyrics are within the margins is -a relatively large computational task. To speed up processing, lilypond does +Checking to make sure that text scripts and lyrics are within the margins is +a relatively large computational task. To speed up processing, lilypond does not perform such calculations by default; to enable it, use @example @@ -128,7 +128,7 @@ c2\startTextSpan b c\stopTextSpan a @cindex textSpannerUp @code{textSpannerUp}, -@cindex textSpannerDown +@cindex textSpannerDown @code{textSpannerDown}, @cindex textSpannerNeutral @code{textSpannerNeutral}. @@ -139,7 +139,7 @@ c2\startTextSpan b c\stopTextSpan a To print a solid line, use @example -\override TextSpanner #'dash-fraction = #'() +\override TextSpanner #'dash-fraction = #'() @end example @@ -157,13 +157,14 @@ Examples: @inputfileref{input/@/regression,text@/-spanner@/.ly}. @cindex segno on bar line @cindex fermata on bar line @cindex bar lines, symbols on -@cindex @code{\mark} +@funindex \mark The @code{\mark} command is primarily used for @ref{Rehearsal marks}, but it can also be used to put signs like coda, segno, and fermata on a bar line. Use @code{\markup} to -access the appropriate symbol +access the appropriate symbol (symbols are listed in +@ref{The Feta font}) @lilypond[fragment,quote,ragged-right,verbatim,relative=2] c1 \mark \markup { \musicglyph #"scripts.ufermata" } @@ -304,7 +305,7 @@ but it can also be used anywhere text is called in lilypond Text can also be placed on its own, away from any @code{\score} block. This is primarily used in a @code{\book} (see -@ref{Multiple movements}). +@ref{Multiple scores in a book}). @lilypond[quote,ragged-right,verbatim] \markup{ Here is some text. } @@ -313,7 +314,7 @@ block. This is primarily used in a @code{\book} (see @cindex font switching The markup in the example demonstrates font switching commands. The -command @code{\bold} and @code{\italic} apply to the first following +command @code{\bold} and @code{\italic} apply to the first following word only; to apply a command to more than one word, enclose the words with braces, @@ -342,7 +343,7 @@ c1^\markup { \line { a b c } } Lists with no previous command are not kept distinct. The expression @example -\center-align @{ @{ a b @} @{ c d @} @} +\center-align @{ @{ a b @} @{ c d @} @} @end example @noindent @@ -450,7 +451,7 @@ The following commands can all be used inside @code{\markup @{ @}}. @cindex font selection @cindex font magnification -@cindex @code{font-interface} +@funindex font-interface By setting the object properties described below, you can select a font from the preconfigured font families. LilyPond has default @@ -472,7 +473,7 @@ dynamic signs and @code{fetaNumber} for the number font. @item @code{font-family} is a symbol indicating the general class of the typeface. Supported are @code{roman} (Computer Modern), @code{sans}, and @code{typewriter}. - + @item @code{font-shape} is a symbol indicating the shape of the font. There are typically several font shapes available for each font family. Choices are @@ -481,23 +482,23 @@ several font shapes available for each font family. Choices are @item @code{font-series} is a symbol indicating the series of the font. There are typically several font series for each font family and shape. Choices are -@code{medium} and @code{bold}. +@code{medium} and @code{bold}. @end itemize Fonts selected in the way sketched above come from a predefined style -sheet. If you want to use a font from outside the style sheet, -then set the -@code{font-name} property, +sheet. If you want to use a font from outside the style sheet, +then set the +@code{font-name} property, @lilypond[fragment,verbatim] { - \override Staff.TimeSignature #'font-name = #"Charter" - \override Staff.TimeSignature #'font-size = #2 +% \override Staff.TimeSignature #'font-name = #"Charter" +% \override Staff.TimeSignature #'font-size = #2 \time 3/4 c'1_\markup { - \override #'(font-name . "Vera Bold") - { This text is in Vera Bold } +% \override #'(font-name . "Vera Bold") +% { This text is in Vera Bold } } } @end lilypond @@ -526,7 +527,7 @@ example, @lilypond[verbatim] \paper { myStaffSize = #20 - + #(define fonts (make-pango-font-tree "Times New Roman" "Nimbus Sans" @@ -540,7 +541,7 @@ example, @end lilypond @c we don't do Helvetica / Courier, since GS incorrectly loads -@c Apple TTF fonts +@c Apple TTF fonts @@ -613,7 +614,7 @@ individual parts. @cindex Rests, multi measure @cindex Rests, full measure @cindex whole rests for a full measure -@cindex @code{R} +@funindex R Rests for one full measure (or many bars) are entered using `@code{R}'. It is specifically meant for full bar rests and for entering parts: the rest @@ -735,7 +736,7 @@ Metronome settings can be entered as follows In the MIDI output, they are interpreted as a tempo change. In the layout output, a metronome marking is printed -@cindex @code{\tempo} +@funindex \tempo @lilypond[quote,ragged-right,verbatim,fragment] \tempo 8.=120 c''1 @end lilypond @@ -773,7 +774,7 @@ Program reference: @internalsref{MetronomeMark}. Collisions are not checked. If you have notes above the top line of the staff (or notes with articulations, slurs, text, etc), then the metronome marking may be printed on top of musical symbols. If this -occurs, increase the padding of the metronome mark to place it +occurs, increase the padding of the metronome mark to place it further away from the staff. @example @@ -785,7 +786,7 @@ further away from the staff. @subsection Rehearsal marks @cindex Rehearsal marks -@cindex @code{\mark} +@funindex \mark To print a rehearsal mark, use the @code{\mark} command @@ -827,7 +828,7 @@ c1 @end lilypond The file @file{scm/@/translation@/-functions@/.scm} contains the definitions -of @code{format-mark-numbers} (the default format), +of @code{format-mark-numbers} (the default format), @code{format-mark-box-numbers}, @code{format-mark-letters} and @code{format-mark-box-letters}. These can be used as inspiration for other formatting functions. @@ -836,6 +837,48 @@ You may use @code{format-mark-barnumbers}, @code{format-mark-box-barnumbers}, and @code{format-mark-circle-barnumbers} to get bar numbers instead of incremented numbers or letters. +@cindex segno +@cindex coda +@cindex D.S al Fine + +Music glyphs (such as the segno sign) may be printed inside +a @code{\mark} + +@lilypond[fragment,quote,ragged-right,verbatim,relative] +c1 \mark \markup { \musicglyph #"scripts.segno" } +c1 \mark \markup { \musicglyph #"scripts.coda" } +c1 \mark \markup { \musicglyph #"scripts.ufermata" } +c1 +@end lilypond + +@noindent +See @ref{The Feta font} for a list of symbols which may be +printed with @code{\musicglyph}. + +The horizontal location of rehearsal marks can be adjusted by +setting @code{break-align-symbol} + +@lilypond[fragment,quote,ragged-right,verbatim,relative] +c1 +\key cis \major +\clef alto +\override Score.RehearsalMark #'break-align-symbol = #'key-signature +\mark "on-key" +cis +\key ces \major +\override Score.RehearsalMark #'break-align-symbol = #'clef +\clef treble +\mark "on clef" +ces +@end lilypond + +@code{break-align-symbol} may also accept the following values: +@code{ambitus}, @code{breathing-sign}, @code{clef}, @code{custos}, +@code{staff-bar}, @code{left-edge}, @code{key-cancellation}, +@code{key-signature}, and @code{time-signature}. Setting +@code{break-align-symbol} will only have an effect if the symbol +appears at that point in the music. + @seealso @@ -856,12 +899,29 @@ Examples: @inputfileref{input/@/regression,rehearsal@/-mark@/-letter@/.ly}, @cindex Bar numbers @cindex measure numbers -@cindex @code{currentBarNumber} +@funindex currentBarNumber Bar numbers are printed by default at the start of the line. The number itself is stored in the @code{currentBarNumber} property, which is normally updated automatically for every measure. +@lilypond[verbatim,ragged-right,quote,fragment,relative] +\repeat unfold 4 {c4 c c c} \break +\set Score.currentBarNumber = #50 +\repeat unfold 4 {c4 c c c} +@end lilypond + +Bar numbers may only be printed at bar lines; to print a bar +number at the beginning of a piece, an empty bar line must +be added + +@lilypond[verbatim,ragged-right,quote,fragment,relative] +\set Score.currentBarNumber = #50 +\bar "" +\repeat unfold 4 {c4 c c c} \break +\repeat unfold 4 {c4 c c c} +@end lilypond + Bar numbers can be typeset at regular intervals instead of at the beginning of each line. This is illustrated in the following example, whose source is available as @@ -869,17 +929,6 @@ whose source is available as @lilypondfile[ragged-right,quote]{bar-number-regular-interval.ly} -Bar numbers can be manually changed by setting the -@code{Staff.currentBarNumber} property - -@lilypond[verbatim,ragged-right,quote] -\relative c' { - \repeat unfold 4 {c4 c c c} \break - \set Score.currentBarNumber = #50 - \repeat unfold 4 {c4 c c c} -} -@end lilypond - Bar numbers can be removed entirely by removing the Bar number engraver from the score. @@ -994,8 +1043,7 @@ brace is not taken into account. The following property setting can be used to move the instrument names to the left, in such situations. @example -\override Score.InstrumentName #'space-alist = - #'((left-edge extra-space . 2.0)) +\override Score.InstrumentName #'padding = #2.0 @end example @@ -1107,7 +1155,7 @@ during an octavation bracket. @node Different editions from one source @subsection Different editions from one source -@cindex @code{\tag} +@funindex \tag @cindex tag The @code{\tag} command marks music expressions with a name. These @@ -1177,7 +1225,7 @@ Examples: @inputfileref{input/@/regression,tag@/-filter@/.ly}. Multiple rests are not merged if you create the score with both tagged sections. - + @node Orchestral music @@ -1345,6 +1393,8 @@ staff. See @inputfileref{input/@/test,ossia@/.ly} for an example. @node Quoting other voices @subsection Quoting other voices +@cindex cues + With quotations, fragments of other parts can be inserted into a part directly. Before a part can be quoted, it must be marked especially as quotable. This is done with the @code{\addquote} command. @@ -1441,6 +1491,8 @@ Program reference: @internalsref{QuoteMusic}. @node Formatting cue notes @subsection Formatting cue notes +@cindex cues, formatting + The previous section deals with inserting notes from another voice. There is a more advanced music function called @code{\cueDuring}, which makes formatting cue notes easier. @@ -1470,24 +1522,24 @@ smaller = { \addquote clarinet \relative { R1*20 r2 r8 c f f -} +} \new Staff \relative << % setup a context for cue notes. \new Voice = "cue" { \smaller \skip 1*21 } - + \set Score.skipBars = ##t - + \new Voice { R1*20 \cueDuring #"clarinet" #1 { R1 } - g4 g2. + g4 g2. } >> -@end lilypond +@end lilypond Here are a couple of hints for successful cue notes @@ -1506,7 +1558,7 @@ Cue notes have smaller font sizes. @c Yes, this is good practice. Otherwise, the start of the original @c part can only be seen from the font size. This is not good enough @c for sight-reading. It is possilbe to use other -@c markers (e.g. a big close-bracket over the staff) to indicate the cue +@c markers (e.g. a big close-bracket over the staff) to indicate the cue @c notes are @c finished. @c -hwn @@ -1567,15 +1619,6 @@ that fits into traditional notation categories, such as microtones, nested tuplet beams, and unusual fermatas, please see those sections of the documentation. - -@c I don't think we should discourage modern composers who might -@c want to sponsor new features. :) -@c In general, the use of new, innovative notation makes a piece -@c harder to understand and perform and its use should therefore be -@c avoided. For this reason, support for contemporary notation in -@c LilyPond is limited. - - @menu * Polymetric notation:: * Time administration:: @@ -1584,6 +1627,7 @@ see those sections of the documentation. * Special noteheads:: * Feathered beams:: * Improvisation:: +* Selecting notation font size:: @end menu @@ -1593,7 +1637,7 @@ see those sections of the documentation. Double time signatures are not supported explicitly, but they can be faked. In the next example, the markup for the time signature is created with a markup text. This markup text is inserted in the -@internalsref{TimeSignature} grob. See also +@internalsref{TimeSignature} grob. See also @inputfileref{input/@/test,compound@/-time@/.ly}). @lilypond[verbatim,ragged-right] @@ -1629,7 +1673,7 @@ context. \consists "Timing_translator" \consists "Default_bar_line_engraver" @} - + @} @end example @@ -1783,7 +1827,7 @@ c4 c1 @noindent As the example illustrates, @code{ly:make-moment n m} constructs a -duration of n/m of a whole note. For example, @code{ly:make-moment 1 8} is +duration of n/m of a whole note. For example, @code{ly:make-moment 1 8} is an eighth note duration and @code{ly:make-moment 7 16} is the duration of seven sixteenths notes. @@ -1845,6 +1889,8 @@ accurately. Use @code{8 8} instead. @node Special noteheads @subsection Special noteheads +@cindex note heads, special + Different noteheads are used by various instruments for various meanings -- crosses are used for ``parlato'' with vocalists, stopped notes on guitar; diamonds are used for harmonics on string instruments, @@ -1925,6 +1971,62 @@ the following example @end lilypond +@node Selecting notation font size +@subsection Selecting notation font size + +The easiest method of setting the font size of any context is by +setting the @code{fontSize} property. + +@lilypond[quote,fragment,relative=1,verbatim] +c8 +\set fontSize = #-4 +c f +\set fontSize = #3 +g +@end lilypond + +@noindent +It does not change the size of variable symbols, such as beams or +slurs. + +Internally, the @code{fontSize} context property will cause the +@code{font-size} property to be set in all layout objects. The value +of @code{font-size} is a number indicating the size relative to the +standard size for the current staff height. Each step up is an +increase of approximately 12% of the font size. Six steps is exactly a +factor two. The Scheme function @code{magstep} converts a +@code{font-size} number to a scaling factor. + +@lilypond[quote,fragment,relative=1,verbatim] +c8 +\override NoteHead #'font-size = #-4 +c f +\override NoteHead #'font-size = #3 +g +@end lilypond + +Font size changes are achieved by scaling the design size that is +closest to the desired size. The standard font size (for +@code{font-size} equals 0), depends on the standard staff height. For +a 20pt staff, a 10pt font is selected. + +The @code{font-size} property can only be set on layout objects that +use fonts. These are the ones supporting the +@internalsref{font-interface} layout interface. + +@refcommands + +The following commands set @code{fontSize} for the current voice: + +@funindex \tiny +@code{\tiny}, +@funindex \small +@code{\small}, +@funindex \normalsize +@code{\normalsize}. + + + @node Educational use @section Educational use @@ -1935,7 +2037,7 @@ teaching tools in addition to great musical scores. * Balloon help:: * Blank music sheet:: * Hidden notes:: -* Shape note heads :: +* Shape note heads:: * Easy Notation note heads:: * Analysis brackets:: * Coloring objects:: @@ -1951,12 +2053,10 @@ balloon. The primary purpose of this feature is to explain notation. The following example demonstrates its use. @lilypond[quote,verbatim,fragment,ragged-right,relative=2] -\new Voice { - \applyOutput - #(add-balloon-text 'NoteHead "heads, or tails?" - '(1 . -3)) +\applyOutput #'Voice + #(add-balloon-text 'NoteHead "heads, or tails?" + '(1 . -3)) c8 -} @end lilypond @noindent @@ -2011,8 +2111,8 @@ emptymusic = { @cindex Invisible notes @cindex Transparent notes -@cindex @code{\hideNotes} -@cindex @code{\unHideNotes} +@funindex \hideNotes +@funindex \unHideNotes Hidden (or invisible or transparent) notes can be useful in preparing theory or composition exercises. @@ -2025,8 +2125,10 @@ g4 a @end lilypond -@node Shape note heads -@subsection Shape note heads +@node Shape note heads +@subsection Shape note heads + +@cindex note heads, shape In shape note head notation, the shape of the note head corresponds to the harmonic function of a note in the scale. This notation was @@ -2045,10 +2147,10 @@ Shape note heads can be produced by setting @code{\aikenHeads} or Shapes are determined on the step in the scale, where the base of the scale is determined by the @code{\key} command -@findex \key -@findex shapeNoteStyles -@findex \aikenHeads -@findex \sacredHarpHeads +@funindex \key +@funindex shapeNoteStyles +@funindex \aikenHeads +@funindex \sacredHarpHeads Shape note heads are implemented through the @code{shapeNoteStyles} property. Its value is a vector of symbols. The k-th element indicates @@ -2064,6 +2166,8 @@ combinations are possible, e.g. @node Easy Notation note heads @subsection Easy Notation note heads +@cindex note heads, practice +@cindex note heads, easy notation @cindex easy notation @cindex Hal Leonard @@ -2082,7 +2186,7 @@ to be printed in a large font size. To print with a larger font, see @refcommands -@cindex @code{\setEasyHeads} +@funindex \setEasyHeads @code{\setEasyHeads} @@ -2136,7 +2240,7 @@ e @end lilypond The full range of colors defined for X11 can be accessed by using the -scheme function x11-color. The function takes one argument that can be a +Scheme function x11-color. The function takes one argument that can be a symbol @example @@ -2190,10 +2294,10 @@ Appendix: @ref{List of colors}. @refbugs Not all x11 colors are distinguishable in a web browser. For web use -normal colors are recommended. +normal colors are recommended. An x11 color is not necessarily exactly the same shade as a similarly -named normal color. +named normal color. Notes in a chord cannot be colored with @code{\override}; use @code{\tweak} instead. See @ref{Objects connected to the input} @@ -2207,16 +2311,21 @@ for details. @cindex notes, ghost @cindex notes, parenthesized -Objects may be parenthesized by prefixing @code{\parenthesize} to the music -event, +Objects may be parenthesized by prefixing @code{\parenthesize} to the music +event, @lilypond[relative=2,fragment,verbatim,ragged-right] < c \parenthesize d g ->4-\parenthesize -. +>4-\parenthesize -. @end lilypond +This only functions inside chords, even for single notes + +@example +< \parenthesize NOTE> +@end example