1 \input texinfo @c -*-texinfo-*-
2 @setfilename reference-manual.info
3 @settitle LilyPond 1-2-0 Reference Manual
7 @author Adrian Mariano, Han-Wen Nienhuys and Jan Nieuwenhuizen
8 @title LilyPond Regression test
14 This is the reference documentation to LilyPond. It is not a tutorial.
15 It was written by Han-Wen Nienhuys, Adrian Mariano and Jan Nieuwenhuizen
18 Copyright 1999 by its authors.
23 @comment The title is printed in a large font.
24 @center @titlefont{LilyPond Reference manual}
26 @center @titlefont{Han-Wen Nienhuys, Adrian Mariano, Jan Nieuwenhuizen}
28 @vskip 0pt plus 1filll
29 Copyright @copyright{} 1999 by its authors
33 @node Top, , Running LilyPond, (dir)
36 * LilyPond 1-2-0 Reference Manual::LilyPond 1-2-0 Reference Manual
40 @node LilyPond 1-2-0 Reference Manual, Overview, , Top
43 * Top level:: Top level
44 * notenames:: notenames
45 * Lexical conventions:: Lexical conventions
49 * Music expressions:: Music expressions
50 * Atomic music expressions:: Atomic music expressions
51 * atomicmusic:: atomicmusic
54 * manualbeam:: manualbeam
56 * Compound music expressions:: Compound music expressions
57 * compoundmusic:: compoundmusic
59 * sec-repeats:: sec-repeats
60 * transpose:: transpose
61 * Ambiguities:: Ambiguities
62 * Notation conversion specifics:: Notation conversion specifics
64 * lyricprint:: lyricprint
65 * Notation Contexts:: Notation Contexts
66 * contextselection:: contextselection
67 * Notation output definitions:: Notation output definitions
70 * papervars:: papervars
71 * contextdefs:: contextdefs
72 * engravers:: engravers
73 * Sound output:: Sound output
75 * Pre-defined Identifiers:: Pre-defined Identifiers
77 * Running LilyPond:: Running LilyPond
79 @chapter LilyPond 1.2.0 Reference Manual
82 @node Overview, Top level, LilyPond 1-2-0 Reference Manual, LilyPond 1-2-0 Reference Manual
85 This document@footnote{This document has been revised for
86 LilyPond 1.2.} describes the the GNU LilyPond input format, which is
87 a language for defining music. We call this language @emph{Music
88 Definition Language} or @emph{Mudela}, for short.@footnote{If anybody
89 comes up with a better name, we'd gladly take this. Gourlay already
90 uses a ``Musical Description Language,'' ISO standard 10743 defines a
91 ``Standard Music Description Language.'' We're not being original
94 @emph{Mudela} is a language that allows you to
97 @item create musical expressions by combining pitches, durations
98 @item output those musical expressions to various formats
99 @item give those musical expressions and output definitions names, so
100 you can enter them in manageable chunks.
103 @emph{Mudela} aims to define a piece of music completely, both from
104 typesetting and from a performance point of view.
108 @node Top level, notenames, Overview, LilyPond 1-2-0 Reference Manual
113 This section describes what you may enter at top level.
117 @cindex score definition
119 The output is generated combining a music expression with an output
120 definition. A score block has the following syntax:
124 @code{\score @{} @code{@}}
127 are zero or more output definitions. If no output
128 definition is supplied, the default @code{\paper} block will be added.
134 @cindex header@@@code{\header}
140 @code{\header} @code{@{} = ;
144 A header describes the file's contents. It can also appear in a
145 @code{\score} block. Tools like @code{ly2dvi}
146 @cindex ly2dvi@@@code{ly2dvi}
148 information for generating titles. Key values that are used by
149 @code{ly2dvi} are: title, subtitle, composer, opus, poet, instrument,
150 metre, arranger, piece and tagline.
152 It is customary to put the @code{\header} at the top of the file.
155 @node notenames, Lexical conventions, Top level, LilyPond 1-2-0 Reference Manual
157 Note name tables can be specified using
162 @cindex notenames@@@code{\notenames}
167 is a list of definitions of the form
174 Chord modifiers can be set analogously, with
175 @code{\chordmodifiers}
176 @cindex chordmodifiers@@@code{\chordmodifiers}
181 A @code{\paper} block at top level sets the default paper block. A
182 @code{\midi} block at top level works similarly.
186 LilyPond contains a Scheme interpreter (the GUILE library) for
187 internal use. The following commands access the interpreter
193 @cindex scm@@@code{\scm}
197 Evaluates the specified Scheme code. The result is discarded.
202 @cindex scmfile@@@code{\scmfile}
206 Reads Scheme code from the specified file. The result is discarded.
210 Identifier assignments may appear at top level. Semicolons are
211 forbidden after top level assignments.
215 @node Lexical conventions, notelang, notenames, LilyPond 1-2-0 Reference Manual
216 @section Lexical conventions
218 @cindex lexical conventions
227 A one line comment is introduced by a `@code{%}' character.
228 Block comments are started by `@code{%@{}' and ended by `@code{%@}}'.
229 They cannot be nested.
235 Keywords start with a backslash, followed by a number of lower case
236 alphabetic characters. These are all the keywords.
246 @code{\chordmodifiers}
300 Formed from an optional minus sign followed by digits. Arithmetic
301 operations cannot be done with integers, and integers cannot be mixed
309 Formed from an optional minus sign and a sequence of digits followed
310 by a @emph{required} decimal point and an optional exponent such as
311 @code{-1.2e3}. Reals can be built up using the usual operations:
321 ', with parentheses for grouping.
323 A real constant can be followed by one of the dimension
327 @cindex mm@@@code{\mm}
330 @cindex pt@@@code{\pt}
332 @cindex in@@@code{\in}
335 @cindex cm@@@code{\cm}
336 , for millimeters, points, inches and
337 centimeters, respectively. This converts the number to a real that
338 is the internal representation of dimensions.
345 Begins and ends with the `@code{"}' character. To include a `@code{"}'
346 character in a string write `@code{\"}'. Various other backslash
347 sequences have special interpretations as in the C language. A
348 string that contains no spaces can be written without the quotes.
349 See section @xref{modes} for details on unquoted strings; their
350 interpretation varies depending on the situation. Strings can be
351 concatenated with the `@code{+}' operator.
355 The tokenizer accepts the following commands. They can appear
361 @cindex maininput@@@code{\maininput}
365 This command is used in init files to signal that the user file must
366 be read. This command cannot be used in a user file.
371 @cindex include@@@code{\include}
375 Include . The argument may be a quoted string (an
376 unquoted string will not work here!) or a string identifier. The full
377 filename including the @file{.ly} extension must be given,
382 @cindex version@@@code{\version}
386 Specify the version of LilyPond that a file was written for. The
387 argument is a version string in quotes, for example @code{"1.2.0"}.
388 This is used to detect invalid input, and to aid
389 @code{convert-mudela}, a tool that automatically upgrades input files.
393 @cindex other languages
395 @node notelang, modes, Lexical conventions, LilyPond 1-2-0 Reference Manual
397 Note name definitions have been provided in various languages.
398 Simply include the language specific init file. For example:
399 `@code{\include "english.ly"}'. The available language files and the
400 names they define are:
405 Note Names sharp flat
407 nederlands.ly c d e f g a bes b -is -es
408 english.ly c d e f g a bf b -s/-sharp -f/-flat
409 deutsch.ly c d e f g a b h -is -es
410 norsk.ly c d e f g a b h -iss/-is -ess/-es
411 svenska.ly c d e f g a b h -iss -ess
412 italiano.ly do re mi fa sol la sid si -d -b
413 catalan.ly do re mi fa sol la sid si -d/-s -b
418 Pitch names can be redefined using the
420 @cindex notenames@@@code{\notenames}
422 subsection @xref{notenames}.
426 @cindex lexical modes
430 @node modes, Types, notelang, LilyPond 1-2-0 Reference Manual
432 To simplify entering notes, lyrics, and chords, @emph{Mudela} has three
433 special input modes on top of the default mode. In each mode, words
434 are identified on the input. If @code{"word"} is encountered, it is
435 treated as a string. If @code{\word} is encountered, it is treated as
436 a keyword or as an identifier. The behavior of the modes differs in
437 two ways: Different modes treat unquoted words differently, and
438 different modes have different rules for deciding what is a word.
444 At the start of parsing, @emph{Mudela} is in Normal mode. In Normal
445 mode, a word is an alphabetic character followed by alphanumeric
446 characters. If @code{word} is encountered on the input it is
452 Note mode is introduced by the keyword
454 @cindex notes@@@code{\notes}
455 . In Note mode, words can only
456 contain alphabetic characters. If @code{word} is encountered,
457 LilyPond first checks for a notename of @code{word}. If no
458 notename is found, then @code{word} is treated as a string.
460 Since combinations of numbers and dots are used for indicating
461 durations, it is not possible to enter real numbers in this mode.
466 Chord mode is introduced by the keyword
468 @cindex chords@@@code{\chords}
469 . It is similar to Note mode, but
470 words are also looked up in a chord modifier table (containing
471 @code{maj}, @code{dim}, etc).
473 Since combinations of numbers and dots are used for indicating
474 durations, you can not enter real numbers in this mode. Dashes
475 and carets are used to indicate chord additions and subtractions,
476 so scripts can not be entered in Chord mode.
481 Lyrics mode is introduced by the keyword
483 @cindex lyrics@@@code{\lyrics}
484 . This mode has rules that make it
485 easy to include punctuation and diacritical marks in words. A
486 word in Lyrics mode begins with: an alphabetic character,
487 `@code{_}', `@code{?}', `@code{!}', `@code{:}', `@code{'}', the
488 control characters @code{^A} through @code{^F}, @code{^Q} through
489 @code{^W}, @code{^Y}, @code{^^}, any 8-bit character with ASCII code
490 over 127, or a two-character combination of a backslash followed
491 by one of `@code{`}', `@code{'}', `@code{"}', or
492 `@code{^}'.@footnote{The purpose of Lyrics mode is that you can
493 enter lyrics in TeX format or a standard encoding without
494 needing quotes. The precise definition of this mode indeed is
495 ludicrous. This will remain so until the authors of LilyPond
496 acquire a deeper understanding of character encoding, or someone
497 else steps up to fix this.}
499 Subsequent characters of a word can be any character that is not
500 a digit and not white space. One important consequence of this
501 is that a word can end with `@code{@}}', which may be confusing if
502 you thought the closing brace was going to terminate Lyrics
503 mode.@footnote{LilyPond will issue a warning, though.} Any
504 `@code{_}' characters which appear in an unquoted word are
505 converted to spaces. This provides a mechanism for introducing
506 spaces into words without using quotes. Quoted words can also be
507 used in Lyrics mode to specify words that cannot be written with
508 the above rules. Here are some examples. Not all of these words
509 are printable by TeX.
516 2B_||_!2B % not a word because it starts with a digit
517 ``Hello'' % not a word because it starts with `
518 _ _ _ _ % 4 words, each one a space
523 Since combinations of numbers and dots are used for indicating
524 durations, you can not enter real numbers in this mode.
527 It is possible to create words that break the rules by prefixing them
528 with the dollar sign `@code{$}
530 '. Regardless of the context, a
531 word beginning with `@code{$}' extends until the next white space
532 character. Such words can contain numbers (even in Note mode), or
533 other forbidden characters. The dollar sign can be used to create
534 and access identifiers that could not otherwise be used.@footnote{Use
535 of `@code{$}' hampers readability and portability to future LilyPond
536 versions, thus the use of the dollar sign is discouraged.}
540 @node Types, Music expressions, modes, LilyPond 1-2-0 Reference Manual
543 @cindex types and identifiers
545 @emph{Mudela} has a limited set of types:
551 @item music expressions
552 @item durations of notes and rests (specified with
554 @cindex notenames@@@code{\notenames}
556 @item note name tables
557 @item context definitions, part of output definitions. See
558 section @xref{contextdefs} for more information
559 @item output definitions (like @code{\paper}
560 @cindex paper@@@code{\paper}
563 @cindex midi@@@code{\midi}
565 @item score definitions (@code{\score}
566 @cindex score@@@code{\score}
570 Type is a syntactical property: @emph{Mudela} has no real type system,
571 so there is no support for generic expressions, functions, or user
572 defined types. For the same reason, it is not possible to mix reals
573 and integers in arithmetic expressions, and ``type
576 (e.g., using a string identifier to
577 initialize a @code{\paper}
578 @cindex paper@@@code{\paper}
579 block) will yield a ``parse
582 Identifiers allow objects to be assigned to names. To assign an
583 identifier, you use `=' and to refer to an
584 identifier, you preceed its name with a backslash:
585 `@code{\}'. Identifier assignments must appear at top level
586 in the @emph{Mudela} file. Semicolons are forbidden after assignments
587 appearing at top level but they are obligatory after assignments
588 appearing in the @code{\paper} block, see Section @xref{paper}.
590 is any of the types listed above.
592 An identifier can be created with any string for its name, but you
593 will only be able to refer to identifiers whose names begin with a
594 letter, being entirely alphanumeric. It is impossible to refer to an
595 identifier whose name is the same as the name of a keyword.
597 The right hand side of an identifier assignment is parsed completely
598 before the assignment is done, so it is allowed to redefine an
599 identifier in terms of its old value, e.g.
603 @code{foo = \foo * 2.0}
606 When an identifier is referenced, the information it points to is
607 copied. Therefore it only makes sense to put identifiers for
608 translators, output definitions, and @code{\score}
609 @cindex score@@@code{\score}
611 blocks as the first item in a block. For this reason, if you
612 reference a @code{\foo} variable in a @code{\foo} block, it must be the
613 first item in the list following @code{\foo}.@footnote{@code{\paper@{\one
614 \two@}} does not make sense, because the information of @code{\two}
615 would overwrite the information of @code{\one}, thereby making the
616 reference to the first identifier useless.}
620 @node Music expressions, Atomic music expressions, Types, LilyPond 1-2-0 Reference Manual
621 @section Music expressions
623 @cindex music expressions
625 Music in @emph{Mudela} is entered as a music expression. Notes, rests,
626 lyric syllables are music expressions (the atomic
628 @cindex atomic music expressions
629 , and you can combine
630 music expressions to form new ones. This example forms a compound
631 expressions out of the quarter @code{c} note and a @code{d}
637 \sequential @{ c4 d4 @}
642 The meaning of this compound expression is to play the `@code{c}'
643 first, and then the `@code{d}' (as opposed to playing them
644 simultaneously, for instance).
646 Atomic music expression are discussed in
647 subsection @xref{atomicmusic}. Compound music expressions are
648 discussed in subsection @xref{compoundmusic}.
652 @node Atomic music expressions, atomicmusic, Music expressions, LilyPond 1-2-0 Reference Manual
653 @section Atomic music expressions
654 @node atomicmusic, notedesc, Atomic music expressions, LilyPond 1-2-0 Reference Manual
663 The syntax for pitch specification is
668 @cindex musicalpitch@@@code{\musicalpitch}
673 is specified by an integer, zero for the octave
674 containing middle C. is a number from 0 to 7, with 0
675 corresponding to C and 7 corresponding to B. The shift is zero for a
676 natural, negative to add flats, or positive to add sharps.
678 In Note and Chord mode, pitches may be designated by names. See
679 section @xref{notelang} for pitch names in different languages.
681 The syntax for duration specification is
686 @cindex duration@@@code{\duration}
691 is the negative logarithm (base 2) of the duration:
692 1 is a half note, 2 is a quarter note, 3 is an eighth
693 note, etc. The number of dots after the note is given by
696 In Note, Chord, and Lyrics mode, durations may be designated by
697 numbers and dots. See Section @xref{notelang} for details.
700 @node notedesc, barlines, atomicmusic, LilyPond 1-2-0 Reference Manual
702 @cindex note specification
706 @cindex entering notes
708 A note specification has the form
712 [][@code{!}][@code{?}][]
715 The pitch of the note is specified by the note's name.
718 The default names are the Dutch note names. The notes are specified
719 by the letters `@code{c}' through `@code{b}', where `@code{c}' is an
720 octave below middle C and the letters span the octave above that C.
721 In Dutchcindex(notenames!Dutch), a sharp is formed by adding
722 `@code{-is}' to the end of a pitch name. A flat is formed by adding
723 `@code{-es}'. Double sharps and double flats are obtained by adding
724 `@code{-isis}' or `@code{-eses}'. `@code{aes}' and `@code{ees}' are
725 contracted to `@code{as}' and `@code{es}' in Dutch, but both forms will
728 LilyPond has predefined sets of notenames for various languages. See
729 section @xref{notelang} for details.
732 The optional octave specification takes the form of a series of
733 single quote (`@code{'}
735 ') characters or a series of comma
738 ') characters. Each @code{'} raises the pitch by one
739 octave; each @code{,} lowers the pitch by an octave.
741 @mudela[fragment,verbatim,center]
742 c' d' e' f' g' a' b' c''
745 @mudela[fragment,verbatim,center]
746 cis' dis' eis' fis' gis' ais' bis'
749 @mudela[fragment,verbatim,center]
750 ces' des' es' fes' ges' as' bes'
753 @mudela[fragment,verbatim,center]
754 cisis' eisis' gisis' aisis' beses'
757 @mudela[fragment,verbatim,center]
758 ceses' eses' geses' ases' beses'
761 Whenever a C-sharp is desired, you must specify a C-sharp. LilyPond
762 will determine what accidentals to typeset depending on the key and
763 context. A reminder accidental
764 @cindex reminder accidental
766 forced by adding an exclamation mark `@code{!}' after the pitch. A
767 cautionary accidental,
768 @cindex cautionary accidental
770 accidental within parentheses can be obtained by adding the question
775 @mudela[fragment,verbatim,center]
776 cis' d' e' cis' c'? d' e' c'!
782 Durations are entered as their reciprocal values. For notes longer
783 than a whole note, use identifiers.
789 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
798 \notes \relative c'' {
800 a1 a2 a4 a8 a16 a32 a64 a64
803 loose_column_distance = 2.5 * \interline;
806 \type "Score_engraver";
808 \consists "Note_heads_engraver";
809 \consists "Stem_engraver";
810 \consists "Rhythmic_column_engraver";
821 r1 r2 r4 r8 r16 r32 r64 r64
830 \notes \relative c'' {
832 r1 r2 r4 r8 r16 r32 r64 r64
835 loose_column_distance = 2.5 * \interline;
838 \type "Score_engraver";
840 \consists "Rest_engraver";
841 \consists "Stem_engraver";
842 \consists "Rhythmic_column_engraver";
849 If the duration is omitted then it is set equal to the previous
850 duration. If there is no previous duration, a quarter note is
851 assumed. The duration can be followed by a dot (`@code{.}
854 to obtain dotted note lengths.
856 @mudela[fragment,verbatim,center]
860 You can alter the length of duration by writing
861 `@code{*}' after it. This will not affect the
862 appearance of note heads or rests.
865 Rests are entered like notes, with note name `@code{r}
870 '. There is also a note name `@code{s}
873 which produces a space of the specified duration.
874 `@code{R}' is specifically meant for entering parts: the @code{R} rest
875 can expand to fill a score with rests, or it can be printed as a
876 single multimeasure rest.
879 @cindex lyrics expressions
881 Syllables are entered like notes, with pitches replaced by text. For
882 example, `@code{Twin-4 kle4 twin-4 kle4}' enters four syllables, each
883 with quarter note duration. Note that the hyphen has no special
884 meaning for lyrics, and does not introduce special symbols. See
885 section @xref{modes} for a description of what is interpreted as
888 Spaces can be introduced into a lyric either by using quotes
889 (`@code{"}') or by using an underscore without quotes: `@code{He_could4
890 not4}'. All unquoted underscores are converted to spaces. Printing
891 lyrics is discussed in section @xref{lyricprint}.
900 @cindex property@@@code{\property}
905 Sets the property of the context to
906 the specified . All three arguments are strings.
907 Depending on the context, it may be necessary to quote the strings or
908 to leave space on both sides of the dot.
912 @cindex translator switches
917 @cindex translator@@@code{\translator}
922 A music expression indicating that the context which is a direct
923 child of the a context of type should be shifted to
924 a context of type and the specified name.
926 Usually this is used to switch staffs in Piano music, e.g.
930 @code{\translator Staff = top}
937 Commands are music expressions that have no duration.
943 @cindex key@@@code{\key}
947 Change the key signature. should be
949 @cindex major@@@code{\major}
951 @cindex minor@@@code{\minor}
953 -major or -minor, respectively. The second
954 argument is optional; the default is major keys. The
955 argument can also be given as an integer, which tells the number of
956 semitones that should be added to the pitch given in the subsequent
958 @cindex key@@@code{\key}
959 commands to get the corresponding major key,
961 @cindex minor@@@code{\minor}
962 is defined as 3. The standard
963 mode names @code{\ionian}
964 @cindex ionian@@@code{\ionian}
967 @cindex locrian@@@code{\locrian}
969 @cindex aeolian@@@code{\aeolian}
972 @cindex mixolydian@@@code{\mixolydian}
974 @cindex lydian@@@code{\lydian}
977 @cindex phrygian@@@code{\phrygian}
979 @cindex dorian@@@code{\dorian}
986 @cindex keysignature@@@code{\keysignature}
990 Specify an arbitrary key signature. The pitches from will
991 be printed in the key signature in the order that they appear on the
998 @cindex mark@@@code{\mark}
1000 @code{\mark} @code{;}
1003 Prints a mark over or under (depending on the
1004 @code{markDirection}
1005 @cindex markDirection@@@code{markDirection}
1006 property) the staff. You must add
1007 @code{Mark_engraver}
1008 @cindex Mark_engraver@@@code{Mark_engraver}
1009 to either the Score or Staff context for
1012 @node barlines, manualbeam, notedesc, LilyPond 1-2-0 Reference Manual
1017 @cindex bar@@@code{\bar}
1021 This is a request to print a special bar symbol. It replaces the
1022 regular bar symbol with a special
1023 symbol. The argument is a string which specifies the
1024 kind of bar to print. Options are @code{":|"}
1025 @cindex "|A@@@code{:|}
1028 @cindex "|B@@@code{|:}
1030 @cindex "|C@@@code{:|:}
1033 @cindex "|D@@@code{||}
1035 @cindex "|E@@@code{|.}
1038 @cindex "|F@@@code{.|}
1040 @cindex "|G@@@code{.|.}
1042 These produce, respectively, a right repeat, a left repeat, a double
1043 repeat, a double bar, a start bar, an end bar, and a thick double
1044 bar. If is set to @code{"empty"} then nothing is
1045 printed, but a line break is allowed at that spot.
1047 You are encouraged to use @code{\repeat} for repetitions.
1048 See section @xref{sec-repeats}.
1055 @cindex cadenza@@@code{\cadenza}
1059 Music expression that toggles the automatic generation of bar lines.
1060 If is 1, bar line generation is turned off. If
1061 is 0, a bar line is immediately printed and
1062 automatic bar generation is turned on.
1067 @cindex time@@@code{\time}
1071 Change the time signature. The default time signature is 4/4.
1072 The time signature is used to generate bar lines.
1077 @cindex tempo@@@code{\tempo}
1081 Used to specify the tempo. For example, `@code{\tempo 4 = 76;}'
1082 requests output with 76 quarter notes per minute.
1087 @cindex partial@@@code{\partial}
1095 This creates an incomplete measure (anacrusis, upbeat) at the start of
1096 the music, e.g., `@code{\partial 8*2;}' creates a starting measure
1097 lasting two eighth notes.
1108 @cindex shorten measures
1112 `@code{|}' is a barcheck. Whenever a barcheck is encountered during
1113 interpretation, a warning message is issued if it doesn't fall at a
1114 measure boundary. This can help you finding errors in the input.
1115 The beginning of the measure will be relocated, so this can also
1116 be used to shorten measures.
1122 @cindex penalty@@@code{\penalty}
1126 Discourage or encourage line breaks. See identifiers
1128 @cindex break@@@code{\break}
1130 @cindex nobreak@@@code{\nobreak}
1132 section @xref{ident}.
1137 @cindex clef@@@code{\clef}
1141 Music expression that sets the current clef. The argument is a
1142 string which specifies the name of the clef. Several clef names are
1143 supported. If `@code{_8}' or `@code{^8}' is added to the end of a clef
1144 name, then the clef lowered or raised an octave will be generated.
1145 Here are the supported clef names with middle C shown in each
1154 %\property Voice.textStyle = typewriter
1155 \clef subbass; c'4-"\kern -5mm subbass"
1156 \clef bass; c'4^"\kern -2mm bass"
1157 \clef baritone; c'4_"\kern -5mm baritone"
1158 \clef varbaritone; c'4^"\kern -6mm varbaritone"
1159 \clef tenor; c'4_"\kern -3mm tenor"
1160 \clef "G_8"; c'4^"\kern -2mm G\\_8"
1163 linewidth = 4.5 \in;
1175 \clef alto; c'4_"\kern -2mm alto"
1176 \clef mezzosoprano; c'4^"\kern -9mm mezzosoprano"
1177 \clef soprano; c'4_"\kern -6mm soprano"
1178 \clef treble; c'4^"\kern -4mm treble"
1179 \clef french; c'4_"\kern -4mm french"
1182 linewidth = 4.5 \in;
1188 The three clef symbols can also be obtained using the names `@code{G}',
1189 `@code{C}' or `@code{F}', optionally followed by an integer which
1190 indicates at which note line the clef is located. An as example, the
1191 @code{mezzosoprano} clef can also be given as `@code{C2}'.
1196 @cindex skip@@@code{\skip}
1200 Skips the amount of time specified by . If no other
1201 music is played, a gap will be left for the skipped time with no
1202 notes printed. It works in Note Mode or Lyrics Mode. In Note mode,
1203 this has the same effect as the space rest `@code{s}'.
1208 @node manualbeam, tremolo, barlines, LilyPond 1-2-0 Reference Manual
1210 A beam is specified by surrounding the beamed notes with brackets
1217 @mudela[fragment,verbatim,center]
1218 [a'8 a'] [a'16 a' a' a']
1221 Some more elaborate constructions:
1223 @mudela[fragment,verbatim,center]
1224 [a'16 <a' c''> c'' <a' c''>]
1225 \times 2/3 { [e'8 f' g'] }
1228 Beaming can be generated automatically; see section @xref{autobeam}.
1230 To place tremolo marks
1231 @cindex tremolo beams
1232 between two notes, begin
1233 with `@code{[:}' and end with `@code{]}'. Tremolo marks
1234 will appear instead of beams. Putting more than two notes in such a
1235 construction will produce odd effects. To create tremolo beams on a
1236 single note, simply attach `@code{:}' to the note itself
1237 (see also section @xref{tremolo}).
1239 @mudela[fragment,verbatim,center]
1240 [:16 e'1 g'] [:8 e'4 f']
1243 @mudela[fragment,verbatim,center]
1244 c'4:32 [:16 c'8 d'8]
1248 @cindex --@@@code{-}@code{-}
1250 @cindex __@@@code{__}
1256 The syntax for an extender mark is `@code{__}'. This syntax can only
1257 be used within lyrics mode. The syntax for a spanning hyphen (i.e.,
1258 a hyphen that will be printed between two lyric syllables) is
1264 A tie connects two adjacent note heads of the same pitch. When used
1265 with chords, it connects all of the note heads whose pitches match.
1266 Ties are indicated using the tilde symbol `@code{~}
1269 If you try to tie together chords which have no common pitches, a
1270 warning message will appear and no ties will be created.
1272 @mudela[fragment,verbatim,center]
1273 e' ~ e' <c' e' g'> ~ <c' e' g'>
1278 [TODO: explain Requests]
1281 @cindex articulations
1287 A variety of symbols can appear above and below notes to indicate
1288 different characteristics of the performance. These symbols can be
1289 added to a note with `@code{-\}'. Numerous symbols
1290 are defined in @file{script.ly} and @file{script.scm}. Symbols can be
1291 forced to appear above or below the note by writing
1292 `@code{^\}' and `@code{_\}'
1293 respectively. Here is a chart showing symbols above notes, with the
1294 name of the corresponding symbol appearing underneath.
1300 c''-\accent c''-\marcato c''-\staccatissimo c''-\fermata
1301 c''-\stopped c''-\staccato c''-\tenuto c''-\upbow
1302 c''-\downbow c''^\lheel c''-\rheel c''^\ltoe
1303 c''-\rtoe c''-\turn c''-\open c''-\flageolet
1304 c''-\reverseturn c''-\trill c''-\prall c''-\mordent
1305 c''-\prallprall c''-\prallmordent c''-\upprall c''-\downprall
1306 c''-\thumb c''-\segno c''-\coda
1308 \context Lyrics \lyrics {
1309 accent__ marcato__ staccatissimo__ fermata
1310 stopped__ staccato__ tenuto__ upbow
1311 downbow__ lheel__ rheel__ ltoe
1312 rtoe__ turn__ open__ flageolet
1313 reverseturn__ trill__ prall__ mordent
1314 prallprall__ prallmordent__ uprall__ downprall
1315 thumb__ segno__ coda
1319 linewidth = 5.875\in;
1326 In addition, it is possible to place arbitrary strings of text or
1327 TeX above or below notes by using a string instead of an
1328 identifier: `@code{c^"text"}'. Fingerings
1331 placed by simply using digits. All of these note ornaments appear in
1332 the printed output but have no effect on the MIDI rendering of the
1335 To save typing, fingering instructions (digits 0 to 9 are
1336 supported) and single characters shorthands exist for a few
1343 \property Voice.textStyle = typewriter
1349 c''4-^_"c-\\^{ }" s4
1356 linewidth = 5.875 \in;
1363 Dynamic marks are specified by using an identifier after a note:
1364 `@code{c4-\ff}' (the dash is optional for dynamics: `@code{c4 \ff})'.
1365 The available dynamic marks are:
1367 @cindex ppp@@@code{\ppp}
1370 @cindex pp@@@code{\pp}
1372 @cindex p@@@code{\p}
1374 @cindex mp@@@code{\mp}
1377 @cindex mf@@@code{\mf}
1379 @cindex f@@@code{\f}
1381 @cindex ff@@@code{\ff}
1384 @cindex fff@@@code{\fff}
1386 @cindex ffff@@@code{\ffff}
1389 @cindex fp@@@code{\fp}
1391 @cindex sf@@@code{\sf}
1394 @cindex sff@@@code{\sff}
1396 @cindex sp@@@code{\sp}
1399 @cindex spp@@@code{\spp}
1401 @cindex sfz@@@code{\sfz}
1404 @cindex rfz@@@code{\rfz}
1411 @cindex textscript@@@code{\textscript}
1415 Defines a text to be printed over or under a note. is a
1416 string that may be one of @code{roman}, @code{italic}, @code{typewriter},
1417 @code{bold}, @code{Large}, @code{large}, @code{dynamic} or @code{finger}.
1419 You can attach a general textscript request using this syntax:
1424 c4-\textscript "6" "finger"
1425 c4-\textscript "foo" "normal"
1430 This is equivalent to `@code{c4-6 c4-"foo"}'.
1438 @cindex script@@@code{\script}
1442 Prints a symbol above or below a note. The argument is a string
1443 which points into the script-alias table defined in @file{script.scm}.
1444 The scheme definitions specify whether the symbol follows notes into
1445 the staff, dependence of symbol placement on staff direction, and a
1446 priority for placing several symbols over one note. Usually the
1448 @cindex script@@@code{\script}
1449 keyword is not used directly. Various
1450 helpful identifier definitions appear in @file{script.ly}.
1455 Slurs connects chords and try to avoid crossing stems. A slur is
1456 started with `@code{(}' and stopped with `@code{)}'. The
1457 starting `@code{(}' appears to the right of the first note in
1458 the slur. The terminal `@code{)}' appears to the left of the
1459 first note in the slur. This makes it possible to put a note in
1460 slurs from both sides:
1462 @mudela[fragment,verbatim,center]
1463 f'()g'()a' [a'8 b'(] a'4 g'2 )f'4
1469 A crescendo mark is started with @code{\cr}
1470 @cindex cr@@@code{\cr}
1473 @cindex rc@@@code{\rc}
1474 . A decrescendo mark is started with
1476 @cindex decr@@@code{\decr}
1479 @cindex rced@@@code{\rced}
1480 . There are also shorthands for these
1481 marks. A crescendo can be started with @code{\<}
1482 @cindex <@@@code{\<}
1484 decrescendo can be started with @code{\>}
1485 @cindex >@@@code{\>}
1487 be terminated with @code{\!}
1488 @cindex "!@@@code{\"!}
1489 . Note that @code{\!}
1490 must go before the last note of the dynamic mark whereas @code{\rc}
1491 and @code{\rced} go after the last note. Because these marks are
1492 bound to notes, if you want to get several marks during one note, you
1493 must use spacer notes.
1495 @mudela[fragment,verbatim,center]
1496 c'' \< \! c'' d'' \decr e'' \rced
1497 < f''1 { s4 \< \! s2 \> \! s4 } >
1504 @cindex spanrequest@@@code{\spanrequest}
1508 Define a spanning request. The parameter is either -1
1510 @cindex start@@@code{\start}
1511 ) or 1 (@code{\stop}
1512 @cindex stop@@@code{\stop}
1514 is a string that describes what should be started.
1515 Supported types are @code{crescendo}, @code{decrescendo},
1516 @code{beam}, @code{slur}. This is an internal command. Users should
1517 use the shorthands which are defined in the initialization file
1520 You can attach a (general) span request to a note using
1522 @mudela[fragment,verbatim,center]
1523 c'4-\spanrequest \start "slur"
1524 c'4-\spanrequest \stop "slur"
1527 The slur syntax with parentheses is a shorthand for this.
1531 @cindex tremolo marks
1533 @node tremolo, Compound music expressions, manualbeam, LilyPond 1-2-0 Reference Manual
1535 Tremolo marks can be printed on a single note by adding
1536 `@code{:}[]' after the note. The length must be at
1537 least 8. A value of 8 gives one line across
1538 the note stem. If the length is omitted, then the last value is
1539 used, or the value of the @code{abbrev}
1540 @cindex abbrev@@@code{abbrev}
1541 property if there was
1544 @mudela[verbatim,fragment,center]
1550 @node Compound music expressions, compoundmusic, tremolo, LilyPond 1-2-0 Reference Manual
1551 @section Compound music expressions
1553 @cindex compound music expressions
1555 @node compoundmusic, relative, Compound music expressions, LilyPond 1-2-0 Reference Manual
1557 Music expressions are compound data structures. You can nest music
1558 expressions any way you like. This simple example shows how three
1559 chords can be expressed in two different ways:
1561 @mudela[fragment,verbatim,center]
1562 \notes \context Staff {
1564 <a c'> <b d' > <c' e' >
1565 <{a b c'}{c' d' e'}>
1571 @cindex context selection
1576 @cindex context@@@code{\context}
1581 Interpret within a context of type .
1582 If the context does not exist, it will be created. The new context
1583 can optionally be given a name. See
1584 section @xref{contextselection} and @xref{contextdefs} for more
1585 information on interpretation contexts.
1593 Mode switching keywords form compound music expressions: @code{\notes}
1595 @cindex notes@@@code{\notes}
1597 @cindex chords@@@code{\chords}
1599 , and @code{\lyrics}
1600 @cindex lyrics@@@code{\lyrics}
1602 These expressions do not add anything to the meaning of their
1603 arguments. They are just a way to indicate that the arguments should
1604 be parsed in indicated mode. See section @xref{modes} for more
1605 information on modes.
1607 More information on context selection can be found in
1608 section @xref{contextselection}.
1612 @cindex sequential music
1619 @cindex sequential@@@code{\sequential}
1624 This means that list should be played or written in sequence, i.e.,
1625 the second after the first, the third after the second. The duration
1626 of sequential music is the the sum of the durations of the elements.
1627 There is a shorthand, which leaves out the keyword:
1636 @cindex simultaneous music
1644 @code{\simultaneous}
1645 @cindex simultaneous@@@code{\simultaneous}
1650 It constructs a music expression where all of its arguments start at
1651 the same moment. The duration is the maximum of the durations of the
1652 elements. The following shorthand is a common idiom:
1659 If you try to use a chord as the first thing in your score, you might
1660 get multiple staffs instead of a chord.
1662 @mudela[verbatim,center]
1671 This happens because the chord is interpreted by a score context.
1672 Each time a note is encountered a default Voice context (along with a
1673 Staff context) is created. The solution is to explicitly instantiate
1676 @mudela[verbatim,center]
1678 \notes\context Voice <c''4 e''>
1687 @cindex relative pitch specification
1689 @node relative, sec-repeats, compoundmusic, LilyPond 1-2-0 Reference Manual
1691 It is easy to get confused by octave changing marks and accidentally
1692 putting a pitch in the wrong octave. A much better way of entering a
1693 note's octave is `the relative octave' mode.
1698 @cindex relative@@@code{\relative}
1702 The octave of notes that appear in are calculated as
1703 follows: If no octave changing marks are used, the basic interval
1704 between this and the last note is always taken to be a fourth or
1705 less.@footnote{The interval is determined without regarding
1706 accidentals. A @code{fisis} following a @code{ceses} will be put above
1707 the @code{ceses}.} The octave changing marks `@code{'}' and `@code{,}'
1708 can then be added to raise or lower the pitch by an extra octave.
1709 Upon entering relative mode, an absolute starting pitch must be
1710 specified that will act as the predecessor of the first note of
1713 Entering scales is straightforward in relative mode.
1715 @mudela[fragment,verbatim,center]
1721 And octave changing marks are used for intervals greater than a fourth.
1723 @mudela[fragment,verbatim,center]
1725 c g c f, c' a, e'' }
1728 If the preceding item is a chord, the first note of the chord is used
1729 to determine the first note of the next chord. But other notes
1730 within the second chord are determined by looking at the immediately
1733 @mudela[fragment,verbatim,center]
1741 The pitch after the @code{\relative} contains a notename. To parse
1742 the pitch as a notename, you have to be in note mode, so there must
1743 be a surrounding @code{\notes}
1744 @cindex notes@@@code{\notes}
1745 keyword (which is not
1748 The relative conversion will not affect @code{\transpose} or
1749 @code{\relative} sections in its argument. If you want to use
1750 relative within transposed music, you must place an additional
1751 @code{\relative} inside the @code{\transpose}.
1753 It is strongly recommended to use relative pitch mode: less work,
1754 less error-prone, and more readable.
1758 Chord names are a way to generate simultaneous music expressions that
1759 correspond with traditional chord names. It can only be used in
1760 Chord mode (see section @xref{modes}).
1764 [][@code{-}][@code{^}][@code{/}].
1767 should be the tonic note of the chord, and
1768 is the chord duration in the usual notation. There are two kinds of
1769 modifiers. One type is @emph{chord additions}, which are obtained by
1770 listing intervals separated by dots. An interval is written by its
1771 number with an optional `@code{+}' or `@code{-}' to indicate raising or
1772 lowering by half a step. Chord additions has two effects: It adds
1773 the specified interval and all lower odd numbered intervals to the
1774 chord, and it may lower or raise the specified interval. Intervals
1775 must be separated by a dot (`@code{.}').
1779 @mudela[fragment,verbatim]
1783 c-9 c-9-.5+.7+ c-3-.5- c-4.6.8
1790 The second type of modifier that may appear after the `@code{-}' is a
1791 named modifier. Named modifiers are listed in the file
1792 @file{chord-modifiers.ly}. The available modifiers are `@code{m}' and
1793 `@code{min}' which lower the 3rd half a step, `@code{aug}
1794 @cindex aug@@@code{aug}
1796 raises the 5th, `@code{dim}
1797 @cindex dim@@@code{dim}
1798 ' which lowers the 5th,
1800 @cindex maj@@@code{maj}
1801 ' which adds a raised 7th, and `@code{sus}
1802 @cindex sus@@@code{sus}
1804 which replaces the 5th with a 4th.
1808 @mudela[fragment,verbatim]
1811 c1-m c-min7 c-maj c-aug c-dim c-sus
1819 Chord subtractions are used to eliminate notes from a chord. The
1820 notes to be subtracted are listed after a `@code{^}' character,
1823 @mudela[fragment,verbatim,center]
1831 Chord inversions can be specified by appending `@code{/}
1834 the name of a single note to a chord. This has the effect of
1835 lowering the specified note by an octave so it becomes the lowest
1836 note in the chord. If the specified note is not in the chord, a
1837 warning will be printed.
1839 @mudela[fragment,verbatim,center]
1848 Throughout these examples, chords have been shifted around the staff
1849 using @code{\transpose}.
1851 You should not combine @code{\relative} with named chords.
1857 Tuplets are made out of a music expression by multiplying their
1858 duration with a fraction.
1863 @cindex times@@@code{\times}
1867 The duration of will be multiplied by the fraction.
1868 In print, the fraction's denominator will be printed over the notes,
1869 optionally with a bracket. The most common tuplet is the triplet in
1870 which 3 notes have the length of 2, so the notes are 2/3 of
1871 their written length:
1873 @mudela[fragment,verbatim,center]
1874 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
1884 @cindex grace@@@code{\grace}
1888 A grace note expression has duration 0; the next real note is
1889 assumed to be the main note.
1891 You cannot have the grace note after the main note, in terms of
1892 duration, and main notes, but you can typeset the grace notes to the
1893 right of the main note using the property
1894 @code{graceAlignPosition}
1895 @cindex graceAlignPosition@@@code{graceAlignPosition}
1898 When grace music is interpreted, a score-within-a-score is set up:
1899 has its own time bookkeeping, and you could (for
1900 example) have a separate time signature within grace notes. While in
1901 this score-within-a-score, you can create notes, beams, slurs, etc.
1902 Unbeamed eighth notes and shorter by default have a slash through the
1903 stem. This behavior can be controlled with the
1905 @cindex stemStyle@@@code{stemStyle}
1910 @mudela[fragment,verbatim]
1912 \grace c8 c4 \grace { [c16 c16] } c4
1913 \grace { \property Grace.stemStyle = "" c16 } c4
1919 At present, nesting @code{\grace}
1920 @cindex grace@@@code{\grace}
1925 @code{\grace @{ \grace c32 c16 @} c4}
1928 may result in run-time errors of LilyPond. Since the meaning of such
1929 a construct is unclear, we don't consider this a loss. Similarly,
1930 juxtaposing two @code{\grace} sections is syntactically valid, but
1931 makes no sense and may cause runtime errors.
1933 Ending a staff or score with grace notes may also generate a run-time
1934 error, since there will be no main note to attach the grace notes to.
1940 @node sec-repeats, transpose, relative, LilyPond 1-2-0 Reference Manual
1942 In order to specify repeats, use the @code{\repeat}
1943 @cindex repeat@@@code{\repeat}
1945 keyword. Since repeats look and sound differently when played or
1946 printed, there are a few different variants of repeats.
1950 Repeated music is fully written (played) out. Useful for MIDI
1954 This is the normal notation: Repeats are not written out, but
1955 alternative endings (voltas) are printed, left to right.
1958 Alternative endings are written stacked, which is useful for
1962 The syntax for repeats is
1969 If you have alternative endings, you may add
1974 @cindex alternative@@@code{\alternative}
1981 where each is a Music expression.
1983 Normal notation repeats are used like this:
1987 @mudela[fragment,verbatim]
1989 \repeat volta 2 { c'4 d' e' f' }
1990 \repeat volta 2 { f' e' d' c' }
1995 With alternative endings:
1999 @mudela[fragment,verbatim]
2001 \repeat volta 2 {c'4 d' e' f'}
2002 \alternative { {d'2 d'} {f' f} }
2007 Folded repeats look like this:@footnote{Folded repeats offer little
2008 more over simultaneous music. However, it is to be expected that
2009 more functionality -- especially for the MIDI backend -- will be
2014 @mudela[fragment,verbatim]
2016 \repeat fold 2 {c'4 d' e' f'}
2017 \alternative { {d'2 d'} {f' f} }
2024 @mudela[fragment,verbatim]
2028 \repeat volta 2 { e | c2 d2 | e2 f2 | }
2029 \alternative { { g4 g g } { a | a a a a | b1 } }
2036 If you don't give enough alternatives for all of the repeats, then
2037 the first alternative is assumed to be repeated often enough to equal
2038 the specified number of repeats.
2042 @mudela[fragment,verbatim]
2045 \repeat volta 3 { \partial 4; e | c2 d2 | e2 f2 | }
2046 \alternative { { g4 g g }
2047 {\partial 1; e4 e e }
2048 {\partial 1; a a a a | b1 } }
2055 It is possible to nest @code{\repeat}. This is not entirely
2056 supported: the notes will come be in the right places, but the repeat
2061 @cindex transposition of pitches
2063 @node transpose, Ambiguities, sec-repeats, LilyPond 1-2-0 Reference Manual
2065 A music expression can be transposed with
2067 @cindex transpose@@@code{\transpose}
2075 This means that middle C in is transposed to
2078 @code{\transpose} distinguishes between enharmonic pitches: both
2079 @code{\transpose cis'} or @code{\transpose des'} will transpose up half
2080 a tone. The first version will print sharps and the second version
2085 @mudela[fragment,verbatim]
2090 \transpose des'' { \key e; c d e f }
2091 \transpose cis'' { \key e; c d e f }
2097 If you want to use both @code{\transpose} and @code{\relative}, then
2098 you must use @code{\transpose} first. @code{\relative} will have no
2099 effect music that appears inside a @code{\transpose}.
2103 @cindex automatic lyric durations
2105 If you have lyrics that are set to a melody, you can import the
2106 rhythm of that melody into the lyrics using @code{\addlyrics}.
2108 @cindex addlyrics@@@code{\addlyrics}
2109 The syntax for this is
2116 This means that both and are
2117 interpreted, but that every non-command atomic music expression
2118 (``every syllable'') in is interpreted using timing
2121 If the property @code{automaticMelismata}
2122 @cindex automaticMelismata@@@code{automaticMelismata}
2124 context of , no lyrics will be put on slurred or tied
2129 @mudela[verbatim,fragment]
2132 \property Voice.automaticMelismata = "1"
2133 c8 () cis d8. e16 f2
2135 \context Lyrics \lyrics {
2141 You should use a single rhythm melody, and single rhythm lyrics (a
2142 constant duration is the obvious choice). If you do not, you will get
2143 undesired effects when using multiple stanzas:
2147 @mudela[verbatim,fragment]
2150 c8 () cis d8. e16 f2
2152 \context Lyrics \lyrics
2159 It is valid (but probably not very useful) to use notes instead of
2165 @node Ambiguities, Notation conversion specifics, transpose, LilyPond 1-2-0 Reference Manual
2166 @section Ambiguities
2170 The grammar contains a number of ambiguities.@footnote{The authors
2171 hope to resolve them at a later time.}
2174 @item The assignment
2184 can be interpreted as making a string identifier @code{\foo}
2185 containing @code{"bar"}, or a music identifier @code{\foo}
2186 containing the syllable `bar'.
2188 @item The assignment
2198 can be interpreted as making an integer identifier
2199 containing -6, or a Request identifier containing the
2200 fingering `6' (with neutral direction).
2202 @item If you do a nested repeat like
2214 then it is ambiguous to which @code{\repeat} the
2215 @code{\alternative} belongs. This is the classic if-then-else
2216 dilemma. It may be solved by using braces.
2218 @item (an as yet unidentified ambiguity :-)
2223 @node Notation conversion specifics, autobeam, Ambiguities, LilyPond 1-2-0 Reference Manual
2224 @section Notation conversion specifics
2228 @cindex automatic beam generation
2230 @node autobeam, lyricprint, Notation conversion specifics, LilyPond 1-2-0 Reference Manual
2232 By default, LilyPond will generate beams automatically. This feature
2233 can be disabled by setting the @code{Voice.noAutoBeaming}
2234 @cindex Voice.noAutoBeaming@@@code{Voice.noAutoBeaming}
2236 property to 1. It can be overridden for specific cases by
2237 specifying explicit beams as described in
2238 section @xref{manualbeam}.
2240 A large number of Voice properties are used to decide how to generate
2241 beams. Their default values appear in @file{auto-beam-settings.ly}.
2242 In general, beams can begin anywhere, but their ending location is
2243 significant. Beams can end on a beat, or at durations specified by
2244 the @code{Voice.beamAutoEnd}
2245 @cindex Voice.beamAutoEnd@@@code{Voice.beamAutoEnd}
2246 property. To end beams every
2247 quarter note, for example, you could set
2248 @code{Voice.beamAutoEnd}
2249 @cindex Voice.beamAutoEnd@@@code{Voice.beamAutoEnd}
2250 equal to `@code{"1/4"}'. To end beams
2251 at every three eighth notes you would set it to `@code{"3/8"}'. The
2252 same syntax can be used to specify beam starting points using
2253 @code{Voice.beamAutoBegin}
2254 @cindex Voice.beamAutoBegin@@@code{Voice.beamAutoBegin}
2257 To allow different settings for different time signatures, these
2258 property names can start with `@code{time}@code{_}' to
2259 restrict the definition to `@code{/}' time. For example,
2260 to specify beams ending only for 6/8 time you would use the
2261 property @code{Voice.time6_8beamAutoEnd}. To allow different endings
2262 for notes of different durations, the duration can be tacked onto the
2263 end of the property. To specify beam endings for beams that contain
2264 32nd notes, you would use @code{Voice.beamAutoEnd_32}.
2272 @cindex printing!chord names
2274 For displaying printed chord names, use the @code{ChordNames}
2275 @cindex ChordNames@@@code{ChordNames}
2277 and @code{ChordNameVoice}
2278 @cindex ChordNameVoice@@@code{ChordNameVoice}
2279 contexts. The chords may be entered
2280 either using the notation described above, or directly using
2285 @mudela[fragment,verbatim]
2287 \context ChordNames {
2288 \chords{a b c} \notes{<d f g> <e g b>}
2290 \context Staff \notes {
2298 LilyPond examines chords specified as lists of notes to determine a
2299 name to give the chord. By default, LilyPond will not try to
2300 identify chord inversions:
2302 @mudela[fragment,verbatim,center]
2304 \context ChordNameVoice \notes {
2307 \context Thread \notes {
2313 If you want inversions to be recognized, you must set the property
2314 @code{ChordNames.chordInversion}
2315 @cindex ChordNames.chordInversion@@@code{ChordNames.chordInversion}
2318 @mudela[fragment,verbatim,center]
2320 \property Score.chordInversion = 1
2321 \context ChordNameVoice \notes {
2324 \context Thread \notes {
2334 @cindex printing!lyrics
2336 @node lyricprint, Notation Contexts, autobeam, LilyPond 1-2-0 Reference Manual
2338 Lyric syllables must be interpreted within a @code{Lyrics} context
2340 @cindex context!Lyrics
2343 Here is a full example:
2350 \notes \transpose c'' {
2352 e f g2 | e4 f g2 \bar "|.";
2354 \context Lyrics \lyrics {
2355 Va-4 der Ja- cob Va- der Ja- cob
2356 Slaapt gij nog?2 Slaapt4 gij nog?2
2364 You may want a continuous line after the syllables to show melismata.
2365 To achieve this effect, add a `@code{__}' lyric as a separate word
2366 after the lyric to be extended. This will create an extender, a line
2367 that extends over the entire duration of the lyric. This line will
2368 run all the way to the start of the next lyric, so you may want to
2369 shorten it by using a blank lyric (using `@code{_}').
2376 \notes \relative c'' {
2377 a4 () b () c () d | c () d () b () a | c () d () b () a
2379 \context Lyrics \lyrics {
2380 foo1 __ | bar2. __ _4 | baz1 __
2389 If you want to have hyphens centered between syllables (rather than
2390 attached to the end of the first syllable) you can use the special
2391 `@code{-}@code{-}' lyric as a separate word between syllables. This
2392 will result in a hyphen which length varies depending on the space
2393 between syllables, and which will be centered between the syllables.
2401 \notes \transpose c'' {
2403 e f g2 | e4 f g2 \bar "|.";
2405 \context Lyrics \lyrics {
2406 Va4 -- der Ja -- cob | Va -- der Ja -- cob |
2407 Slaapt gij nog?2 | Slaapt4 gij nog?2
2417 @node Notation Contexts, contextselection, lyricprint, LilyPond 1-2-0 Reference Manual
2418 @section Notation Contexts
2420 @cindex notation contexts
2422 Notation contexts are objects that only exist during a run of
2423 LilyPond. During the interpretation phase of LilyPond, the Music
2424 expression contained in a @code{\score} block is interpreted in time
2425 order. This is the order in which humans read, play, and write
2428 A context is an object that holds the reading state of the
2429 expression; it contains information like
2432 @item What notes are playing at this point?
2433 @item What symbols will be printed at this point?
2434 @item In what style will they printed?
2435 @item What is the current key signature, time signature, point within
2439 Contexts are grouped hierarchically: A @code{Voice} context is
2440 contained in a @code{Staff} context (because a staff can contain
2441 multiple voices at any point), a @code{Staff} context is contained in
2442 a @code{Score}, @code{StaffGroup}, or @code{ChoirStaff} context (because
2443 these can all contain multiple staffs).
2445 Contexts associated with sheet music output are called @emph{notation
2446 contexts}, those for sound output are called playing contexts.
2448 Contexts are created either manually or automatically. Initially,
2449 the top level music expression is interpreted by the top level
2450 context (the @code{Score} context). When a atomic music expression
2451 (i.e. a note, a rest, @code{\bar}, or @code{\time} commands), a nested
2452 set of contexts is created that can process these atomic expressions,
2458 \score @{ \notes < c4 > @}
2463 The sequential music, `@code{@{ c4 @}}' is interpreted by @code{Score}
2464 context. When the note `@code{c4}' itself is interpreted, a set of
2465 contexts is needed that will accept notes. The default for this is a
2466 @code{Voice} context, contained in a @code{Staff} context. Creation of
2467 these contexts results in the staff being printed.
2470 @node contextselection, Notation output definitions, Notation Contexts, LilyPond 1-2-0 Reference Manual
2474 You can also create contexts manually, and you probably have to do so
2475 if you want to typeset complicated multiple part material. If a
2476 `@code{\context} ' expression is encountered
2477 during the interpretation phase, the argument will be
2478 interpreted with a context of type . If you specify a name,
2479 the specific context with that name is searched.
2481 If a context of the specified type and name can not be found, a new
2482 one is created. For example,
2488 \notes \relative c'' {
2489 c4 <d4 \context Staff = "another" e4> f
2496 In this example, the @code{c} and @code{d} are printed on the
2497 default staff. For the @code{e}, a context Staff called
2498 `@code{another}' is specified; since that does not exist, a new
2499 context is created. Within @code{another}, a (default) Voice context
2500 is created for the @code{e4}. When all music referring to a
2501 context is finished, the context is ended as well. So after the
2502 third quarter, @code{another} is removed.
2504 Almost all music expressions inherit their interpretation context
2505 from their parent. In other words, suppose that the syntax for a
2513 When the interpretation of this music expression starts, the context
2514 for , , etc. is that of the total
2517 Lastly, you may wonder, why this:
2523 \notes \relative c'' @{
2531 doesn't result in this:
2536 \notes \relative c'' {
2543 For the @code{c4}, a default @code{Staff} (with a contained
2544 @code{Voice}) context is created. After the @code{c4} ends, no
2545 music refers to this default staff, so it would be ended, with the
2546 result shown. To prevent this inconvenient behavior, the context to
2547 which the sequential music refers is adjusted during the
2548 interpretation. So after the @code{c4} ends, the context of the
2549 sequential music is also the default @code{Voice} context.
2550 The @code{d4} gets interpreted in the same context
2555 These are the contexts supplied with the package. They are defined
2556 in the initialization file @file{ly/engraver.ly}.
2560 @cindex Grace@@@code{Grace}
2562 The context for handling grace notes. It is instantiated
2563 automatically when you use @code{\grace}. Basically, it is an
2564 `embedded' miniature of the Score context. Since this context
2565 needs special interaction with the rest of LilyPond, you should
2566 not explicitly instantiate it.
2568 @item @code{LyricVoice}
2569 @cindex LyricVoice@@@code{LyricVoice}
2571 Corresponds to a voice with lyrics. Handles the printing of a
2572 single line of lyrics.
2575 @cindex Thread@@@code{Thread}
2577 Handles note heads, and is contained in the Voice context. You
2578 have to instantiate this explicitly if you want to adjust the
2579 style of individual note heads.
2582 @cindex Voice@@@code{Voice}
2584 Corresponds to a voice on a staff. This context handles the
2585 conversion of dynamic signs, stems, beams, super- and subscripts,
2586 slurs, ties, and rests.
2588 You have to instantiate this explicitly if you want to have
2589 multiple voices on the same staff.
2591 @item @code{ChordNamesVoice}
2592 @cindex ChordNamesVoice@@@code{ChordNamesVoice}
2594 A voice with chord names. Handles printing of a line of chord
2597 @item @code{ChordNames}
2598 @cindex ChordNames@@@code{ChordNames}
2600 Typesets chord names. Can contain @code{ChordNamesVoice}
2604 @cindex Lyrics@@@code{Lyrics}
2606 Typesets lyrics. It can contain @code{LyricVoice} contexts.
2609 @cindex Staff@@@code{Staff}
2611 Handles clefs, bar lines, keys, accidentals. It can contain
2612 @code{Voice} contexts.
2614 @item @code{RhythmicStaff}
2615 @cindex RhythmicStaff@@@code{RhythmicStaff}
2617 A context like @code{Staff} but for printing rhythms. Pitches are
2618 ignored; the notes are printed on one line. It can contain
2619 @code{Voice} contexts.
2621 @item @code{GrandStaff}
2622 @cindex GrandStaff@@@code{GrandStaff}
2624 Contains @code{Staff} or @code{RhythmicStaff} contexts. It adds a
2625 brace on the left side, grouping the staffs together. The bar
2626 lines of the contained staffs are connected vertically. It can
2627 contain @code{Staff} contexts.
2629 @item @code{PianoStaff}
2630 @cindex PianoStaff@@@code{PianoStaff}
2632 Just like @code{GrandStaff} but with @code{minVerticalAlign} set
2633 equal to @code{maxVerticalAlign} so that interstaff beaming and
2634 slurring can be used.
2636 @item @code{StaffGroup}
2637 @cindex StaffGroup@@@code{StaffGroup}
2639 Contains @code{Staff} or @code{RhythmicStaff} contexts. Adds a
2640 bracket on the left side, grouping the staffs together. The bar
2641 lines of the contained staffs are connected vertically. It can
2642 contain @code{Staff}, @code{RhythmicStaff}, @code{GrandStaff}, or
2643 @code{Lyrics} contexts.
2645 @item @code{ChoirStaff}
2646 @cindex ChoirStaff@@@code{ChoirStaff}
2648 Identical to @code{StaffGroup} except that the contained staffs
2649 are not connected vertically.
2652 @cindex Score@@@code{Score}
2654 This is the top level notation context. No other context can
2655 contain a @code{Score} context. This context handles the
2656 administration of time signatures. It also makes sure that items
2657 such as clefs, time signatures, and key-signatures are aligned
2658 across staffs. It can contain @code{Lyrics}, @code{Staff},
2659 @code{RhythmicStaff}, @code{GrandStaff}, @code{StaffGroup}, and
2660 @code{ChoirStaff} contexts.
2662 You cannot explicitly instantiate a Score context (since it is
2663 not contained in any other context). It is instantiated
2664 automatically when an output definition (a @code{\score} or
2665 @code{\paper} block) is processed.
2670 Properties that are set in one context are inherited by all of the
2671 contained contexts. This means that a property valid for the
2672 @code{Voice} context can be set in the @code{Score} context (for
2673 example) and thus take effect in all @code{Voice} contexts.
2675 Properties can be preset within the @code{\translator} block
2676 corresponding to the appropriate context. In this case, the syntax
2684 This assignment happens before interpretation starts, so a
2685 @code{\property} expression will override any predefined settings.
2687 The @code{\property} expression will create any property you specify.
2688 There is no guarantee that a property will be used. So if you spell
2689 a property name wrong, there will be no error message.
2691 The property settings are used during the interpretation phase. They
2692 are read by the LilyPond modules where interpretation contexts are
2693 built of. These modules are called @emph{translators}. Translators for
2694 notation are called @emph{engravers}, and translators for sound are
2695 called @emph{performers}.
2697 The precise result of a property is determined by the implementation
2698 of the translator that reads them. Therefore, the result of a
2699 property can vary, since it is implementation and configuration
2702 In order to fully find out what properties are used, you must
2703 currently search the source code for calls to @code{get_property}.
2704 The rest of the section is devoted to an (incomplete) overview of
2705 available properties.
2708 @cindex properties!Lyrics
2711 @item @code{textStyle}
2712 @cindex textStyle@@@code{textStyle}
2714 Set the font for lyrics. The available font choices are
2715 @code{roman}, @code{italic}, @code{bold}, @code{large}, @code{Large},
2716 @code{typewriter}, and @code{finger}. The @code{finger} font can
2717 only display numbers. Note also that you must be careful when
2718 using @code{\property} in Lyrics mode, because of the way strings
2719 are parsed. Either put quotes around the arguments to
2720 @code{\property} or be sure to leave a space on both sides of the
2725 @cindex properties!Thread
2728 @item @code{noteheadStyle}
2729 @cindex noteheadStyle@@@code{noteheadStyle}
2731 Selects type of note head. Choices are @code{cross},
2732 @code{diamond}, @code{harmonic}, @code{transparent}, and @code{""}.
2733 They are shown in that order below.
2739 \property Staff.barNonAuto = 1
2740 \property Voice.noteHeadStyle = cross
2742 \property Voice.noteHeadStyle = diamond
2744 \property Voice.noteHeadStyle = harmonic
2746 \property Voice.noteHeadStyle = transparent
2748 \property Voice.noteHeadStyle = ""
2759 @subsubheading Grace properties
2761 @cindex properties!Grace
2765 @item @code{stemStyle}
2766 @cindex stemStyle@@@code{stemStyle}
2768 By default set to @code{"grace"} meaning that all unbeamed
2769 notes with flags are typeset with a slash through the flag.
2770 Setting to @code{""} gives standard flags.
2774 @cindex properties!Voice
2778 @cindex abbrev@@@code{abbrev}
2780 Set length for tremolo to be used if no length is explicitly
2783 @item @code{articulationScriptPadding}
2784 @cindex articulationScriptPadding@@@code{articulationScriptPadding}
2787 Determines the extra space added between articulation marks, such
2788 as staccato, tenuto, trill, up/down bow or fermata, and the
2789 closest staff line or note.
2791 @item @code{articulationScriptVerticalDirection}
2793 @cindex articulationScriptVerticalDirection@@@code{articulationScriptVerticalDirection}
2795 Determines the location of articulation marks. Set to @code{\up}
2796 to print marks above the staff; set to @code{\down} to print marks
2797 below the staff. This property does not override explicit
2798 directions marked with `@code{^}' or `@code{_}' in the mudela file.
2800 @item @code{noAutoBeaming}
2801 @cindex beamAuto@@@code{beamAuto}
2803 If set to 1 then beams are not generated automatically.
2805 @item @code{beamAutoEnd}
2806 @cindex beamAutoEnd@@@code{beamAutoEnd}
2808 Specifies when automatically generated beams can end. See
2809 section @xref{autobeam}.
2811 @item @code{beamAutoBegin}
2812 @cindex beamAutoBegin@@@code{beamAutoBegin}
2814 Specifies when automatically generated beams can start. See
2815 section @xref{autobeam}.
2817 @item @code{beamquantisation}
2818 @cindex beamquantisation@@@code{beamquantisation}
2820 Set to @code{\none} for no quantization. Set to @code{\normal} to
2821 quantize position and slope. Set to @code{\traditional} to avoid
2822 wedges. These three settings are available via
2824 @cindex beamposfree@@@code{\beamposfree}
2826 @code{\beamposnormal}
2827 @cindex beamposnormal@@@code{\beamposnormal}
2829 @code{\beampostraditional}
2830 @cindex beampostraditional@@@code{\beampostraditional}
2833 @item @code{beamslopedamping}
2834 @cindex beamslopedamping@@@code{beamslopedamping}
2836 Set to @code{\none} for undamped beams. Set to @code{\normal} for
2837 damped beams. Set to @code{\infinity} for beams with zero slope.
2839 @code{\beamslopeproportional}
2840 @cindex beamslopeproportional@@@code{\beamslopeproportional}
2842 @code{\beamslopedamped}
2843 @cindex beamslopedamped@@@code{\beamslopedamped}
2845 @code{\beamslopezero}
2846 @cindex beamslopezero@@@code{\beamslopezero}
2848 corresponding value.
2850 @item @code{dynamicDirection}
2851 @cindex dynamicDirection@@@code{dynamicDirection}
2853 Determines location of dynamic marks. Set to @code{\up} to print
2854 marks above the staff; set to @code{\down} to print marks below
2857 @item @code{dynamicStyle}
2858 @cindex dynamicStyle@@@code{dynamicStyle}
2860 Set the text style for dynamics.
2862 @item @code{fontSize}
2863 @cindex fontSize@@@code{fontSize}
2865 Can be used to select smaller font sizes for music. The normal
2866 font size is 0, and the two smaller sizes are -1
2869 @item @code{forceHorizontalShift}
2870 @cindex forceHorizontalShift@@@code{forceHorizontalShift}
2872 Force horizontal shift for collision resolution. It overrides
2873 automatic collision resolution. The value is the shift amount
2874 expressed in @code{note_width}, as set in the paper section.
2877 @item @code{horizontalNoteShift}
2878 @cindex horizontalNoteShift@@@code{horizontalNoteShift}
2880 Enable LilyPond to shift notes horizontally if they collide with
2881 other notes. This is useful when typesetting many voices on one
2882 staff. The identifier @code{\shift}
2883 @cindex shift@@@code{\shift}
2885 enable this. Traditionally, the outer chords (the upmost and
2886 downmost voices), should have no @code{horizontalNoteShift}.
2888 @item @code{markScriptPadding}
2889 @cindex markScriptPadding@@@code{markScriptPadding}
2891 Determines the extra space added between the mark and the closest
2894 @item @code{markDirection}
2895 @cindex markDirection@@@code{markDirection}
2897 Determines if marks should be printed above or below the staff.
2898 Set to @code{\up} to print marks above the staff; set to
2899 @code{\down} to print marks below the staff.
2901 @item @code{midiInstrument}
2902 @cindex midiInstrument@@@code{midiInstrument}
2904 Sets the instrument for MIDI output. If this property is not set
2905 then LilyPond will use the @code{instrument} property. This must
2906 be set to one of the strings on the list of MIDI instruments that
2907 appears in section @xref{midilist}. If you use a string which
2908 is not listed, LilyPond will silently substitute piano.
2910 @item @code{oldTieBehavior}
2911 @cindex oldTieBehavior@@@code{oldTieBehavior}
2913 Set to 1 in order to get old tie behavior where ties would
2914 connect unequal pitches. This property is deprecated, and its
2915 use is not recommended.
2917 @item @code{restStyle}
2918 @cindex restStyle@@@code{restStyle}
2920 Change the layout of rests shorter than quarter notes.
2921 Currently, the standard layout @code{""} and mensural notation
2922 @code{"mensural"} are available. Mensural rests of duration
2923 32 or shorter are not available.
2925 @item @code{scriptHorizontal}
2926 @cindex scriptHorizontal@@@code{scriptHorizontal}
2928 Put scripts left or right of note heads. Support for this is
2929 limited. Accidentals will collide with scripts.
2931 @item @code{slurVerticalDirection}
2932 @cindex slurVerticalDirection@@@code{slurVerticalDirection}
2934 Set to @code{\free} for free choice of slur direction, set to
2935 @code{\up} to force slurs up, set to @code{\down} to force slurs
2936 down. The shorthands @code{\slurup}
2937 @cindex slurup@@@code{\slurup}
2940 @cindex slurdown@@@code{\slurdown}
2943 @cindex slurboth@@@code{\slurboth}
2946 @item @code{slurDash}
2947 @cindex slurDash@@@code{slurDash}
2949 Set to 0 for normal slurs, 1 for dotted slurs, and a
2950 larger value for dashed slurs. Identifiers
2952 @cindex slurnormal@@@code{\slurnormal}
2955 @cindex slurdotted@@@code{\slurdotted}
2956 are predefined to set the
2959 @item @code{stemLength}
2960 @cindex stemLength@@@code{stemLength}
2962 Set length of stems. Unit is `@code{interline}/2', so
2963 @code{stemLength} defaults to 7.
2965 @item @code{stemLeftBeamCount}
2966 @cindex stemLeftBeamCount@@@code{stemLeftBeamCount}
2968 Specify the number of beams to draw on the left side of the next
2969 note. Overrides automatic beaming. The value is only used once,
2970 and then it is erased.
2972 @item @code{stemRightBeamCount}
2973 @cindex stemRightBeamCount@@@code{stemRightBeamCount}
2975 Specify the number of beams to draw on the right side of the next
2976 note. Overrides automatic beaming. The value is only used once,
2977 and then it is erased.
2978 @item @code{tieVerticalDirection}
2979 @cindex tieVerticalDirection@@@code{tieVerticalDirection}
2981 Set to @code{\free} for free choice of tie direction, set to
2982 @code{\up} to force ties up, set to @code{\down} to force ties
2985 @item @code{transposing}
2986 @cindex transposing@@@code{transposing}
2988 Transpose the MIDI output. Set this property to the number of
2989 half-steps to transpose by.
2992 @item @code{textEmptyDimension}
2993 @cindex textEmptyDimension@@@code{textEmptyDimension}
2995 If set to 1 then text placed above or below the staff is
2996 assumed to have zero width.
2998 @item @code{textStyle}
2999 @cindex textStyle@@@code{textStyle}
3001 Set the text style for superscripts and subscripts. See above
3002 for list of text styles.
3004 @item @code{textScriptPadding}
3005 @cindex textScriptPadding@@@code{textScriptPadding}
3007 Determines the extra space added between superscripted resp.
3008 subscripted text and the closest staff line or note.
3010 @item @code{verticalDirection}
3011 @cindex verticalDirection@@@code{verticalDirection}
3013 Determines the direction of stems, subscripts, beams, slurs, and
3014 ties. Set to @code{\down} to force them down, @code{\up} to force
3015 them up, or @code{\free} to let LilyPond decide. This can be used
3016 to distinguish between voices on the same staff. The
3018 @cindex stemdown@@@code{\stemdown}
3020 @cindex stemup@@@code{\stemup}
3022 and @code{\stemboth}
3023 @cindex stemboth@@@code{\stemboth}
3024 identifiers set this
3028 @item @code{tupletDirection}
3029 @cindex tupletDirection@@@code{tupletDirection}
3031 Determines the direction of triplets and other tuplets. Set to
3032 @code{\down} to force them below the staff, @code{\up} to force
3033 them above, or @code{\free} to let LilyPond decide.
3035 @item @code{tupletVisibility}
3036 @cindex tupletVisibility@@@code{tupletVisibility}
3038 Determines whether tuplets of notes are labelled. Setting
3039 to 0 shows nothing; setting to 1 shows a number;
3040 setting to 2 shows a number and a bracket if there is no
3041 beam; setting to 3 shows a number, and if there is no beam
3042 it adds a bracket; setting to 4 shows both a number and a
3043 bracket unconditionally.
3047 @subsubheading Staff properties
3049 @cindex properties!Staff
3053 @item @code{barNonAuto}
3054 @cindex barNonAuto@@@code{barNonAuto}
3056 If set to 1 then bar lines will not be printed
3057 automatically; they must be explicitly created with @code{\bar}
3058 keywords. Unlike with the @code{\cadenza} keyword, measures are
3059 still counted. Bar generation will resume according to that
3060 count if this property is set to zero.
3062 @item @code{barNumberDirection}
3063 @cindex barNumberDirection@@@code{barNumberDirection}
3065 Set to @code{\up} or @code{\down} to put bar numbers above or below
3068 @item @code{barNumberHangOnClef}
3069 @cindex barNumberHangOnClef@@@code{barNumberHangOnClef}
3071 Set to 1 to cause bar numbers to appear above or below the
3072 clef instead of on the bar line. This property is deprecated.
3075 @item @code{barNumberScriptPadding}
3076 @cindex barNumberScriptPadding@@@code{barNumberScriptPadding}
3078 Sets extra space between the bar number and the bar it labels.
3080 @item @code{barSize}
3081 @cindex barSize@@@code{barSize}
3083 Specify the height of the bar lines if it should be different
3084 than the staff height.
3086 @item @code{barAtLineStart}
3087 @cindex barAtLineStart@@@code{barAtLineStart}
3089 Set to 1 to produce a bar line after the clef at the start
3090 of each line (but not at the beginning of the music).
3092 @item @code{clefStyle}
3093 @cindex clefStyle@@@code{clefStyle}
3095 Determines how clefs are typeset. If set to @code{transparent},
3096 the clefs are not printed at all, if set to
3097 @code{fullSizeChanges}, clef changes in the middle of a line are
3098 typeset with a full size clef. By default, clef changes are
3099 typeset in smaller size.
3101 @item @code{createKeyOnClefChange}
3102 @cindex createKeyOnClefChange@@@code{createKeyOnClefChange}
3104 Set to a nonempty string if you want key signatures to be printed
3105 when the clef changes. Set to the empty string if you do not
3106 want key signatures printed.
3108 @item @code{createInitdefaultClef}
3109 @cindex createInitdefaultClef@@@code{createInitdefaultClef}
3111 Specify whether clefs are created on default? (Doesn't seem to
3114 @item @code{defaultClef}
3115 @cindex defaultClef@@@code{defaultClef}
3117 Determines the default clef. See @code{\clef} keyword.
3119 @item @code{markHangOnClef}
3120 @cindex markHangOnClef@@@code{markHangOnClef}
3122 Set to 1 to cause marks to appear by clefs instead of by bar
3123 lines. Deprecated, use is not recommended.
3125 @item @code{marginDirection}
3126 @cindex marginDirection@@@code{marginDirection}
3128 Set to @code{\left} or @code{\right} to specify location of
3131 @item @code{marginScriptPadding}
3132 @cindex marginScriptPadding@@@code{marginScriptPadding}
3134 Specify extra space for marginal scripts.
3136 @item @code{forgetAccidentals}
3137 @cindex forgetAccidentals@@@code{forgetAccidentals}
3139 Causes accidentals to be printed at every note instead of
3140 remembered for the duration of a measure.
3142 @item @code{noResetKey}
3143 @cindex noResetKey@@@code{noResetKey}
3145 Do not reset the key at the start of a measure. Accidentals will
3146 be printed only once and are in effect until overridden, possibly
3147 many measures later.
3149 @item @code{staffLineLeading}
3150 @cindex staffLineLeading@@@code{staffLineLeading}
3152 Specifies the distance (in points) between lines of the staff.
3154 @item @code{numberOfStaffLines}
3155 @cindex numberOfStaffLines@@@code{numberOfStaffLines}
3157 Specifies the number of staff lines. The default is 5.
3159 @item @code{postBreakPadding}
3160 @cindex postBreakPadding@@@code{postBreakPadding}
3162 Extra space in points to be added after the clef, time signature
3163 and key signature on the staff. Deprecated, do not use.
3165 @item @code{noVoltaBraces}
3166 @cindex noVoltaBraces@@@code{noVoltaBraces}
3168 Set to true to suppress the printing of brackets over alternate
3169 endings specified by the command @code{\alternative}.
3171 @item @code{numberOfStaffLines}
3172 @cindex numberOfStaffLines@@@code{numberOfStaffLines}
3174 Sets the number of lines that the staff has.
3176 @item @code{barAlways}
3177 @cindex barAlways@@@code{barAlways}
3179 If set to 1 a bar line is drawn after each note.
3181 @item @code{defaultBarType}
3182 @cindex defaultBarType@@@code{defaultBarType}
3184 Sets the default type of bar line. See Section @xref{barlines}
3185 for a list of available bar types.
3187 @item @code{instrument}, @code{instr}
3189 @cindex instrument@@@code{instrument}
3191 @cindex instr@@@code{instr}
3193 If @code{Staff_margin_engraver}
3194 @cindex Staff_margin_engraver
3196 added to the Staff translator, then the @code{instrument} property
3197 is used to label the first line of the staff and the @code{instr}
3198 property is used to label subsequent lines. If the
3199 @code{midiInstrument} property is not set, then @code{instrument}
3200 is used to determine the instrument for MIDI output.
3202 @item @code{keyOctaviation}
3203 @cindex keyOctaviation@@@code{keyOctaviation}
3205 If set to 1, then keys are the same in all octaves. If set
3206 to 0 then the key signature for different octaves can be
3207 different and is specified independently:
3211 @code{\keysignature bes fis'}
3214 The default value is 1. Can be set to zero with
3215 @code{\specialkey} or reset to 1 with @code{\normalkey}.
3217 @item @code{timeSignatureStyle}
3218 @cindex timeSignatureStyle@@@code{timeSignatureStyle}
3220 Changes the default two-digit layout for time signatures. The
3221 following values are recognized:
3227 4/4 and 2/2 are typeset as C and struck C, respectively. All
3228 other time signatures are written with two digits.
3231 @cindex old@@@code{old}
3233 2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and 9/8 are
3234 typeset with old-style mensuration marks. All other time
3235 signatures are written with two digits.
3240 All time signatures are typeset with a single
3241 digit, e.g. 3/2 is written as 3.
3244 @cindex CM/N@@@code{CM/N}
3247 @cindex oldM/N@@@code{oldM/N}
3248 @code{old}@code{/} or
3250 @cindex old6/8alt@@@code{old6/8alt}
3252 Tells LilyPond to use a specific symbol as time signature.
3255 The different time signature characters are shown below with its
3261 \notes\relative c'' {
3262 \property Voice.textStyle = typewriter
3263 \property Staff.timeSignatureStyle = "C2/2"
3264 \time 2/2; a2^"C2/2" a2
3265 \property Staff.timeSignatureStyle = "C4/4"
3266 \time 2/2; a2^"C4/4" a2
3267 \property Staff.timeSignatureStyle = "old2/2"
3268 \time 2/2; a2^"old2/2" a2
3269 \property Staff.timeSignatureStyle = "old3/2"
3270 \time 2/2; a2^"old3/2" a2
3271 \property Staff.timeSignatureStyle = "old2/4"
3272 \time 2/2; a2^"old2/4" a2
3273 \property Staff.timeSignatureStyle = "old4/4"
3274 \time 2/2; a2^"old4/4" a2
3275 \property Staff.timeSignatureStyle = "old6/4"
3276 \time 2/2; a2^"old6/4" a2
3277 \property Staff.timeSignatureStyle = "old9/4"
3278 \time 2/2; a2^"old9/4" a2
3279 \property Staff.timeSignatureStyle = "old4/8"
3280 \time 2/2; a2^"old4/8" a2
3281 \property Staff.timeSignatureStyle = "old6/8"
3282 \time 2/2; a2^"old6/8" a2
3283 \property Staff.timeSignatureStyle = "old6/8alt"
3284 \time 2/2; a2^"old6/8alt" a2
3285 \property Staff.timeSignatureStyle = "old9/8"
3286 \time 2/2; a2^"old9/8" a2
3289 linewidth = 4.5 \in;
3295 @item @code{voltaSpannerDuration}
3296 @cindex voltaSpannerDuration@@@code{voltaSpannerDuration}
3298 Set to an integer to control the size of the brackets printed by
3299 @code{\alternative}. The integer specifies the number of whole
3300 notes duration to use for the brackets. It is rounded to the
3301 nearest measure. This can be used to shrink the length of
3302 brackets in the situation where one alternative is very large.
3303 It may have odd effects if the specified duration is longer than
3304 the music given in an @code{\alternative}.
3308 @cindex properties!GrandStaff
3311 @item @code{alignmentReference}
3312 @cindex alignmentReference@@@code{alignmentReference}
3314 Set to @code{\center} for vertical alignment reference point to be
3315 in the center of the vertical group. Set to @code{\up} to put the
3316 reference point at the top of the group.
3318 @item @code{maxVerticalAlign}
3319 @cindex maxVerticalAlign@@@code{maxVerticalAlign}
3321 Set the maximum vertical distance between staffs.
3323 @item @code{minVerticalAlign}
3324 @cindex minVerticalAlign@@@code{minVerticalAlign}
3326 Set the minimum vertical distance between staffs.
3330 @cindex properties!Score
3333 @item @code{skipBars}
3334 @cindex skipBars@@@code{skipBars}
3336 Set to 1 to skip the empty bars that are produced by
3337 multimeasure notes and rests. These bars will not appear on the
3338 printed output. Set to zero (the default) to expand multimeasure
3339 notes and rests into their full length, printing the appropriate
3340 number of empty bars so that synchronization with other voices is
3345 @mudela[fragment,verbatim,center]
3346 r1 r1*3 R1*3\property Score.skipBars=1 r1*3 R1*3
3354 @cindex properties!ChordNamesVoice
3357 @item @code{chordInversion}
3358 @cindex chordInversion@@@code{chordInversion}
3360 Determines whether LilyPond should look for chord inversions when
3361 translating from notes to chord names. Set to 1 to find
3362 inversions. The default is 0 which does not look for
3368 @node Notation output definitions, output, contextselection, LilyPond 1-2-0 Reference Manual
3369 @section Notation output definitions
3373 @cindex notation output
3375 @cindex output definition
3377 @node output, paper, Notation output definitions, LilyPond 1-2-0 Reference Manual
3379 @node paper, papervars, output, LilyPond 1-2-0 Reference Manual
3381 The most important output definition is the @code{\paper} block, for
3382 music notation. The syntax is
3386 @code{\paper @{} [] @code{@}}
3389 where each of the items is one of
3392 @item An assignment. The assignment must be terminated by a
3393 semicolon. See section @xref{papervars} for information on
3396 @item A context definition. See section @xref{contextdefs} for
3397 more information on context definitions.
3399 @item A margin shape declaration. The syntax is
3403 @code{\shape} @code{,} @code{,}
3404 @code{,} ... @code{;}
3408 @cindex shape@@@code{\shape}
3410 Each pair of and values is a dimension
3411 specifying how far to indent and how wide to make the line.
3412 The indentation and width of successive lines are specified by
3413 the successive pairs of dimensions. The last pair of
3414 dimensions will define the characeristics of all lines beyond
3415 those explicitly specified.
3417 @item A font declaration. Its syntax is
3421 @code{=} @code{\font}
3422 @cindex font@@@code{\font}
3426 is an integer describing the font to be used.
3427 0 is the default font. is the basename of
3428 a font (usually a member of the Feta family).
3433 @cindex changing font size and paper size
3435 The Feta font provides musical symbols at six different sizes. These
3436 fonts are 11 point, 13 point, 16 point, 20 point,
3437 23 point, and 26 point. The point size of a font is the
3438 height of the five lines in a staff when displayed in the font.
3440 Definitions for these sizes are the files @file{paperSZ.ly}, where
3441 @code{SZ} is one of 11, 13, 16, 20, 23 and 26. If you include
3442 any of these files, the identifiers @code{paper_eleven},
3443 @code{paper_thirteen}, @code{paper_sixteen}, @code{paper_twenty},
3444 @code{paper_twentythree}, and @code{paper_twentysix} are defined
3445 respectively. The default @code{\paper} block is also set.
3447 To change the paper size, you must first set the
3449 @cindex papersize@@@code{papersize}
3450 variable at top level. Set it to the strings
3451 @code{a4}, @code{letter}, or @code{legal}. After this specification,
3452 you must set the font as described above. If you want the default
3453 font, then use the 20 point font. The new paper size will not
3454 take effect if the font is not loaded and selected afterwards. Paper
3455 size selection works by loading a file named after the paper size you
3460 @cindex paper variables
3462 @node papervars, contextdefs, paper, LilyPond 1-2-0 Reference Manual
3464 There is a large number of paper variables that are used to control
3465 details of the layout. These variables control the defaults for the
3466 entire score. Usually, they do not have to be changed; they are by
3467 default set to values that depend on the font size in use. The
3468 values are used by the graphic objects while formatting the score;
3469 they are therefore implementation dependent. Most variables are
3470 accompanied by documentation in the initalization file
3471 @file{params.ly} or @file{paperSZ.ly}, where @code{SZ} is the staff
3474 Nevertheless, here are some variables you may want to use or change:
3478 @cindex indent@@@code{indent}
3480 The indentation of the first line of music.
3482 @item @code{interline}
3483 @cindex interline@@@code{interline}
3485 The distance between two staff lines, calculated from the center
3486 of the lines. You should use either this or @code{rulethickness}
3487 as a unit for distances you modify.
3489 @item @code{linewidth}
3490 @cindex linewidth@@@code{linewidth}
3492 Sets the width of the lines. If set to -1.0, a single
3493 unjustified line is produced.
3496 @cindex output@@@code{output}
3498 Specifies an alternate name for the the output @file{s}.
3499 A @file{.tex}, @file{.midi} or @file{.ps} extension will be
3500 added to the string you specify.
3502 @item @code{rulethickness}
3503 @cindex rulethickness@@@code{rulethickness}
3505 Determines the thickness of staff and bar lines.
3507 @item @code{castingalgorithm}
3508 @cindex castingalgorithm@@@code{castingalgorithm}
3510 The algorithm to use for breaking lines. Choices are
3512 @cindex Gourlay@@@code{\Gourlay}
3513 for a TeX-like dynamic
3514 programming algorithm, and @code{\Wordwrap}
3515 @cindex Wordwrap@@@code{\Wordwrap}
3517 a simple algorithm. Gourlay breaking looks much better, but
3518 takes a lot more resources. Wordwrap leaves loosely spaced lines
3523 @node contextdefs, engravers, papervars, LilyPond 1-2-0 Reference Manual
3525 @cindex context definition
3527 A notation contexts is defined by the following information
3532 @item The LilyPond modules that do the actual conversion of music to
3533 notation. Each module is a so-called
3538 @item How these modules should cooperate, i.e. which ``cooperation
3539 module'' should be used. This cooperation module is a special
3542 @item What other contexts the context can contain,
3544 @item What properties are defined.
3547 A context definition has this syntax:
3551 @code{\translator} @code{@{}
3556 can be an identifier or of the form
3560 @code{\type} @code{;}
3566 @item @code{Engraver_group_engraver}
3567 @cindex Engraver_group_engraver@@@code{Engraver_group_engraver}
3569 The standard cooperation engraver.
3571 @item @code{Score_engraver}
3572 @cindex Score_engraver@@@code{Score_engraver}
3574 This is cooperation module that should be in the top level context.
3576 @item @code{Grace_engraver_group}
3577 @cindex Grace_engraver_group@@@code{Grace_engraver_group}
3579 This is a special cooperation module (resembling
3580 @code{Score_engraver}) that is used to created an embedded
3584 is a list of items where each item is
3588 @item @code{\consists} @code{;} @*
3589 Add to the list of modules in this context.
3590 Section @xref{engravers} contains an overview of the engravers
3591 available. The order of engravers added with @code{\consists} is
3594 @item @code{\consistsend} @code{;} @*
3595 Analogous to @code{\consists}, but makes sure that
3596 is always added to the end of the list of
3599 Some engraver types need to be at the end of the list; this
3600 insures they are put there, and stay there, if a user adds or
3601 removes engravers. This command is usually not needed for
3604 @item @code{\accepts} @code{;} @*
3605 Add to the list of context this context can
3606 contain. The first listed context the context to create by
3609 @item @code{\remove} @code{;} @*
3610 Remove a previously added (with @code{\consists}) engraver.
3612 @item @code{\name} @code{;} @*
3613 This sets name of the context, e.g. @code{Staff}, @code{Voice}. If
3614 the name is not specified, the translator won't do anything.
3616 @item @code{=} @code{;} @*
3617 A property assignment. It is allowed to use reals for
3621 In the @code{\paper} block, it is also possible to define translator
3622 identifiers. Like other block identifiers, the identifier can only
3623 be used as the very first item of a translator. In order to define
3624 such an identifier outside of @code{\score}, you must do
3630 foo = \translator @{ ... @}
3637 \translator @{ \foo ... @}
3645 @cindex paper types, engravers, and pre-defined translators
3647 Some pre-defined identifiers can simplify modification of
3648 translators. The pre-defined identifiers are:
3651 @item @code{StaffContext}
3652 @cindex StaffContext@@@code{StaffContext}
3654 Default Staff context.
3656 @item @code{RhythmicStaffContext}
3657 @cindex RhythmicStaffContext@@@code{RhythmicStaffContext}
3659 Default RhythmicStaff context.
3661 @item @code{VoiceContext}
3662 @cindex VoiceContext@@@code{VoiceContext}
3664 Default Voice context.
3666 @item @code{ScoreContext}
3667 @cindex ScoreContext@@@code{ScoreContext}
3669 Default Score context.
3671 @item @code{ScoreWithNumbers}
3672 @cindex ScoreWithNumbers@@@code{ScoreWithNumbers}
3674 Score context with numbering at the Score level.
3676 @item @code{BarNumberingStaffContext}
3677 @cindex BarNumberingStaffContext@@@code{BarNumberingStaffContext}
3679 Staff context with numbering at the Staff level.
3681 @item @code{HaraKiriStaffContext}
3682 @cindex HaraKiriStaffContext@@@code{HaraKiriStaffContext}
3684 Staff context that does not print if it only contains rests.
3685 Useful for orchestral scores.@footnote{Harakiri, also called
3686 Seppuku, is the ritual suicide of the Samourai.}
3688 @item @code{OrchestralPartStaffContext}
3689 @cindex OrchestralPartStaffContext@@@code{OrchestralPartStaffContext}
3691 @item @code{OrchestralScoreContext}
3692 @cindex OrchestralScoreContext@@@code{OrchestralScoreContext}
3696 Using these pre-defined values, you can remove or add items to the
3705 \remove Some_engraver;
3706 \consists Different_engraver;
3715 @node engravers, Sound output, contextdefs, LilyPond 1-2-0 Reference Manual
3717 The engravers for paper output are:
3722 @item @code{Bar_engraver}
3723 @cindex Bar_engraver@@@code{Bar_engraver}
3725 Engraves bar lines. Normally in @code{Staff} and
3726 @code{RhythmicStaff}.
3728 @item @code{Bar_number_engraver}
3729 @cindex Bar_number_engraver@@@code{Bar_number_engraver}
3731 Engrave bar numbers. These numbers appear at the start of each
3732 line. Not normally in any translator. Can be added to
3733 @code{Score} for score-wide numbering or to @code{Staff} for
3734 numbering on each staff.
3736 @item @code{Beam_engraver}
3737 @cindex Beam_engraver@@@code{Beam_engraver}
3739 Handles beam requests by engraving beams. Normally appears in
3740 the @code{Voice} translator. If omitted, then notes will be
3741 printed with flags instead of beams.
3743 @item @code{Beam_req_swallow_translator}
3745 @cindex Beam_req_swallow_translator@@@code{Beam_req_swallow_translator}
3747 Swallows beam requests. In @code{LyricVoice}.
3749 @item @code{Chord_name_engraver}
3750 @cindex Chord_name_engraver@@@code{Chord_name_engraver}
3752 Engraves chord names. Normally in @code{ChordNameVoice} .
3754 @item @code{Chord_tremolo_engraver}
3755 @cindex Chord_tremolo_engraver@@@code{Chord_tremolo_engraver}
3757 @item @code{Clef_engraver}
3758 @cindex Clef_engraver@@@code{Clef_engraver}
3760 Engraves the clef symbol. Normally in @code{Staff}.
3762 @item @code{Collision_engraver}
3763 @cindex Collision_engraver@@@code{Collision_engraver}
3765 @item @code{Dot_column_engraver}
3766 @cindex Dot_column_engraver@@@code{Dot_column_engraver}
3768 Engraves dots on dotted notes shifted to the right of the note.
3769 Normally in @code{Voice}. If omitted, then dots appear on top of
3772 @item @code{Dynamic_engraver}
3773 @cindex Dynamic_engraver@@@code{Dynamic_engraver}
3775 Engraves dynamics symbols. Normally in @code{Voice}.
3777 @item @code{Font_size_engraver}
3778 @cindex Font_size_engraver@@@code{Font_size_engraver}
3780 @item @code{Key_engraver}
3781 @cindex Key_engraver@@@code{Key_engraver}
3783 Engraves the key signature. Normally in @code{Staff}.
3785 @item @code{Local_key_engraver}
3786 @cindex Local_key_engraver@@@code{Local_key_engraver}
3788 @item @code{Lyric_engraver}
3789 @cindex Lyric_engraver@@@code{Lyric_engraver}
3791 Engraves lyrics. Normally in @code{LyricVoice}.
3793 @item @code{Multi_measure_rest_engraver}
3795 @cindex Multi_measure_rest_engraver@@@code{Multi_measure_rest_engraver}
3797 Engraves multi-measure rests that are produced with @code{R}.
3798 Normally in @code{Voice}.
3800 @item @code{Piano_bar_engraver}
3801 @cindex Piano_bar_engraver@@@code{Piano_bar_engraver}
3803 @item @code{Pitch_squash_engraver}
3804 @cindex Pitch_squash_engraver@@@code{Pitch_squash_engraver}
3806 Treat all pitches as middle C. Used in @code{RhythmicStaff}.
3807 Note that the notes move, but the locations of accidentals stay
3810 @item @code{Priority_horizontal_align_engraver}
3812 @cindex Priority_horizontal_align_engraver@@@code{Priority_horizontal_align_engraver}
3814 @item @code{Repeat_engraver}
3815 @cindex Repeat_engraver@@@code{Repeat_engraver}
3817 Handles repeats? In @code{Staff} and @code{RhythmicStaff}.
3819 @item @code{Rest_collision_engraver}
3820 @cindex Rest_collision_engraver@@@code{Rest_collision_engraver}
3822 Handles collisions of rests. In @code{Staff}.
3824 @item @code{Rest_engraver}
3825 @cindex Rest_engraver@@@code{Rest_engraver}
3827 Engraves rests. Normally in @code{Voice}.
3829 @item @code{Rhythmic_column_engraver}
3830 @cindex Rhythmic_column_engraver@@@code{Rhythmic_column_engraver}
3832 @item @code{Score_priority_engraver}
3833 @cindex Score_priority_engraver@@@code{Score_priority_engraver}
3835 @item @code{Script_engraver}
3836 @cindex Script_engraver@@@code{Script_engraver}
3838 Handles note ornaments generated by @code{\script}. Normally in
3841 @item @code{Separating_line_group_engraver}
3843 @cindex Separating_line_group_engraver@@@code{Separating_line_group_engraver}
3845 @item @code{Skip_req_swallow_translator}
3847 @cindex Skip_req_swallow_translator@@@code{Skip_req_swallow_translator}
3849 @item @code{Slur_engraver}
3850 @cindex Slur_engraver@@@code{Slur_engraver}
3852 Engraves slurs. Normally in @code{Voice}.
3854 @item @code{Span_bar_engraver}
3855 @cindex Span_bar_engraver@@@code{Span_bar_engraver}
3857 Engraves lines across multiple staffs. Normally in
3858 @code{Staffgroup} and @code{GrandStaff}. Removing this from
3859 @code{StaffGroup} gives the definition of @code{ChoirStaff}.
3861 @item @code{Span_score_bar_engraver}
3862 @cindex Span_score_bar_engraver@@@code{Span_score_bar_engraver}
3864 @item @code{Staff_group_bar_engraver}
3865 @cindex Staff_group_bar_engraver@@@code{Staff_group_bar_engraver}
3867 @item @code{Staff_margin_engraver}
3868 @cindex Staff_margin_engraver@@@code{Staff_margin_engraver}
3870 Prints the name of the instrument (specified by
3871 @code{Staff.instrument} and @code{Staff.instr}) at the left of the
3874 @item @code{Staff_sym_engraver}
3875 @cindex Staff_sym_engraver@@@code{Staff_sym_engraver}
3877 @item @code{Stem_engraver}
3878 @cindex Stem_engraver@@@code{Stem_engraver}
3880 Engraves stems. Normally in @code{Voice}.
3882 @item @code{Ties_engraver}
3883 @cindex Ties_engraver@@@code{Ties_engraver}
3885 Engraves ties. Normally in @code{Voice}.
3887 @item @code{Time_signature_engraver}
3888 @cindex Time_signature_engraver@@@code{Time_signature_engraver}
3890 Engraves the time signature. Normally in @code{Staff} and
3891 @code{RhythmicStaff}.
3893 @item @code{Timing_engraver}
3894 @cindex Timing_engraver@@@code{Timing_engraver}
3896 Responsible for synchronizing timing information from staffs.
3897 Normally in @code{Score}. In order to create polyrhythmic music,
3898 this engraver should be removed from @code{Score} and placed in
3901 @item @code{Tuplet_engraver}
3902 @cindex Tuplet_engraver@@@code{Tuplet_engraver}
3904 Engraves tuplet brackets? In @code{Staff}.
3906 @item @code{Vertical_align_engraver}
3907 @cindex Vertical_align_engraver@@@code{Vertical_align_engraver}
3913 @node Sound output, midilist, engravers, LilyPond 1-2-0 Reference Manual
3914 @section Sound output
3918 The MIDI block is analogous to the paper block, but it is simpler.
3919 The @code{\midi} block can contain:
3923 @item a @code{\tempo} definition
3924 @item context definitions
3927 Assignments in the @code{\midi} block are not allowed.
3931 @cindex context definition
3933 Context definitions follow precisely the same syntax as within the
3934 \paper block. Translation modules for sound are called performers.
3935 The contexts for MIDI output are defined in @file{ly/performer.ly}.
3939 @cindex MIDI instrument names
3941 @node midilist, Pre-defined Identifiers, Sound output, LilyPond 1-2-0 Reference Manual
3943 The MIDI instrument name is set by the
3944 @code{Staff.midiInstrument}
3945 @cindex Staff.midiInstrument@@@code{Staff.midiInstrument}
3946 property or, if that property is
3947 not set, the @code{Staff.instrument}
3948 @cindex Staff.instrument@@@code{Staff.instrument}
3949 property. The instrument
3950 name should be chosen from the following list. If the selected
3951 string does not exactly match, then LilyPond uses the default piano.
3957 "acoustic grand" "contrabass" "lead 7 (fifths)"
3958 "bright acoustic" "tremolo strings" "lead 8 (bass+lead)"
3959 "electric grand" "pizzicato strings" "pad 1 (new age)"
3960 "honky-tonk" "orchestral strings" "pad 2 (warm)"
3961 "electric piano 1" "timpani" "pad 3 (polysynth)"
3962 "electric piano 2" "string ensemble 1" "pad 4 (choir)"
3963 "harpsichord" "string ensemble 2" "pad 5 (bowed)"
3964 "clav" "synthstrings 1" "pad 6 (metallic)"
3965 "celesta" "synthstrings 2" "pad 7 (halo)"
3966 "glockenspiel" "choir aahs" "pad 8 (sweep)"
3967 "music box" "voice oohs" "fx 1 (rain)"
3968 "vibraphone" "synth voice" "fx 2 (soundtrack)"
3969 "marimba" "orchestra hit" "fx 3 (crystal)"
3970 "xylophone" "trumpet" "fx 4 (atmosphere)"
3971 "tubular bells" "trombone" "fx 5 (brightness)"
3972 "dulcimer" "tuba" "fx 6 (goblins)"
3973 "drawbar organ" "muted trumpet" "fx 7 (echoes)"
3974 "percussive organ" "french horn" "fx 8 (sci-fi)"
3975 "rock organ" "brass section" "sitar"
3976 "church organ" "synthbrass 1" "banjo"
3977 "reed organ" "synthbrass 2" "shamisen"
3978 "accordion" "soprano sax" "koto"
3979 "harmonica" "alto sax" "kalimba"
3980 "concertina" "tenor sax" "bagpipe"
3981 "acoustic guitar (nylon)" "baritone sax" "fiddle"
3982 "acoustic guitar (steel)" "oboe" "shanai"
3983 "electric guitar (jazz)" "english horn" "tinkle bell"
3984 "electric guitar (clean)" "bassoon" "agogo"
3985 "electric guitar (muted)" "clarinet" "steel drums"
3986 "overdriven guitar" "piccolo" "woodblock"
3987 "distorted guitar" "flute" "taiko drum"
3988 "guitar harmonics" "recorder" "melodic tom"
3989 "acoustic bass" "pan flute" "synth drum"
3990 "electric bass (finger)" "blown bottle" "reverse cymbal"
3991 "electric bass (pick)" "skakuhachi" "guitar fret noise"
3992 "fretless bass" "whistle" "breath noise"
3993 "slap bass 1" "ocarina" "seashore"
3994 "slap bass 2" "lead 1 (square)" "bird tweet"
3995 "synth bass 1" "lead 2 (sawtooth)" "telephone ring"
3996 "synth bass 2" "lead 3 (calliope)" "helicopter"
3997 "violin" "lead 4 (chiff)" "applause"
3998 "viola" "lead 5 (charang)" "gunshot"
3999 "cello" "lead 6 (voice)"
4005 @cindex MIDI types and performers
4007 The types available for MIDI translators are:
4010 @item @code{Performer_group_performer}
4011 @cindex Performer_group_performer@@@code{Performer_group_performer}
4013 @item @code{Score_performer}
4014 @cindex Score_performer@@@code{Score_performer}
4016 @item @code{Staff_performer}
4017 @cindex Staff_performer@@@code{Staff_performer}
4021 The performers for MIDI translators are:
4024 @item @code{Key_performer}
4025 @cindex Key_performer@@@code{Key_performer}
4027 @item @code{Time_signature_performer}
4028 @cindex Time_signature_performer@@@code{Time_signature_performer}
4030 @item @code{Note_performer}
4031 @cindex Note_performer@@@code{Note_performer}
4033 @item @code{Lyric_performer}
4034 @cindex Lyric_performer@@@code{Lyric_performer}
4036 @item @code{Swallow_performer}
4037 @cindex Swallow_performer@@@code{Swallow_performer}
4043 @node Pre-defined Identifiers, ident, midilist, LilyPond 1-2-0 Reference Manual
4044 @section Pre-defined Identifiers
4046 @cindex pre-defined identifiers
4048 @node ident, Running LilyPond, Pre-defined Identifiers, LilyPond 1-2-0 Reference Manual
4050 Various identifiers are defined in the initialization files to
4051 provide shorthands for some settings. Most of them are in
4052 @file{ly/declarations.ly}.
4056 @cindex break@@@code{\break}
4058 Force a line break in music by using a large argument for the
4059 keyword @code{\penalty}.
4061 @item @code{\center}
4062 @cindex center@@@code{\center}
4064 Used for setting direction properties. Equals 0.
4067 @cindex down@@@code{\down}
4069 Used for setting direction setting properties. Is equal
4073 @cindex free@@@code{\free}
4075 Used for setting direction setting properties. Is equal
4079 @cindex left@@@code{\left}
4081 Used for setting text alignment property. Is equal to -1.
4083 @item @code{\nobreak}
4084 @cindex nobreak@@@code{\nobreak}
4086 Prevent a line break in music by using a large negative argument
4087 for the keyword @code{\penalty}.
4090 @cindex none@@@code{\none}
4092 Used for setting @code{Score.beamslopedamping} and
4093 @code{Score.beamquantisation} properties. Is equal to 0.
4095 @item @code{\normal}
4096 @cindex normal@@@code{\normal}
4098 Used for setting @code{Score.beamslopedamping} and
4099 @code{Score.beamquantisation} properties. Is equal to 1.
4101 @item @code{\normalkey}
4102 @cindex normalkey@@@code{\normalkey}
4104 Select normal key signatures where each octave has the same key
4105 signature. This sets the @code{Staff.keyoctaviation} property.
4108 @cindex right@@@code{\right}
4110 Used for setting text alignment property. Is set to 1.
4112 @item @code{\shiftoff}
4113 @cindex shiftoff@@@code{\shiftoff}
4115 Disable horizontal shifting of note heads that collide. Sets the
4116 @code{Voice.horizontalNoteShift} property.
4118 @item @code{\shifton}
4119 @cindex shifton@@@code{\shifton}
4121 Enable note heads that collide with other note heads to be
4122 shifted horiztonally. Sets the @code{Voice.horizontalNoteShift}
4125 @item @code{\slurboth}
4126 @cindex slurboth@@@code{\slurboth}
4128 Allow slurs to be above or below notes. This sets the
4129 @code{Voice.slurVerticalDirection} property.
4131 @item @code{\slurdown}
4132 @cindex slurdown@@@code{\slurdown}
4134 Force slurs to be below notes. This sets the
4135 @code{Voice.slurVerticalDirection} property.
4137 @item @code{\slurup}
4138 @cindex slurup@@@code{\slurup}
4140 Force slurs to be above notes. This sets the
4141 @code{Voice.slurVerticalDirection} property.
4143 @item @code{\specialkey}
4144 @cindex specialkey@@@code{\specialkey}
4146 Allow key signatures do differ in different octaves. This sets
4147 the @code{Staff.keyoctaviation} property.
4149 @item @code{\stemboth}
4150 @cindex stemboth@@@code{\stemboth}
4152 Allow stems, beams, and slurs to point either upwards or
4153 downwards, decided automatically by LilyPond. This sets the
4154 @code{Voice.verticalDirection} property.
4156 @item @code{\stemdown}
4157 @cindex stemdown@@@code{\stemdown}
4159 Force stems, beams, and slurs to point down. This sets the
4160 @code{Voice.verticalDirection} property.
4162 @item @code{\stemup}
4163 @cindex stemup@@@code{\stemup}
4165 Force stems, beams and slurs to point up. This sets the
4166 @code{Voice.verticalDirection} property.
4168 @item @code{\traditional}
4169 @cindex traditional@@@code{\traditional}
4171 Used for setting the @code{Score.beamquantisation} property. Is
4175 @cindex up@@@code{\up}
4177 Used for setting various direction properties. Is equal
4183 @node Running LilyPond, Top, ident, LilyPond 1-2-0 Reference Manual
4184 @section Running LilyPond
4186 @cindex running LilyPond
4189 When invoked with a filename that has no extension, LilyPond will try
4190 adding `@file{.ly}' as an extension first, then `@file{.fly}' and
4191 finally `@file{.sly}' extension. If the filename ends with
4192 `@file{.fly}', LilyPond processes the file as music using
4193 `@file{init.fly}'. In this case, LilyPond does something like:
4199 \notes\relative c @{
4200 \input "yourfile.fly"
4209 The result of `@file{.sly}' is similar except that a single unjustified
4212 If you invoke LilyPond with a file `@file{foo.}' that doesn't
4213 have the `@file{.ly}' extension, then LilyPond will look for a file
4214 called `@file{init.}' and process this file. The file
4215 `@file{init.}' must contain the @code{\maininput} keyword or
4216 LilyPond will not read the user specified file.
4218 When LilyPond processes @file{filename.ly} it will produce
4219 @file{filename.tex} as output. If @file{filename.ly} contains a second
4220 @code{\paper} keyword, then LilyPond will produce @file{filename-1.tex}
4221 as well. Subsequent @code{\paper} keywords will produce sequentially
4222 numbered file names. Several files can be specified; they will each
4223 be processed independently.@footnote{Not entirely true: The status of