3 @chapter Reference Manual
8 * Top level:: Top level
10 * Lexical conventions:: Lexical conventions
14 * Music expressions:: Music expressions
15 * Atomic music expressions:: Atomic music expressions
16 * Note specification::
20 * Compound music expressions:: Compound music expressions
24 * Ambiguities:: Ambiguities
25 * Notation conversion specifics::
28 * Notation Contexts:: Notation Contexts
30 * Notation output definitions:: Notation output definitions
35 * Sound output:: Sound output
44 This document@footnote{This document has been revised for
45 LilyPond 1.2.} describes the the GNU LilyPond input format, which is
46 a language for defining music. We call this language @emph{Music
47 Definition Language} or @emph{Mudela}, for short.@footnote{If anybody
48 comes up with a better name, we'd gladly take this. Gourlay already
49 uses a ``Musical Description Language,'' ISO standard 10743 defines a
50 ``Standard Music Description Language.'' We're not being original
53 @emph{Mudela} is a language that allows you to
56 @item create musical expressions by combining pitches, durations
57 @item output those musical expressions to various formats
58 @item give those musical expressions and output definitions names, so
59 you can enter them in manageable chunks.
62 @emph{Mudela} aims to define a piece of music completely, both from
63 typesetting and from a performance point of view.
72 This section describes what you may enter at top level.
76 @cindex score definition
78 The output is generated combining a music expression with an output
79 definition. A score block has the following syntax:
82 \score @{ @var{musicexpr} @var{outputdefs} @}
85 @var{outputdefs} are zero or more output definitions. If no output
86 definition is supplied, the default @code{\paper} block will be added.
97 \header @{ @var{key1} = @var{val1};
98 @var{key2} = @var{val2}; @dots{} @}
101 A header describes the file's contents. It can also appear in a
102 @code{\score} block. Tools like @code{ly2dvi}@indexcode{ly2dvi} can use this
103 information for generating titles. Key values that are used by
104 @code{ly2dvi} are: title, subtitle, composer, opus, poet, instrument,
105 metre, arranger, piece and tagline.
107 It is customary to put the @code{\header} at the top of the file.
113 Note name tables can be specified using
116 \notenames@keyindex{notenames}
117 @{ @var{assignmentlist} @}
120 @var{assignmentlist} is a list of definitions of the form
123 @var{name} = @var{pitch}
126 Chord modifiers can be set analogously, with
127 @code{\chordmodifiers}@keyindex{chordmodifiers}.
129 A @code{\paper} block at top level sets the default paper block. A
130 @code{\midi} block at top level works similarly.
134 LilyPond contains a Scheme interpreter (the GUILE library) for
135 internal use. The following commands access the interpreter
139 \scm @keyindex{scm} @var{scheme} ;
142 Evaluates the specified Scheme code. The result is discarded.
145 \scmfile@keyindex{scmfile} @var{filename};
148 Reads Scheme code from the specified file. The result is discarded.
152 Identifier assignments may appear at top level. Semicolons are
153 forbidden after top level assignments.
157 @node Lexical conventions
158 @section Lexical conventions
160 @cindex lexical conventions
169 A one line comment is introduced by a `@code{%}' character.
170 Block comments are started by `@code{%@{}' and ended by `@code{%@}}'.
171 They cannot be nested.
177 Keywords start with a backslash, followed by a number of lower case
178 alphabetic characters. These are all the keywords.
239 Formed from an optional minus sign followed by digits. Arithmetic
240 operations cannot be done with integers, and integers cannot be mixed
248 Formed from an optional minus sign and a sequence of digits followed
249 by a @emph{required} decimal point and an optional exponent such as
250 @code{-1.2e3}. Reals can be built up using the usual operations:
251 `@code{+}@indexcode{+}', `@code{-}@indexcode{-}', `@code{*}@indexcode{*}', and
252 `@code{/}@indexcode{/}', with parentheses for grouping.
254 A real constant can be followed by one of the dimension
257 @code{\mm}@keyindex{mm},
258 @code{\pt}@keyindex{pt}, @code{\in}@keyindex{in}, or
259 @code{\cm}@keyindex{cm}, for millimeters, points, inches and
260 centimeters, respectively. This converts the number to a real that
261 is the internal representation of dimensions.
268 Begins and ends with the `@code{"}' character. To include a `@code{"}'
269 character in a string write `@code{\"}'. Various other backslash
270 sequences have special interpretations as in the C language. A
271 string that contains no spaces can be written without the quotes.
272 See section XREF-modes [FIXME] for details on unquoted strings; their
273 interpretation varies depending on the situation. Strings can be
274 concatenated with the `@code{+}' operator.
277 The tokenizer accepts the following commands. They can appear
281 \maininput@keyindex{maininput}
284 This command is used in init files to signal that the user file must
285 be read. This command cannot be used in a user file.
288 \include@keyindex{include} @var{file}
291 Include @var{file}. The argument @var{file} may be a quoted string (an
292 unquoted string will not work here!) or a string identifier. The full
293 filename including the @file{.ly} extension must be given,
296 \version@keyindex{version} @var{string} ;
299 Specify the version of LilyPond that a file was written for. The
300 argument is a version string in quotes, for example @code{"1.2.0"}.
301 This is used to detect invalid input, and to aid
302 @code{convert-mudela}, a tool that automatically upgrades input files.
306 @cindex other languages
308 @node Other languages
309 @section Other languages
311 Note name definitions have been provided in various languages.
312 Simply include the language specific init file. For example:
313 `@code{\include "english.ly"}'. The available language files and the
314 names they define are:
317 Note Names sharp flat
318 nederlands.ly c d e f g a bes b -is -es
319 english.ly c d e f g a bf b -s/-sharp -f/-flat
320 deutsch.ly c d e f g a b h -is -es
321 norsk.ly c d e f g a b h -iss/-is -ess/-es
322 svenska.ly c d e f g a b h -iss -ess
323 italiano.ly do re mi fa sol la sid si -d -b
324 catalan.ly do re mi fa sol la sid si -d/-s -b
327 Pitch names can be redefined using the
328 @code{\notenames}@keyindex{notenames} command, see
329 subsection XREF-notenames [FIXME].
333 @cindex lexical modes
340 To simplify entering notes, lyrics, and chords, @emph{Mudela} has three
341 special input modes on top of the default mode. In each mode, words
342 are identified on the input. If @code{"word"} is encountered, it is
343 treated as a string. If @code{\word} is encountered, it is treated as
344 a keyword or as an identifier. The behavior of the modes differs in
345 two ways: Different modes treat unquoted words differently, and
346 different modes have different rules for deciding what is a word.
352 At the start of parsing, @emph{Mudela} is in Normal mode. In Normal
353 mode, a word is an alphabetic character followed by alphanumeric
354 characters. If @code{word} is encountered on the input it is
360 Note mode is introduced by the keyword
361 @code{\notes}@keyindex{notes}. In Note mode, words can only
362 contain alphabetic characters. If @code{word} is encountered,
363 LilyPond first checks for a notename of @code{word}. If no
364 notename is found, then @code{word} is treated as a string.
366 Since combinations of numbers and dots are used for indicating
367 durations, it is not possible to enter real numbers in this mode.
372 Chord mode is introduced by the keyword
373 @code{\chords}@keyindex{chords}. It is similar to Note mode, but
374 words are also looked up in a chord modifier table (containing
375 @code{maj}, @code{dim}, etc).
377 Since combinations of numbers and dots are used for indicating
378 durations, you can not enter real numbers in this mode. Dashes
379 and carets are used to indicate chord additions and subtractions,
380 so scripts can not be entered in Chord mode.
385 Lyrics mode is introduced by the keyword
386 @code{\lyrics}@keyindex{lyrics}. This mode has rules that make it
387 easy to include punctuation and diacritical marks in words. A
388 word in Lyrics mode begins with: an alphabetic character,
389 `@code{_}', `@code{?}', `@code{!}', `@code{:}', `@code{'}', the
390 control characters @code{^A} through @code{^F}, @code{^Q} through
391 @code{^W}, @code{^Y}, @code{^^}, any 8-bit character with ASCII code
392 over 127, or a two-character combination of a backslash followed
393 by one of `@code{`}', `@code{'}', `@code{"}', or
394 `@code{^}'.@footnote{The purpose of Lyrics mode is that you can
395 enter lyrics in @TeX{} format or a standard encoding without
396 needing quotes. The precise definition of this mode indeed is
397 ludicrous. This will remain so until the authors of LilyPond
398 acquire a deeper understanding of character encoding, or someone
399 else steps up to fix this.}
401 Subsequent characters of a word can be any character that is not
402 a digit and not white space. One important consequence of this
403 is that a word can end with `@code{@}}', which may be confusing if
404 you thought the closing brace was going to terminate Lyrics
405 mode.@footnote{LilyPond will issue a warning, though.} Any
406 `@code{_}' characters which appear in an unquoted word are
407 converted to spaces. This provides a mechanism for introducing
408 spaces into words without using quotes. Quoted words can also be
409 used in Lyrics mode to specify words that cannot be written with
410 the above rules. Here are some examples. Not all of these words
411 are printable by @TeX{}.
415 2B_||_!2B % not a word because it starts with a digit
416 ``Hello'' % not a word because it starts with `
417 _ _ _ _ % 4 words, each one a space
420 Since combinations of numbers and dots are used for indicating
421 durations, you can not enter real numbers in this mode.
424 It is possible to create words that break the rules by prefixing them
425 with the dollar sign `@code{$}@indexcode{$}'. Regardless of the context, a
426 word beginning with `@code{$}' extends until the next white space
427 character. Such words can contain numbers (even in Note mode), or
428 other forbidden characters. The dollar sign can be used to create
429 and access identifiers that could not otherwise be used.@footnote{Use
430 of `@code{$}' hampers readability and portability to future LilyPond
431 versions, thus the use of the dollar sign is discouraged.}
438 @cindex types and identifiers
440 @emph{Mudela} has a limited set of types:
446 @item music expressions
447 @item durations of notes and rests (specified with
448 @code{\notenames}@keyindex{notenames})
449 @item note name tables
450 @item context definitions, part of output definitions. See
451 section XREF-contextdefs [FIXME] for more information
452 @item output definitions (like @code{\paper}@keyindex{paper} blocks
453 and @code{\midi}@keyindex{midi} blocks)
454 @item score definitions (@code{\score}@keyindex{score} blocks)
457 Type is a syntactical property: @emph{Mudela} has no real type system,
458 so there is no support for generic expressions, functions, or user
459 defined types. For the same reason, it is not possible to mix reals
460 and integers in arithmetic expressions, and ``type
463 (e.g., using a string identifier to
464 initialize a @code{\paper}@keyindex{paper} block) will yield a ``parse
467 Identifiers allow objects to be assigned to names. To assign an
468 identifier, you use `@var{name}=@var{value}' and to refer to an
469 identifier, you preceed its name with a backslash:
470 `@code{\}@var{name}'. Identifier assignments must appear at top level
471 in the @emph{Mudela} file. Semicolons are forbidden after assignments
472 appearing at top level but they are obligatory after assignments
473 appearing in the @code{\paper} block, see Section XREF-paper [FIXME].
475 @var{value} is any of the types listed above.
477 An identifier can be created with any string for its name, but you
478 will only be able to refer to identifiers whose names begin with a
479 letter, being entirely alphanumeric. It is impossible to refer to an
480 identifier whose name is the same as the name of a keyword.
482 The right hand side of an identifier assignment is parsed completely
483 before the assignment is done, so it is allowed to redefine an
484 identifier in terms of its old value, e.g.
490 When an identifier is referenced, the information it points to is
491 copied. Therefore it only makes sense to put identifiers for
492 translators, output definitions, and @code{\score}@keyindex{score}
493 blocks as the first item in a block. For this reason, if you
494 reference a @code{\foo} variable in a @code{\foo} block, it must be the
495 first item in the list following @code{\foo}.@footnote{@code{\paper@{\one
496 \two@}} does not make sense, because the information of @code{\two}
497 would overwrite the information of @code{\one}, thereby making the
498 reference to the first identifier useless.}
502 @node Music expressions
503 @section Music expressions
505 @cindex music expressions
507 Music in @emph{Mudela} is entered as a music expression. Notes, rests,
508 lyric syllables are music expressions (the atomic
510 @cindex atomic music expressions
511 , and you can combine
512 music expressions to form new ones. This example forms a compound
513 expressions out of the quarter @code{c} note and a @code{d}
517 \sequential @{ c4 d4 @}
520 The meaning of this compound expression is to play the `@code{c}'
521 first, and then the `@code{d}' (as opposed to playing them
522 simultaneously, for instance).
524 Atomic music expression are discussed in
525 subsection XREF-atomicmusic [FIXME]. Compound music expressions are
526 discussed in subsection XREF-compoundmusic [FIXME].
530 @node Atomic music expressions
531 @section Atomic music expressions
541 The syntax for pitch specification is
545 \musicalpitch@keyindex{musicalpitch} @{ @var{octave} @var{note} @var{shift} @}
548 @var{octave} is specified by an integer, zero for the octave
549 containing middle C. @var{note} is a number from 0 to 7, with 0
550 corresponding to C and 7 corresponding to B. The shift is zero for a
551 natural, negative to add flats, or positive to add sharps.
553 In Note and Chord mode, pitches may be designated by names. See
554 section XREF-notelang [FIXME] for pitch names in different languages.
556 The syntax for duration specification is
559 \duration@keyindex{duration}
560 @{ @var{length} @var{dotcount} @}
563 @var{length} is the negative logarithm (base 2) of the duration:
564 1 is a half note, 2 is a quarter note, 3 is an eighth
565 note, etc. The number of dots after the note is given by
568 In Note, Chord, and Lyrics mode, durations may be designated by
569 numbers and dots. See Section XREF-notelang [FIXME] for details.
572 @node Note specification
573 @section Note specification
575 @cindex note specification
579 @cindex entering notes
581 A note specification has the form
584 @var{pitch}[@var{octavespec}][!][?][@var{duration}]
587 The pitch of the note is specified by the note's name.
590 The default names are the Dutch note names. The notes are specified
591 by the letters `@code{c}' through `@code{b}', where `@code{c}' is an
592 octave below middle C and the letters span the octave above that C.
593 In Dutchcindex(notenames!Dutch), a sharp is formed by adding
594 `@code{-is}' to the end of a pitch name. A flat is formed by adding
595 `@code{-es}'. Double sharps and double flats are obtained by adding
596 `@code{-isis}' or `@code{-eses}'. `@code{aes}' and `@code{ees}' are
597 contracted to `@code{as}' and `@code{es}' in Dutch, but both forms will
600 LilyPond has predefined sets of notenames for various languages. See
601 section XREF-notelang [FIXME] for details.
604 The optional octave specification takes the form of a series of
605 single quote (`@code{'}@indexcode{'}') characters or a series of comma
606 (`@code{,}@indexcode{,}') characters. Each @code{'} raises the pitch by one
607 octave; each @code{,} lowers the pitch by an octave.
609 @mudela[fragment,verbatim,center]
610 c' d' e' f' g' a' b' c''
613 @mudela[fragment,verbatim,center]
614 cis' dis' eis' fis' gis' ais' bis'
617 @mudela[fragment,verbatim,center]
618 ces' des' es' fes' ges' as' bes'
621 @mudela[fragment,verbatim,center]
622 cisis' eisis' gisis' aisis' beses'
625 @mudela[fragment,verbatim,center]
626 ceses' eses' geses' ases' beses'
629 Whenever a C-sharp is desired, you must specify a C-sharp. LilyPond
630 will determine what accidentals to typeset depending on the key and
631 context. A reminder accidental
632 @cindex reminder accidental
634 forced by adding an exclamation mark `@code{!}' after the pitch. A
635 cautionary accidental,
636 @cindex cautionary accidental
638 accidental within parentheses can be obtained by adding the question
639 mark `@code{?}@indexcode{?}' after the pitch.
641 @mudela[fragment,verbatim,center]
642 cis' d' e' cis' c'? d' e' c'!
648 Durations are entered as their reciprocal values. For notes longer
649 than a whole note, use identifiers.
655 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
664 \notes \relative c'' {
666 a1 a2 a4 a8 a16 a32 a64 a64
671 \remove "Clef_engraver";
672 \remove "Staff_symbol_engraver";
683 r1 r2 r4 r8 r16 r32 r64 r64
692 \notes \relative c'' {
694 r1 r2 r4 r8 r16 r32 r64 r64
697 loose_column_distance = 2.5 * \interline;
700 \type "Score_engraver";
702 \consists "Rest_engraver";
703 \consists "Stem_engraver";
704 \consists "Rhythmic_column_engraver";
711 If the duration is omitted then it is set equal to the previous
712 duration. If there is no previous duration, a quarter note is
713 assumed. The duration can be followed by a dot (`@code{.}@indexcode{.}')
714 to obtain dotted note lengths.
716 @mudela[fragment,verbatim,center]
720 You can alter the length of duration by writing
721 `@code{*}@var{fraction}' after it. This will not affect the
722 appearance of note heads or rests.
725 Rests are entered like notes, with note name `@code{r}@indexcode{r}',
726 or `@code{R}@indexcode{R}'. There is also a note name `@code{s}@indexcode{s}',
727 which produces a space of the specified duration.
728 `@code{R}' is specifically meant for entering parts: the @code{R} rest
729 can expand to fill a score with rests, or it can be printed as a
730 single multimeasure rest.
733 @cindex lyrics expressions
735 Syllables are entered like notes, with pitches replaced by text. For
736 example, `@code{Twin-4 kle4 twin-4 kle4}' enters four syllables, each
737 with quarter note duration. Note that the hyphen has no special
738 meaning for lyrics, and does not introduce special symbols. See
739 section XREF-modes [FIXME] for a description of what is interpreted as
742 Spaces can be introduced into a lyric either by using quotes
743 (`@code{"}') or by using an underscore without quotes: `@code{He_could4
744 not4}'. All unquoted underscores are converted to spaces. Printing
745 lyrics is discussed in section XREF-lyricprint [FIXME].
752 \property@keyindex{property}
753 @var{contextname}.@var{propname} = @var{value}
756 Sets the @var{propname} property of the context @var{contextname} to
757 the specified @var{value}. All three arguments are strings.
758 Depending on the context, it may be necessary to quote the strings or
759 to leave space on both sides of the dot.
763 @cindex translator switches
766 \translator@keyindex{translator}
767 @var{contexttype} = @var{name}
770 A music expression indicating that the context which is a direct
771 child of the a context of type @var{contexttype} should be shifted to
772 a context of type @var{contexttype} and the specified name.
774 Usually this is used to switch staffs in Piano music, e.g.
777 \translator Staff = top @var{Music}
781 @cindex output properties
784 These allow you to tweak what is happening in the back-end
785 directly. If you want to control every detail of the output
786 formatting, this is the feature to use. The downside to this is that
787 you need to know exactly how the backend works. Example:
790 @mudela[fragment,verbatim]
792 \context Staff \outputproperty
793 #(make-type-checker 'Note_head)
794 #'extra-offset = #'(5.0 . 7.5)
798 This selects all note heads occurring at current staff level, and sets
799 the extra-offset of those heads to (5,7.5), shifting them up and
802 Use of this feature is entirely on your own risk: if you use this, the
803 result will depend very heavily on the implentation of the backend,
804 which we change unscrupulously.
811 Commands are music expressions that have no duration.
816 @code{\key}@keyindex{key} @var{pitch} @var{type} @code{;}
819 Change the key signature. @var{type} should be
820 @code{\major}@keyindex{major} or @code{\minor}@keyindex{minor} to get
821 @var{pitch}-major or @var{pitch}-minor, respectively. The second
822 argument is optional; the default is major keys. The @var{\context}
823 argument can also be given as an integer, which tells the number of
824 semitones that should be added to the pitch given in the subsequent
825 @code{\key}@keyindex{key} commands to get the corresponding major key,
826 e.g., @code{\minor}@keyindex{minor} is defined as 3. The standard
827 mode names @code{\ionian}@keyindex{ionian},
828 @code{\locrian}@keyindex{locrian}, @code{\aeolian}@keyindex{aeolian},
829 @code{\mixolydian}@keyindex{mixolydian}, @code{\lydian}@keyindex{lydian},
830 @code{\phrygian}@keyindex{phrygian}, and @code{\dorian}@keyindex{dorian}
835 @code{\keysignature}@keyindex{keysignature} @var{pitchseq} @code{;}
838 Specify an arbitrary key signature. The pitches from @var{pitch} will
839 be printed in the key signature in the order that they appear on the
844 \mark@keyindex{mark} @var{unsigned};
848 Prints a mark over or under (depending on the
849 @code{markDirection}@indexcode{markDirection} property) the staff. You must add
850 @code{Mark_engraver}@indexcode{Mark_engraver} to either the Score or Staff context for
857 \bar@keyindex{bar} @var{bartype};
860 This is a request to print a special bar symbol. It replaces the
861 regular bar symbol with a special
862 symbol. The argument @var{bartype} is a string which specifies the
863 kind of bar to print. Options are @code{":|"}
864 @cindex "|A@@@code{:|}
867 @cindex "|B@@@code{|:}
869 @cindex "|C@@@code{:|:}
872 @cindex "|D@@@code{||}
874 @cindex "|E@@@code{|.}
877 @cindex "|F@@@code{.|}
879 @cindex "|G@@@code{.|.}
881 These produce, respectively, a right repeat, a left repeat, a double
882 repeat, a double bar, a start bar, an end bar, and a thick double
883 bar. If @var{bartype} is set to @code{"empty"} then nothing is
884 printed, but a line break is allowed at that spot.
886 You are encouraged to use @code{\repeat} for repetitions.
887 See section XREF-sec-repeats [FIXME].
894 \time@keyindex{time} @var{numerator}@code{/}@var{denominator} @code{;}
897 Change the time signature. The default time signature is 4/4.
898 The time signature is used to generate bar lines.
902 \tempo@keyindex{tempo} @var{duration} = @var{perminute} @code{;}
905 Used to specify the tempo. For example, `@code{\tempo 4 = 76;}'
906 requests output with 76 quarter notes per minute.
910 \partial@keyindex{partial} @var{duration} @code{;}
917 This creates an incomplete measure (anacrusis, upbeat) at the start of
918 the music, e.g., `@code{\partial 8*2;}' creates a starting measure
919 lasting two eighth notes.
923 @code{|}@indexcode{|}
928 @cindex shorten measures
932 `@code{|}' is a barcheck. Whenever a barcheck is encountered during
933 interpretation, a warning message is issued if it doesn't fall at a
934 measure boundary. This can help you finding errors in the input.
935 The beginning of the measure will be relocated, so this can also
936 be used to shorten measures.
941 \penalty@keyindex{penalty} @var{int} @code{;}
944 Discourage or encourage line breaks. See identifiers
945 @code{\break}@keyindex{break} and @code{\nobreak}@keyindex{nobreak} in
946 section [on identifiers] [FIXME].
950 \clef@keyindex{clef} @var{clefname} @code{;}
953 Music expression that sets the current clef. The argument is a
954 string which specifies the name of the clef. Several clef names are
955 supported. If `@code{_8}' or `@code{^8}' is added to the end of a clef
956 name, then the clef lowered or raised an octave will be generated.
957 Here are the supported clef names with middle C shown in each
966 %\property Voice.textStyle = typewriter
967 \clef subbass; c'4-"\kern -5mm subbass"
968 \clef bass; c'4^"\kern -2mm bass"
969 \clef baritone; c'4_"\kern -5mm baritone"
970 \clef varbaritone; c'4^"\kern -6mm varbaritone"
971 \clef tenor; c'4_"\kern -3mm tenor"
972 \clef "G_8"; c'4^"\kern -2mm G\\_8"
987 \clef alto; c'4_"\kern -2mm alto"
988 \clef mezzosoprano; c'4^"\kern -9mm mezzosoprano"
989 \clef soprano; c'4_"\kern -6mm soprano"
990 \clef treble; c'4^"\kern -4mm treble"
991 \clef french; c'4_"\kern -4mm french"
1000 The three clef symbols can also be obtained using the names `@code{G}',
1001 `@code{C}' or `@code{F}', optionally followed by an integer which
1002 indicates at which note line the clef is located. An as example, the
1003 @code{mezzosoprano} clef can also be given as `@code{C2}'.
1007 \skip@keyindex{skip} @var{duration} @code{;}
1010 Skips the amount of time specified by @var{duration}. If no other
1011 music is played, a gap will be left for the skipped time with no
1012 notes printed. It works in Note Mode or Lyrics Mode. In Note mode,
1013 this has the same effect as the space rest `@code{s}'.
1019 @section Manual beams
1021 A beam is specified by surrounding the beamed notes with brackets
1022 `@code{[}@indexcode{[}' and `@code{]}@indexcode{]}'.
1024 @mudela[fragment,verbatim,center]
1025 [a'8 a'] [a'16 a' a' a']
1028 Some more elaborate constructions:
1030 @mudela[fragment,verbatim,center]
1031 [a'16 <a' c''> c'' <a' c''>]
1032 \times 2/3 { [e'8 f' g'] }
1035 Beaming can be generated automatically; see section XREF-autobeam [FIXME].
1039 To place tremolo marks
1040 @cindex tremolo beams
1041 between two notes, begin
1042 with `@code{[:}@var{length}' and end with `@code{]}'. Tremolo marks
1043 will appear instead of beams. Putting more than two notes in such a
1044 construction will produce odd effects. To create tremolo beams on a
1045 single note, simply attach `@code{:}@var{length}' to the note itself
1046 (see also section XREF-tremolo [FIXME]).
1049 @mu dela[fragment,verbatim,center]
1050 [:16 e'1 g'] [:8 e'4 f']
1053 @mud ela[fragment,verbatim,center]
1054 c'4:32 [:16 c'8 d'8]
1058 @cindex --@@@code{-}@code{-}
1066 The syntax for an extender mark is `@code{__}'. This syntax can only
1067 be used within lyrics mode. The syntax for a spanning hyphen (i.e.,
1068 a hyphen that will be printed between two lyric syllables) is
1074 A tie connects two adjacent note heads of the same pitch. When used
1075 with chords, it connects all of the note heads whose pitches match.
1076 Ties are indicated using the tilde symbol `@code{~}@indexcode{~}'.
1077 If you try to tie together chords which have no common pitches, a
1078 warning message will appear and no ties will be created.
1080 @mudela[fragment,verbatim,center]
1081 e' ~ e' <c' e' g'> ~ <c' e' g'>
1086 [TODO: explain Requests]
1089 @cindex articulations
1095 A variety of symbols can appear above and below notes to indicate
1096 different characteristics of the performance. These symbols can be
1097 added to a note with `@var{note}@code{-\}@var{name}'. Numerous symbols
1098 are defined in @file{script.ly} and @file{script.scm}. Symbols can be
1099 forced to appear above or below the note by writing
1100 `@var{note}@code{^\}@var{name}' and `@var{note}@code{_\}@var{name}'
1101 respectively. Here is a chart showing symbols above notes, with the
1102 name of the corresponding symbol appearing underneath.
1108 c''-\accent c''-\marcato c''-\staccatissimo c''-\fermata
1109 c''-\stopped c''-\staccato c''-\tenuto c''-\upbow
1110 c''-\downbow c''^\lheel c''-\rheel c''^\ltoe
1111 c''-\rtoe c''-\turn c''-\open c''-\flageolet
1112 c''-\reverseturn c''-\trill c''-\prall c''-\mordent
1113 c''-\prallprall c''-\prallmordent c''-\upprall c''-\downprall
1114 c''-\thumb c''-\segno c''-\coda
1116 \context Lyrics \lyrics {
1117 accent__ marcato__ staccatissimo__ fermata
1118 stopped__ staccato__ tenuto__ upbow
1119 downbow__ lheel__ rheel__ ltoe
1120 rtoe__ turn__ open__ flageolet
1121 reverseturn__ trill__ prall__ mordent
1122 prallprall__ prallmordent__ uprall__ downprall
1123 thumb__ segno__ coda
1127 linewidth = 5.875\in;
1134 In addition, it is possible to place arbitrary strings of text or
1135 @TeX{} above or below notes by using a string instead of an
1136 identifier: `@code{c^"text"}'. Fingerings
1139 placed by simply using digits. All of these note ornaments appear in
1140 the printed output but have no effect on the MIDI rendering of the
1143 To save typing, fingering instructions (digits 0 to 9 are
1144 supported) and single characters shorthands exist for a few
1151 \property Voice.textStyle = typewriter
1157 c''4-^_"c-\\^{ }" s4
1164 linewidth = 5.875 \in;
1171 Dynamic marks are specified by using an identifier after a note:
1172 `@code{c4-\ff}' (the dash is optional for dynamics: `@code{c4 \ff})'.
1173 The available dynamic marks are:
1174 @code{\ppp}@keyindex{ppp},
1175 @code{\pp}@keyindex{pp}, @code{\p}@keyindex{p}, @code{\mp}@keyindex{mp},
1176 @code{\mf}@keyindex{mf}, @code{\f}@keyindex{f}, @code{\ff}@keyindex{ff},
1177 @code{\fff}@keyindex{fff}, @code{\fff}@keyindex{ffff},
1178 @code{\fp}@keyindex{fp}, @code{\sf}@keyindex{sf},
1179 @code{\sff}@keyindex{sff}, @code{\sp}@keyindex{sp},
1180 @code{\spp}@keyindex{spp}, @code{\sfz}@keyindex{sfz}, and
1181 @code{\rfz}@keyindex{rfz}.
1186 \textscript@keyindex{textscript} @var{text} @var{style}
1189 Defines a text to be printed over or under a note. @var{style} is a
1190 string that may be one of @code{roman}, @code{italic}, @code{typewriter},
1191 @code{bold}, @code{Large}, @code{large}, @code{dynamic} or @code{finger}.
1193 You can attach a general textscript request using this syntax:
1198 c4-\textscript "6" "finger"
1199 c4-\textscript "foo" "normal"
1204 This is equivalent to `@code{c4-6 c4-"foo"}'.
1211 \script@keyindex{script} @var{alias}
1214 Prints a symbol above or below a note. The argument is a string
1215 which points into the script-alias table defined in @file{script.scm}.
1216 The scheme definitions specify whether the symbol follows notes into
1217 the staff, dependence of symbol placement on staff direction, and a
1218 priority for placing several symbols over one note. Usually the
1219 @code{\script}@keyindex{script} keyword is not used directly. Various
1220 helpful identifier definitions appear in @file{script.ly}.
1225 Slurs connects chords and try to avoid crossing stems. A slur is
1226 started with `@code{(}' and stopped with `@code{)}'. The
1227 starting `@code{(}' appears to the right of the first note in
1228 the slur. The terminal `@code{)}' appears to the left of the
1229 first note in the slur. This makes it possible to put a note in
1230 slurs from both sides:
1232 @mudela[fragment,verbatim,center]
1233 f'()g'()a' [a'8 b'(] a'4 g'2 )f'4
1239 A crescendo mark is started with @code{\cr}@keyindex{cr} and terminated
1240 with @code{\rc}@keyindex{rc}. A decrescendo mark is started with
1241 @code{\decr}@keyindex{decr} and terminated with
1242 @code{\rced}@keyindex{rced}. There are also shorthands for these
1243 marks. A crescendo can be started with @code{\<}@keyindex{<} and a
1244 decrescendo can be started with @code{\>}@keyindex{>}. Either one can
1245 be terminated with @code{\!}@keyindex{"!}. Note that @code{\!}
1246 must go before the last note of the dynamic mark whereas @code{\rc}
1247 and @code{\rced} go after the last note. Because these marks are
1248 bound to notes, if you want to get several marks during one note, you
1249 must use spacer notes.
1251 @mudela[fragment,verbatim,center]
1252 c'' \< \! c'' d'' \decr e'' \rced
1253 < f''1 { s4 \< \! s2 \> \! s4 } >
1259 \spanrequest@keyindex{spanrequest} @var{startstop} @var{type}
1262 Define a spanning request. The @var{startstop} parameter is either -1
1263 (@code{\start}@keyindex{start}) or 1 (@code{\stop}@keyindex{stop}) and
1264 @var{type} is a string that describes what should be started.
1265 Supported types are @code{crescendo}, @code{decrescendo},
1266 @code{beam}, @code{slur}. This is an internal command. Users should
1267 use the shorthands which are defined in the initialization file
1270 You can attach a (general) span request to a note using
1272 @mudela[fragment,verbatim,center]
1273 c'4-\spanrequest \start "slur"
1274 c'4-\spanrequest \stop "slur"
1277 The slur syntax with parentheses is a shorthand for this.
1281 @cindex tremolo marks
1284 @section stem tremolo
1286 Tremolo marks can be printed on a single note by adding
1287 `@code{:}[@var{length}]' after the note. The length must be at
1288 least 8. A @var{length} value of 8 gives one line across
1289 the note stem. If the length is omitted, then the last value is
1290 used, or the value of the @code{tremoloFlags}@indexcode{tremoloFlags} property if there was
1293 @mudela[verbatim,fragment,center]
1299 @node Compound music expressions
1300 @section Compound music expressions
1302 @cindex compound music expressions
1304 Music expressions are compound data structures. You can nest music
1305 expressions any way you like. This simple example shows how three
1306 chords can be expressed in two different ways:
1308 @mudela[fragment,verbatim,center]
1309 \notes \context Staff {
1311 <a c'> <b d' > <c' e'>
1312 < { a b c' } { c' d' e' } >
1316 @cindex context selection
1317 @c @keyindex{context}
1320 \context @var{contexttype} [= @var{contextname}] @var{musicexpr}
1323 Interpret @var{musicexpr} within a context of type @var{contexttype}.
1324 If the context does not exist, it will be created. The new context
1325 can optionally be given a name. See
1326 section XREF-contextselection [FIXME] and XREF-contextdefs [FIXME] for more
1327 information on interpretation contexts.
1335 Mode switching keywords form compound music expressions: @code{\notes}
1336 @keyindex{notes} @var{musicexpr}, @code{\chords} @keyindex{chords}
1337 @var{musicexpr}, and @code{\lyrics} @keyindex{lyrics} @var{musicexpr}.
1338 These expressions do not add anything to the meaning of their
1339 arguments. They are just a way to indicate that the arguments should
1340 be parsed in indicated mode. See section XREF-modes [FIXME] for more
1341 information on modes.
1343 More information on context selection can be found in
1344 section XREF-contextselection [FIXME].
1348 @cindex sequential music
1354 \sequential@keyindex{sequential}
1355 @code{@{} @var{musicexprlist} @code{@}}
1358 This means that list should be played or written in sequence, i.e.,
1359 the second after the first, the third after the second. The duration
1360 of sequential music is the the sum of the durations of the elements.
1361 There is a shorthand, which leaves out the keyword:
1365 @code{@{} @var{musicexprlist} @code{@}}
1370 @cindex simultaneous music
1377 \simultaneous@keyindex{simultaneous}
1378 @code{@{} @var{musicexprlist} @code{@}}
1381 It constructs a music expression where all of its arguments start at
1382 the same moment. The duration is the maximum of the durations of the
1383 elements. The following shorthand is a common idiom:
1387 @code{<} @var{musicexprlist} @code{>}
1390 If you try to use a chord as the first thing in your score, you might
1391 get multiple staffs instead of a chord.
1393 @mudela[verbatim,center]
1402 This happens because the chord is interpreted by a score context.
1403 Each time a note is encountered a default Voice context (along with a
1404 Staff context) is created. The solution is to explicitly instantiate
1407 @mudela[verbatim,center]
1409 \notes\context Voice <c''4 e''>
1418 @cindex relative pitch specification
1423 It is easy to get confused by octave changing marks and accidentally
1424 putting a pitch in the wrong octave. A much better way of entering a
1425 note's octave is `the relative octave' mode.
1429 \relative@keyindex{relative} @var{startpitch} @var{musicexpr}
1432 The octave of notes that appear in @var{musicexpr} are calculated as
1433 follows: If no octave changing marks are used, the basic interval
1434 between this and the last note is always taken to be a fourth or
1435 less.@footnote{The interval is determined without regarding
1436 accidentals. A @code{fisis} following a @code{ceses} will be put above
1437 the @code{ceses}.} The octave changing marks `@code{'}' and `@code{,}'
1438 can then be added to raise or lower the pitch by an extra octave.
1439 Upon entering relative mode, an absolute starting pitch must be
1440 specified that will act as the predecessor of the first note of
1443 Entering scales is straightforward in relative mode.
1445 @mudela[fragment,verbatim,center]
1451 And octave changing marks are used for intervals greater than a fourth.
1453 @mudela[fragment,verbatim,center]
1455 c g c f, c' a, e'' }
1458 If the preceding item is a chord, the first note of the chord is used
1459 to determine the first note of the next chord. But other notes
1460 within the second chord are determined by looking at the immediately
1463 @mudela[fragment,verbatim,center]
1471 The pitch after the @code{\relative} contains a notename. To parse
1472 the pitch as a notename, you have to be in note mode, so there must
1473 be a surrounding @code{\notes}@keyindex{notes} keyword (which is not
1476 The relative conversion will not affect @code{\transpose} or
1477 @code{\relative} sections in its argument. If you want to use
1478 relative within transposed music, you must place an additional
1479 @code{\relative} inside the @code{\transpose}.
1481 It is strongly recommended to use relative pitch mode: less work,
1482 less error-prone, and more readable.
1486 Chord names are a way to generate simultaneous music expressions that
1487 correspond with traditional chord names. It can only be used in
1488 Chord mode (see section XREF-modes [FIXME]).
1492 @var{tonic}[@var{duration}][@code{-}@var{modifiers}][@code{^}@var{subtractions}][@code{/}@var{inversion}][@code{/+}@var{bass}].
1495 @var{tonic} should be the tonic note of the chord, and @var{duration}
1496 is the chord duration in the usual notation. There are two kinds of
1497 modifiers. One type is @emph{chord additions}, which are obtained by
1498 listing intervals separated by dots. An interval is written by its
1499 number with an optional `@code{+}' or `@code{-}' to indicate raising or
1500 lowering by half a step. Chord additions has two effects: It adds
1501 the specified interval and all lower odd numbered intervals to the
1502 chord, and it may lower or raise the specified interval. Intervals
1503 must be separated by a dot (`@code{.}').
1507 @mudela[fragment,verbatim]
1511 c:9 c:9-.5+.7+ c:3-.5- c:4.6.8
1518 The second type of modifier that may appear after the `@code{:}' is a
1519 named modifier. Named modifiers are listed in the file
1520 @file{chord-modifiers.ly}. The available modifiers are `@code{m}' and
1521 `@code{min}' which lower the 3rd half a step, `@code{aug}@indexcode{aug}' which
1522 raises the 5th, `@code{dim}@indexcode{dim}' which lowers the 5th,
1523 `@code{maj}@indexcode{maj}' which adds a raised 7th, and `@code{sus}@indexcode{sus}'
1524 which replaces the 5th with a 4th.
1528 @mudela[fragment,verbatim]
1531 c1:m c:min7 c:maj c:aug c:dim c:sus
1539 Chord subtractions are used to eliminate notes from a chord. The
1540 notes to be subtracted are listed after a `@code{^}' character,
1543 @mudela[fragment,verbatim,center]
1551 Chord inversions can be specified by appending `@code{/}@indexcode{/}' and
1552 the name of a single note to a chord. This has the effect of
1553 lowering the specified note by an octave so it becomes the lowest
1554 note in the chord. If the specified note is not in the chord, a
1555 warning will be printed.
1557 @mudela[fragment,verbatim,center]
1566 Bass notes can be added by `@code{/+}@indexcode{/+}' and
1567 the name of a single note to a chord. This has the effect of
1568 adding the specified note to the chord, lowered by an octave,
1569 so it becomes the lowest note in the chord.
1571 @mudela[fragment,verbatim,center]
1580 Throughout these examples, chords have been shifted around the staff
1581 using @code{\transpose}.
1583 You should not combine @code{\relative} with named chords.
1589 Tuplets are made out of a music expression by multiplying their
1590 duration with a fraction.
1594 \times@keyindex{times} @var{fraction} @var{musicexpr}
1597 The duration of @var{musicexpr} will be multiplied by the fraction.
1598 In print, the fraction's denominator will be printed over the notes,
1599 optionally with a bracket. The most common tuplet is the triplet in
1600 which 3 notes have the length of 2, so the notes are 2/3 of
1601 their written length:
1603 @mudela[fragment,verbatim,center]
1604 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
1613 \grace@keyindex{grace} @var{musicexpr}
1616 A grace note expression has duration 0; the next real note is
1617 assumed to be the main note.
1619 You cannot have the grace note after the main note, in terms of
1620 duration, and main notes, but you can typeset the grace notes to the
1621 right of the main note using the property
1622 @code{graceAlignPosition}@indexcode{graceAlignPosition}.
1624 When grace music is interpreted, a score-within-a-score is set up:
1625 @var{musicexpr} has its own time bookkeeping, and you could (for
1626 example) have a separate time signature within grace notes. While in
1627 this score-within-a-score, you can create notes, beams, slurs, etc.
1628 Unbeamed eighth notes and shorter by default have a slash through the
1629 stem. This behavior can be controlled with the
1630 @code{stemStyle}@indexcode{stemStyle} property.
1634 @mudela[fragment,verbatim]
1636 \grace c8 c4 \grace { [c16 c16] } c4
1637 \grace { \property Grace.stemStyle = "" c16 } c4
1643 At present, nesting @code{\grace}@keyindex{grace} notes, e.g.
1647 @code{\grace @{ \grace c32 c16 @} c4}
1650 may result in run-time errors of LilyPond. Since the meaning of such
1651 a construct is unclear, we don't consider this a loss. Similarly,
1652 juxtaposing two @code{\grace} sections is syntactically valid, but
1653 makes no sense and may cause runtime errors.
1655 Ending a staff or score with grace notes may also generate a run-time
1656 error, since there will be no main note to attach the grace notes to.
1665 In order to specify repeats, use the @code{\repeat}@keyindex{repeat}
1666 keyword. Since repeats look and sound differently when played or
1667 printed, there are a few different variants of repeats.
1671 Repeated music is fully written (played) out. Useful for MIDI
1675 This is the normal notation: Repeats are not written out, but
1676 alternative endings (voltas) are printed, left to right.
1679 Alternative endings are written stacked, which is useful for
1683 The syntax for repeats is
1687 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
1690 If you have alternative endings, you may add
1694 \alternative@keyindex{alternative}
1695 @code{@{} @var{alternative1}
1697 @var{alternative3} @dots{} @code{@}}
1700 where each @var{alternative} is a Music expression.
1702 Normal notation repeats are used like this:
1706 @mudela[fragment,verbatim]
1708 \repeat volta 2 { c'4 d' e' f' }
1709 \repeat volta 2 { f' e' d' c' }
1714 With alternative endings:
1718 @mudela[fragment,verbatim]
1720 \repeat volta 2 {c'4 d' e' f'}
1721 \alternative { {d'2 d'} {f' f} }
1726 Folded repeats look like this:@footnote{Folded repeats offer little
1727 more over simultaneous music. However, it is to be expected that
1728 more functionality -- especially for the MIDI backend -- will be
1733 @mudela[fragment,verbatim]
1735 \repeat fold 2 {c'4 d' e' f'}
1736 \alternative { {d'2 d'} {f' f} }
1743 @mudela[fragment,verbatim]
1747 \repeat volta 2 { e | c2 d2 | e2 f2 | }
1748 \alternative { { g4 g g } { a | a a a a | b1 } }
1755 If you don't give enough alternatives for all of the repeats, then
1756 the first alternative is assumed to be repeated often enough to equal
1757 the specified number of repeats.
1761 @mudela[fragment,verbatim]
1764 \repeat volta 3 { \partial 4; e | c2 d2 | e2 f2 | }
1765 \alternative { { g4 g g }
1766 {\partial 1; e4 e e }
1767 {\partial 1; a a a a | b1 } }
1774 It is possible to nest @code{\repeat}. This is not entirely
1775 supported: the notes will come be in the right places, but the repeat
1780 @cindex transposition of pitches
1785 A music expression can be transposed with
1786 @code{\transpose}@keyindex{transpose}. The syntax is
1790 \transpose @var{pitch} @var{musicexpr}
1793 This means that middle C in @var{musicexpr} is transposed to
1796 @code{\transpose} distinguishes between enharmonic pitches: both
1797 @code{\transpose cis'} or @code{\transpose des'} will transpose up half
1798 a tone. The first version will print sharps and the second version
1803 @mudela[fragment,verbatim]
1808 \transpose des'' { \key e; c d e f }
1809 \transpose cis'' { \key e; c d e f }
1815 If you want to use both @code{\transpose} and @code{\relative}, then
1816 you must use @code{\transpose} first. @code{\relative} will have no
1817 effect music that appears inside a @code{\transpose}.
1821 @cindex automatic lyric durations
1823 If you have lyrics that are set to a melody, you can import the
1824 rhythm of that melody into the lyrics using @code{\addlyrics}.
1825 @keyindex{addlyrics} The syntax for this is
1829 \addlyrics @var{musicexpr1 musicexpr2}
1832 This means that both @var{musicexpr1} and @var{musicexpr2} are
1833 interpreted, but that every non-command atomic music expression
1834 (``every syllable'') in @var{musicexpr2} is interpreted using timing
1835 of @var{musicexpr1}.
1837 If the property @code{automaticMelismata}@indexcode{automaticMelismata} is set in the
1838 context of @var{musicexpr1}, no lyrics will be put on slurred or tied
1843 @mudela[verbatim,fragment]
1846 \property Voice.automaticMelismata = "1"
1847 c8 () cis d8. e16 f2
1849 \context Lyrics \lyrics {
1855 You should use a single rhythm melody, and single rhythm lyrics (a
1856 constant duration is the obvious choice). If you do not, you will get
1857 undesired effects when using multiple stanzas:
1861 @mudela[verbatim,fragment]
1864 c8 () cis d8. e16 f2
1866 \context Lyrics \lyrics
1873 It is valid (but probably not very useful) to use notes instead of
1874 lyrics for @var{musicexpr2}.
1880 @section Ambiguities
1884 The grammar contains a number of ambiguities.@footnote{The authors
1885 hope to resolve them at a later time.}
1888 @item The assignment
1894 can be interpreted as making a string identifier @code{\foo}
1895 containing @code{"bar"}, or a music identifier @code{\foo}
1896 containing the syllable `bar'.
1898 @item The assignment
1904 can be interpreted as making an integer identifier
1905 containing -6, or a Request identifier containing the
1906 fingering `6' (with neutral direction).
1908 @item If you do a nested repeat like
1920 then it is ambiguous to which @code{\repeat} the
1921 @code{\alternative} belongs. This is the classic if-then-else
1922 dilemma. It may be solved by using braces.
1924 @item (an as yet unidentified ambiguity :-)
1929 @node Notation conversion specifics
1930 @section Notation conversion specifics
1934 @cindex automatic beam generation
1939 By default, LilyPond will generate beams automatically. This feature
1940 can be disabled by setting the @code{Voice.noAutoBeaming}@indexcode{Voice.noAutoBeaming}
1941 property to 1. It can be overridden for specific cases by
1942 specifying explicit beams as described in
1943 section XREF-manualbeam [FIXME].
1945 A large number of Voice properties are used to decide how to generate
1946 beams. Their default values appear in @file{auto-beam-settings.ly}.
1947 In general, beams can begin anywhere, but their ending location is
1948 significant. Beams can end on a beat, or at durations specified by
1949 the @code{Voice.beamAutoEnd}@indexcode{Voice.beamAutoEnd} property. To end beams every
1950 quarter note, for example, you could set
1951 @code{Voice.beamAutoEnd}@indexcode{Voice.beamAutoEnd} equal to `@code{"1/4"}'. To end beams
1952 at every three eighth notes you would set it to `@code{"3/8"}'. The
1953 same syntax can be used to specify beam starting points using
1954 @code{Voice.beamAutoBegin}@indexcode{Voice.beamAutoBegin}.
1956 To allow different settings for different time signatures, these
1957 property names can start with `@code{time}@var{N}@code{_}@var{M}' to
1958 restrict the definition to `@var{N}@code{/}@var{M}' time. For example,
1959 to specify beams ending only for 6/8 time you would use the
1960 property @code{Voice.time6_8beamAutoEnd}. To allow different endings
1961 for notes of different durations, the duration can be tacked onto the
1962 end of the property. To specify beam endings for beams that contain
1963 32nd notes, you would use @code{Voice.beamAutoEnd_32}.
1971 @cindex printing!chord names
1973 For displaying printed chord names, use the @code{ChordNames}@indexcode{ChordNames}
1974 and @code{ChordNameVoice}@indexcode{ChordNameVoice} contexts. The chords may be entered
1975 either using the notation described above, or directly using
1980 @mudela[fragment,verbatim]
1982 \context ChordNames {
1983 \chords{a b c} \notes{<d f g> <e g b>}
1985 \context Staff \notes {
1993 LilyPond examines chords specified as lists of notes to determine a
1994 name to give the chord. By default, LilyPond will not try to
1995 identify chord inversions:
1997 @mudela[fragment,verbatim,center]
1999 \context ChordNameVoice \notes {
2002 \context Thread \notes {
2008 If you want inversions to be recognized, you must set the property
2009 @code{ChordNames.chordInversion}@indexcode{ChordNames.chordInversion}:
2011 @mudela[fragment,verbatim,center]
2013 \property Score.chordInversion = 1
2014 \context ChordNameVoice \notes {
2017 \context Thread \notes {
2027 @cindex printing!lyrics
2032 Lyric syllables must be interpreted within a @code{Lyrics} context
2034 @cindex context!Lyrics
2037 Here is a full example:
2044 \notes \transpose c'' {
2046 e f g2 | e4 f g2 \bar "|.";
2048 \context Lyrics \lyrics {
2049 Va-4 der Ja- cob Va- der Ja- cob
2050 Slaapt gij nog?2 Slaapt4 gij nog?2
2058 You may want a continuous line after the syllables to show melismata.
2059 To achieve this effect, add a `@code{__}' lyric as a separate word
2060 after the lyric to be extended. This will create an extender, a line
2061 that extends over the entire duration of the lyric. This line will
2062 run all the way to the start of the next lyric, so you may want to
2063 shorten it by using a blank lyric (using `@code{_}').
2070 \notes \relative c'' {
2071 a4 () b () c () d | c () d () b () a | c () d () b () a
2073 \context Lyrics \lyrics {
2074 foo1 __ | bar2. __ _4 | baz1 __
2083 If you want to have hyphens centered between syllables (rather than
2084 attached to the end of the first syllable) you can use the special
2085 `@code{-}@code{-}' lyric as a separate word between syllables. This
2086 will result in a hyphen which length varies depending on the space
2087 between syllables, and which will be centered between the syllables.
2095 \notes \transpose c'' {
2097 e f g2 | e4 f g2 \bar "|.";
2099 \context Lyrics \lyrics {
2100 Va4 -- der Ja -- cob | Va -- der Ja -- cob |
2101 Slaapt gij nog?2 | Slaapt4 gij nog?2
2111 @node Notation Contexts
2112 @section Notation Contexts
2114 @cindex notation contexts
2116 Notation contexts are objects that only exist during a run of
2117 LilyPond. During the interpretation phase of LilyPond, the Music
2118 expression contained in a @code{\score} block is interpreted in time
2119 order. This is the order in which humans read, play, and write
2122 A context is an object that holds the reading state of the
2123 expression; it contains information like
2126 @item What notes are playing at this point?
2127 @item What symbols will be printed at this point?
2128 @item In what style will they printed?
2129 @item What is the current key signature, time signature, point within
2133 Contexts are grouped hierarchically: A @code{Voice} context is
2134 contained in a @code{Staff} context (because a staff can contain
2135 multiple voices at any point), a @code{Staff} context is contained in
2136 a @code{Score}, @code{StaffGroup}, or @code{ChoirStaff} context (because
2137 these can all contain multiple staffs).
2139 Contexts associated with sheet music output are called @emph{notation
2140 contexts}, those for sound output are called playing contexts.
2142 Contexts are created either manually or automatically. Initially,
2143 the top level music expression is interpreted by the top level
2144 context (the @code{Score} context). When a atomic music expression
2145 (i.e. a note, a rest, @code{\bar}, or @code{\time} commands), a nested
2146 set of contexts is created that can process these atomic expressions,
2152 \score @{ \notes < c4 > @}
2157 The sequential music, `@code{@{ c4 @}}' is interpreted by @code{Score}
2158 context. When the note `@code{c4}' itself is interpreted, a set of
2159 contexts is needed that will accept notes. The default for this is a
2160 @code{Voice} context, contained in a @code{Staff} context. Creation of
2161 these contexts results in the staff being printed.
2166 You can also create contexts manually, and you probably have to do so
2167 if you want to typeset complicated multiple part material. If a
2168 `@code{\context} @var{name} @var{musicexpr}' expression is encountered
2169 during the interpretation phase, the @var{musicexpr} argument will be
2170 interpreted with a context of type @var{name}. If you specify a name,
2171 the specific context with that name is searched.
2173 If a context of the specified type and name can not be found, a new
2174 one is created. For example,
2180 \notes \relative c'' {
2181 c4 <d4 \context Staff = "another" e4> f
2188 In this example, the @code{c} and @code{d} are printed on the
2189 default staff. For the @code{e}, a context Staff called
2190 `@code{another}' is specified; since that does not exist, a new
2191 context is created. Within @code{another}, a (default) Voice context
2192 is created for the @code{e4}. When all music referring to a
2193 context is finished, the context is ended as well. So after the
2194 third quarter, @code{another} is removed.
2196 Almost all music expressions inherit their interpretation context
2197 from their parent. In other words, suppose that the syntax for a
2202 \keyword @var{musicexpr1} @var{musicexpr2} @dots{}
2205 When the interpretation of this music expression starts, the context
2206 for @var{musicexpr1}, @var{musicexpr2}, etc. is that of the total
2209 Lastly, you may wonder, why this:
2215 \notes \relative c'' @{
2223 doesn't result in this:
2228 \notes \relative c'' {
2235 For the @code{c4}, a default @code{Staff} (with a contained
2236 @code{Voice}) context is created. After the @code{c4} ends, no
2237 music refers to this default staff, so it would be ended, with the
2238 result shown. To prevent this inconvenient behavior, the context to
2239 which the sequential music refers is adjusted during the
2240 interpretation. So after the @code{c4} ends, the context of the
2241 sequential music is also the default @code{Voice} context.
2242 The @code{d4} gets interpreted in the same context
2247 These are the contexts supplied with the package. They are defined
2248 in the initialization file @file{ly/engraver.ly}.
2251 @item @code{Grace}@indexcode{Grace}
2252 The context for handling grace notes. It is instantiated
2253 automatically when you use @code{\grace}. Basically, it is an
2254 `embedded' miniature of the Score context. Since this context
2255 needs special interaction with the rest of LilyPond, you should
2256 not explicitly instantiate it.
2258 @item @code{LyricVoice}@indexcode{LyricVoice}
2259 Corresponds to a voice with lyrics. Handles the printing of a
2260 single line of lyrics.
2262 @item @code{Thread}@indexcode{Thread}
2263 Handles note heads, and is contained in the Voice context. You
2264 have to instantiate this explicitly if you want to adjust the
2265 style of individual note heads.
2267 @item @code{Voice}@indexcode{Voice}
2268 Corresponds to a voice on a staff. This context handles the
2269 conversion of dynamic signs, stems, beams, super- and subscripts,
2270 slurs, ties, and rests.
2272 You have to instantiate this explicitly if you want to have
2273 multiple voices on the same staff.
2275 @item @code{ChordNamesVoice}@indexcode{ChordNamesVoice}
2276 A voice with chord names. Handles printing of a line of chord
2279 @item @code{ChordNames}@indexcode{ChordNames}
2280 Typesets chord names. Can contain @code{ChordNamesVoice}
2283 @item @code{Lyrics}@indexcode{Lyrics}
2284 Typesets lyrics. It can contain @code{LyricVoice} contexts.
2286 @item @code{Staff}@indexcode{Staff}
2287 Handles clefs, bar lines, keys, accidentals. It can contain
2288 @code{Voice} contexts.
2290 @item @code{RhythmicStaff}@indexcode{RhythmicStaff}
2291 A context like @code{Staff} but for printing rhythms. Pitches are
2292 ignored; the notes are printed on one line. It can contain
2293 @code{Voice} contexts.
2295 @item @code{GrandStaff}@indexcode{GrandStaff}
2296 Contains @code{Staff} or @code{RhythmicStaff} contexts. It adds a
2297 brace on the left side, grouping the staffs together. The bar
2298 lines of the contained staffs are connected vertically. It can
2299 contain @code{Staff} contexts.
2301 @item @code{PianoStaff}@indexcode{PianoStaff}
2302 Just like @code{GrandStaff} but with @code{minVerticalAlign} set
2303 equal to @code{maxVerticalAlign} so that interstaff beaming and
2304 slurring can be used.
2306 @item @code{StaffGroup}@indexcode{StaffGroup}
2307 Contains @code{Staff} or @code{RhythmicStaff} contexts. Adds a
2308 bracket on the left side, grouping the staffs together. The bar
2309 lines of the contained staffs are connected vertically. It can
2310 contain @code{Staff}, @code{RhythmicStaff}, @code{GrandStaff}, or
2311 @code{Lyrics} contexts.
2313 @item @code{ChoirStaff}@indexcode{ChoirStaff}
2314 Identical to @code{StaffGroup} except that the contained staffs
2315 are not connected vertically.
2317 @item @code{Score}@indexcode{Score}
2318 This is the top level notation context. No other context can
2319 contain a @code{Score} context. This context handles the
2320 administration of time signatures. It also makes sure that items
2321 such as clefs, time signatures, and key-signatures are aligned
2322 across staffs. It can contain @code{Lyrics}, @code{Staff},
2323 @code{RhythmicStaff}, @code{GrandStaff}, @code{StaffGroup}, and
2324 @code{ChoirStaff} contexts.
2326 You cannot explicitly instantiate a Score context (since it is
2327 not contained in any other context). It is instantiated
2328 automatically when an output definition (a @code{\score} or
2329 @code{\paper} block) is processed.
2334 Properties that are set in one context are inherited by all of the
2335 contained contexts. This means that a property valid for the
2336 @code{Voice} context can be set in the @code{Score} context (for
2337 example) and thus take effect in all @code{Voice} contexts.
2339 Properties can be preset within the @code{\translator} block
2340 corresponding to the appropriate context. In this case, the syntax
2345 @var{propname} @code{=} @var{value}
2348 This assignment happens before interpretation starts, so a
2349 @code{\property} expression will override any predefined settings.
2351 The @code{\property} expression will create any property you specify.
2352 There is no guarantee that a property will be used. So if you spell
2353 a property name wrong, there will be no error message.
2355 The property settings are used during the interpretation phase. They
2356 are read by the LilyPond modules where interpretation contexts are
2357 built of. These modules are called @emph{translators}. Translators for
2358 notation are called @emph{engravers}, and translators for sound are
2359 called @emph{performers}.
2361 The precise result of a property is determined by the implementation
2362 of the translator that reads them. Therefore, the result of a
2363 property can vary, since it is implementation and configuration
2366 In order to fully find out what properties are used, you must
2367 currently search the source code for calls to @code{get_property}.
2368 The rest of the section is devoted to an (incomplete) overview of
2369 available properties.
2375 Properties are Scheme values, so they have a type. The type of a
2376 property is listed in parentheses after the property name.
2378 @macro propertytype{t}
2387 @item @code{Generic_property_list}
2388 Defines names and types for generic properties. These are properties
2389 than can be plugged into the backend directly. See the init file
2390 @file{generic-property.scm} for details. For internal use only.
2392 @item @code{XXXVerticalExtent}@indexcode{groupVerticalExtent} @propertytype{Interval: a cons of numbers}
2393 Hard code the size of the vertical group in context XXX, example
2395 \property Staff.StaffVerticalExtent = #(-5.0 . 5.0)
2397 The value is a cons of real numbers, that measure the extent in
2401 @subsubheading Lyrics properties
2403 @cindex properties!Lyrics
2406 @item @code{textStyle}@indexcode{textStyle} @propertytype{string}
2407 Set the font for lyrics. The available font choices are
2408 @code{roman}, @code{italic}, @code{bold}, @code{large}, @code{Large},
2409 @code{typewriter}, and @code{finger}. The @code{finger} font can
2410 only display numbers. Note also that you must be careful when
2411 using @code{\property} in Lyrics mode, because of the way strings
2412 are parsed. Either put quotes around the arguments to
2413 @code{\property} or be sure to leave a space on both sides of the
2417 @subsubheading Thread properties
2419 @cindex properties!Thread
2422 @item @code{noteheadStyle}@indexcode{noteheadStyle} @propertytype{string}
2423 Selects type of note head. Choices are @code{cross},
2424 @code{diamond}, @code{harmonic}, @code{transparent}, and @code{""}.
2425 They are shown in that order below.
2427 @mudela[center,verbatim]
2430 \property Staff.barNonAuto = 1
2431 \property Voice.noteHeadStyle = cross
2433 \property Voice.noteHeadStyle = diamond
2435 \property Voice.noteHeadStyle = harmonic
2437 \property Voice.noteHeadStyle = transparent
2439 \property Voice.noteHeadStyle = ""
2450 @subsubheading Grace properties
2452 @cindex properties!Grace
2456 @item @code{stemStyle}@indexcode{flagStyle} @propertytype{string}
2457 By default set to @code{"grace"} meaning that all unbeamed
2458 notes with flags are typeset with a slash through the flag.
2459 Setting to @code{""} gives standard flags.
2462 c'8 \property Voice.flagStyle = "grace" c'8
2467 @subsubheading Voice properties
2469 @cindex properties!Voice
2472 @item @code{abbrev}@indexcode{abbrev} @propertytype{integer}
2473 Set length for tremolo to be used if no length is explicitly
2476 @item @code{articulationScriptPadding}@indexcode{articulationScriptPadding}
2477 Determines the extra space added between articulation marks, such
2478 as staccato, tenuto, trill, up/down bow or fermata, and the
2479 closest staff line or note.
2481 @item @code{articulationScriptVerticalDirection} @propertytype{direction}
2482 @indexcode{articulationScriptVerticalDirection}
2483 Determines the location of articulation marks. Set to @code{\up}
2484 to print marks above the staff; set to @code{\down} to print marks
2485 below the staff. This property does not override explicit
2486 directions marked with `@code{^}' or `@code{_}' in the mudela file.
2488 @item @code{noAutoBeaming}@indexcode{beamAuto} @propertytype{boolean}
2489 If set to 1 then beams are not generated automatically.
2491 @item @code{beamAutoEnd}@indexcode{beamAutoEnd} @propertytype{?}
2492 Specifies when automatically generated beams can end. See
2493 section XREF-autobeam [FIXME].
2495 @item @code{beamAutoBegin}@indexcode{beamAutoBegin} @propertytype{?}
2496 Specifies when automatically generated beams can start. See
2497 section XREF-autobeam [FIXME].
2501 @item @code{beamQuantisation}@indexcode{beamQuantisation} @propertytype{symbol}
2502 Set to @code{\none} for no quantization. Set to @code{\normal} to
2503 quantize position and slope. Set to @code{\traditional} to avoid
2504 wedges. These three settings are available via
2505 @code{\beamposfree}@keyindex{beamposfree},
2506 @code{\beamposnormal}@keyindex{beamposnormal}, and
2507 @code{\beampostraditional}@keyindex{beampostraditional}.
2509 @item @code{beamSlopeDamping}@indexcode{beamSlopeDamping} @propertytype{number}
2510 Set to @code{\none} for undamped beams. Set to @code{\normal} for
2511 damped beams. Set to @code{\infinity} for beams with zero slope.
2513 @code{\beamslopeproportional}@keyindex{beamslopeproportional},
2514 @code{\beamslopedamped}@keyindex{beamslopedamped}, and
2515 @code{\beamslopezero}@keyindex{beamslopezero} each set the
2516 corresponding value.
2518 @item @code{dynamicDirection}@indexcode{dynamicDirection} @propertytype{direction}
2519 Determines location of dynamic marks. Set to @code{\up} to print
2520 marks above the staff; set to @code{\down} to print marks below
2523 @item @code{dynamicStyle}@indexcode{dynamicStyle} @propertytype{string}
2524 Set the text style for dynamics.
2526 @item @code{fontSize}@indexcode{fontSize} @propertytype{number}
2527 Can be used to select smaller font sizes for music. The normal
2528 font size is 0, and the two smaller sizes are -1
2532 c''16 \property Staff.fontSize = -2 c''16
2535 @item @code{forceHorizontalShift}@indexcode{forceHorizontalShift}
2536 Force horizontal shift for collision resolution. It overrides
2537 automatic collision resolution. The value is the shift amount
2538 expressed in @code{note_width}, as set in the paper section.
2540 @item @code{collisionMergeDotted}@indexcode{collisionMergeDotted} @propertytype{boolean}
2542 Merge noteheads in collisions, even if they have a different number of
2543 dots. This normal notation for polyphonic guitar music.
2545 @mudelafile[verbatim]{force-hshift.ly}
2548 [FIXME: this should be moved]
2550 Lilypond always arranges note heads on alternate sides of a stem (that
2551 is, within a single voice) as necessary to prevent collisions (note head
2552 overlaps). For up stems, the upper note of a colliding pair is placed
2553 on the right side of the stem, the lower on the left. For down stems,
2554 the algorithm works in reverse.
2556 Lily also attempts to prevent collisions of note heads in different
2557 voices. A situation where chords of two or more voices are played
2558 simultaneously within one staff.
2560 By default, if only two voices (and both have opposite stem directions)
2561 are in this 'collision group', the notes both are shifted by @code{0.5
2562 \quartwidth} if there are unisons or seconds between the voices.
2564 If there are more than two voices in a collision group, shifting is
2565 inactive by default, since in this case, there are multiple chords with
2566 the same stem direction. By distinguish between those chords, LilyPond
2567 can do collision resolution in these cases as well.
2569 Distinguishing between voices with the same stem direction, is done by
2570 setting the property @code{Voice.horizontalNoteShift}. It must be set
2571 to a different integer for each voice. Then, all note heads in collision
2572 groups (not just unisons and seconds) will be offset, one voice relative
2573 another. The following fragment of sheet music shows how shifting is
2574 done, with values of @code{horizontalNoteShift} printed over and under
2575 the notes. In this case the chords are just simple notes.
2577 @c URG : mudela book bug.
2578 @mudela[singleline,verbatim]
2580 \notes \context Staff <
2581 \context Voice = VA { \stemup f''4^"0" }
2582 \context Voice = VB {\stemup
2583 \property Voice.horizontalNoteShift = 1 d''4^" 1" }
2584 \context Voice = VC { \stemup \property
2585 Voice.horizontalNoteShift = 2 b'4^" 2" }
2586 \context Voice = VD { \stemdown \property
2587 Voice.horizontalNoteShift = 1 g'4_"1 " }
2588 \context Voice = VE { \stemdown e'4_"0" }
2593 If you are not satisfied with the collision resolution of LilyPond, you
2594 can override the horizontal shift value of the chord of one Voice, by
2595 setting @code{forceHorizontalShift}. This sets the amount shift,
2596 measured in black note head widths.
2598 To take complete control of note position shifts in complex passages,
2599 you have set things up for normal collisions and override all shifts by
2600 setting @code{forceHorizontalShift} to zero everywhere
2602 \property Voice.horizontalNoteShift = <n>
2603 \property Voice.forceHorizontalShift = "0.0"
2606 Then you can set the force property to a suitable value before each note
2607 that really needs it (unisons and seconds), and reset it to 0.0 after
2610 @item @code{horizontalNoteShift}@indexcode{horizontalNoteShift} @propertytype{integer}
2611 Enable LilyPond to shift notes horizontally if they collide with
2612 other notes. This is useful when typesetting many voices on one
2613 staff. The identifier @code{\shift}@keyindex{shift} is defined to
2614 enable this. Traditionally, the outer chords (the upmost and
2615 downmost voices), should have no @code{horizontalNoteShift}.
2617 @item @code{markScriptPadding}@indexcode{markScriptPadding} @propertytype{number}
2618 Determines the extra space added between the mark and the closest
2621 @item @code{markDirection}@indexcode{markDirection} @propertytype{direction}
2622 Determines if marks should be printed above or below the staff.
2623 Set to @code{\up} to print marks above the staff; set to
2624 @code{\down} to print marks below the staff.
2626 @item @code{midiInstrument}@indexcode{midiInstrument} @propertytype{string}
2627 Sets the instrument for MIDI output. If this property is not set
2628 then LilyPond will use the @code{instrument} property. This must
2629 be set to one of the strings on the list of MIDI instruments that
2630 appears in section XREF-midilist [FIXME]. If you use a string which
2631 is not listed, LilyPond will silently substitute piano.
2633 @item @code{restStyle}@indexcode{restStyle} @propertytype{string}
2634 Change the layout of rests shorter than quarter notes.
2635 Currently, the standard layout @code{""} and mensural notation
2636 @code{"mensural"} are available. Mensural rests of duration
2637 32 or shorter are not available.
2639 r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
2640 \property Staff.restStyle = "mensural"
2641 r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
2644 @item @code{scriptHorizontal}@indexcode{scriptHorizontal} @propertytype{boolean}
2645 Put scripts left or right of note heads. Support for this is
2646 limited. Accidentals will collide with scripts.
2648 @item @code{slurVerticalDirection}@indexcode{slurVerticalDirection} @propertytype{direction}
2649 Set to @code{\free} for free choice of slur direction, set to
2650 @code{\up} to force slurs up, set to @code{\down} to force slurs
2651 down. The shorthands @code{\slurup}@keyindex{slurup},
2652 @code{\slurdown}@keyindex{slurdown}, and
2653 @code{\slurboth}@keyindex{slurboth} are available.
2655 @item @code{slurDash}@indexcode{slurDash} @propertytype{number}
2656 Set to NIL for normal slurs, 1 for dotted slurs, and a
2657 larger value for dashed slurs. Identifiers
2658 @code{\slurnormal}@keyindex{slurnormal} and
2659 @code{\slurdotted}@keyindex{slurdotted} are predefined to set the
2664 \property Voice.slurDash = 3
2668 @item @code{stemLength}@indexcode{stemLength}
2669 Set length of stems. Unit is `@code{interline}/2', so
2670 @code{stemLength} defaults to 7.
2672 g''4 \property Voice.stemLength = #14 g4 \property Voice.stemLength = #3 g4 g,,4
2675 @item @code{stemLeftBeamCount}@indexcode{stemLeftBeamCount} @propertytype{integer}
2676 Specify the number of beams to draw on the left side of the next
2677 note. Overrides automatic beaming. The value is only used once,
2678 and then it is erased.
2680 @item @code{stemRightBeamCount}@indexcode{stemRightBeamCount} @propertytype{integer}
2681 Specify the number of beams to draw on the right side of the next
2682 note. Overrides automatic beaming. The value is only used once,
2683 and then it is erased.
2685 @item @code{tieDash}@indexcode{tieDash} @propertytype{integer}
2686 Set dashing of ties. See also @code{slurDash}
2688 @item @code{tieVerticalDirection}@indexcode{tieVerticalDirection} @propertytype{direction}
2689 Set to @code{\free} for free choice of tie direction, set to
2690 @code{\up} to force ties up, set to @code{\down} to force ties
2693 @item @code{transposing}@indexcode{transposing} @propertytype{integer}
2694 Transpose the MIDI output. Set this property to the number of
2695 half-steps to transpose by.
2697 @item @code{textEmptyDimension}@indexcode{textEmptyDimension} @propertytype{boolean}
2698 If set to true then text placed above or below the staff is
2699 assumed to have zero width. @code{fatText} and @code{emptyText}
2700 are predefined settings.
2703 c4^"foo" \emptyText c4^"foo" c4
2706 @item @code{textStyle}@indexcode{textStyle} @propertytype{string}
2707 Set the text style for superscripts and subscripts. See above
2708 for list of text styles.
2710 @item @code{textScriptPadding}@indexcode{textScriptPadding} @propertytype{number}
2711 Determines the extra space added between superscripted resp.
2712 subscripted text and the closest staff line or note.
2714 @item @code{verticalDirection}@indexcode{verticalDirection} @propertytype{direction}
2715 Determines the direction of stems, subscripts, beams, slurs, and
2716 ties. Set to @code{\down} to force them down, @code{\up} to force
2717 them up, or @code{\free} to let LilyPond decide. This can be used
2718 to distinguish between voices on the same staff. The
2719 @code{\stemdown}@keyindex{stemdown}, @code{\stemup}@keyindex{stemup},
2720 and @code{\stemboth}@keyindex{stemboth} identifiers set this
2724 @item @code{tupletDirection}@indexcode{tupletDirection} @propertytype{direction}
2725 Determines the direction of triplets and other tuplets. Set to
2726 @code{\down} to force them below the staff, @code{\up} to force
2727 them above, or @code{\free} to let LilyPond decide.
2729 @item @code{tupletBracketVisibility}@indexcode{tupletBracketVisibility} @propertytype{boolean} or @propertytype{symbol}
2730 @item @code{tupletNumberVisibility}@indexcode{tupletNumberVisibility} @propertytype{boolean} or @propertytype{symbol}
2732 These properties the visibility of the tuplet bracket and its
2733 number respectively. Setting it to false will prevent printing of the
2734 associated element. Setting the property to 'if-no-beam will make it
2735 print only if there is no beam associated with this tuplet bracket.
2739 @item @code{tupletInvisible}@indexcode{tupletInvisible} @propertytype{boolean}
2741 If set to true, tuplet bracket creation is switched off
2742 entirely. This has the same effect as setting both
2743 @code{tupletNumberVisibility} and @code{tupletBracketVisibility} to
2744 @code{#f}, but as this does not even create elements, this setting
2745 uses less memory and time.
2748 @item @code{tupletSpannerDuration} @indexcode{tupletSpannerDuration}
2749 @propertytype{moment}
2751 Normally a tuplet bracket is as wide as the
2752 @code{\times} expression that gave rise to it. By setting this
2753 property, you can make brackets last shorter. Example
2755 @mudela[verbatim,fragment]
2756 \context Voice \times 2/3 {
2757 \property Voice.tupletSpannerDuration = #(make-moment 1 4)
2764 @subsubheading Staff properties
2766 @cindex properties!Staff
2770 @item @code{barNonAuto}@indexcode{barNonAuto} @propertytype{boolean}
2771 If set to true then bar lines will not be printed
2772 automatically; they must be explicitly created with @code{\bar}
2773 keywords. Unlike with the @code{\cadenza} keyword, measures are
2774 still counted. Bar generation will resume according to that
2775 count if this property is set to zero.
2777 @item @code{barNumberDirection}@indexcode{barNumberDirection} @propertytype{direction}
2778 Set to @code{\up} or @code{\down} to put bar numbers above or below
2781 @item @code{barNumberScriptPadding}@indexcode{barNumberScriptPadding}
2782 Sets extra space between the bar number and the bar it labels.
2784 @item @code{barSize}@indexcode{barSize}
2785 Specify the height of the bar lines if it should be different
2786 than the staff height.
2788 c1 c1 \property Staff.barSize = 20 c1 c1
2791 @item @code{barAtLineStart}@indexcode{barAtLineStart} @propertytype{boolean}
2792 Set to true to produce a bar line after the clef at the start
2793 of each line (but not at the beginning of the music).
2797 @item @code{clefStyle}@indexcode{clefStyle} @propertytype{string}
2798 Determines how clefs are typeset. If set to @code{transparent},
2799 the clefs are not printed at all, if set to
2800 @code{fullSizeChanges}, clef changes in the middle of a line are
2801 typeset with a full size clef. By default, clef changes are
2802 typeset in smaller size.
2804 @item @code{supportedClefTypes}@indexcode{supportedClefTypes} @propertytype{alist}
2806 Clef settings supported. The value is an association list clef
2807 descriptions indexed by clef name (alto, baritone, etc.). A clef
2808 description is a list with the glyph name, and the staff position
2809 where it should go. For internal use.
2811 @item @code{clefPitches}@indexcode{clefPitches} @propertytype{alist}
2812 Settings for the position of the central C, relative to this clef
2813 symbol. For internal use.
2815 @item @code{defaultClef}@indexcode{defaultClef} @propertytype{string}
2816 Clef setting to use when this context is created. If unset,
2817 no clef is printed upon creation.
2819 @item @code{marginDirection}@indexcode{marginDirection} @propertytype{direction}
2820 Set to @code{\left} or @code{\right} to specify location of
2823 @item @code{marginScriptPadding}@indexcode{marginScriptPadding}
2824 Specify extra space for marginal scripts.
2826 @item @code{forgetAccidentals}@indexcode{forgetAccidentals} @propertytype{boolean}
2827 Causes accidentals to be printed at every note instead of
2828 remembered for the duration of a measure.
2830 @item @code{noResetKey}@indexcode{noResetKey} @propertytype{boolean}
2831 Do not reset the key at the start of a measure. Accidentals will
2832 be printed only once and are in effect until overridden, possibly
2833 many measures later.
2835 @item @code{staffSpace}@indexcode{staffLineLeading} @propertytype{number}
2836 Specifies the distance (in points) between lines of the staff.
2838 @item @code{numberOfStaffLines}@indexcode{numberOfStaffLines} @propertytype{integer}
2839 Specifies the number of staff lines. The default is 5.
2841 @item @code{postBreakPadding}@indexcode{postBreakPadding} @propertytype{number}
2842 Extra space in points to be added after the clef, time signature
2843 and key signature on the staff. Deprecated, do not use.
2845 @item @code{noVoltaBraces}@indexcode{noVoltaBraces} @propertytype{boolean}
2846 Set to true to suppress the printing of brackets over alternate
2847 endings specified by the command @code{\alternative}.
2850 @item @code{barAlways}@indexcode{barAlways} @propertytype{boolean}
2851 If set to true a bar line is drawn after each note.
2853 @item @code{defaultBarType}@indexcode{defaultBarType} @propertytype{string}
2854 Sets the default type of bar line. See Section XREF-barlines [FIXME]
2855 for a list of available bar types.
2857 @item @code{instrument}, @code{instr} @propertytype{string}
2858 @indexcode{instrument}@indexcode{instr}
2859 If @code{Instrument_name_engraver}
2860 @cindex Instrument_name_engraver
2862 added to the Staff translator, then the @code{instrument} property
2863 is used to label the first line of the staff and the @code{instr}
2864 property is used to label subsequent lines. If the
2865 @code{midiInstrument} property is not set, then @code{instrument}
2866 is used to determine the instrument for MIDI output.
2868 @item @code{keyOctaviation}@indexcode{keyOctaviation} @propertytype{boolean}
2869 If set to false, then keys are the same in all octaves. If set
2870 to true then the key signature for different octaves can be
2871 different and is specified independently:
2874 \keysignature bes fis'
2877 The default value is @code{#f}. Can be set to @code{#t} with
2878 @code{\specialkey} or reset with @code{\normalkey}.
2880 @item @code{timeSignatureStyle}@indexcode{timeSignatureStyle} @propertytype{string}
2881 Changes the default two-digit layout for time signatures. The
2882 following values are recognized:
2885 @item @code{C}@indexcode{C}
2886 4/4 and 2/2 are typeset as C and struck C, respectively. All
2887 other time signatures are written with two digits.
2889 @item @code{old}@indexcode{old}
2890 2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and 9/8 are
2891 typeset with old-style mensuration marks. All other time
2892 signatures are written with two digits.
2894 @item @code{1}@indexcode{1}
2895 All time signatures are typeset with a single
2896 digit, e.g. 3/2 is written as 3.
2898 @item @indexcode{CM/N}@code{C}@var{M}@code{/}@var{N},
2899 @indexcode{oldM/N}@code{old}@var{M}@code{/}@var{N} or
2900 @code{old6/8alt}@indexcode{old6/8alt}
2901 Tells LilyPond to use a specific symbol as time signature.
2904 The different time signature characters are shown below with its
2907 @mudela[center,verbatim]
2910 \notes\relative c'' {
2911 \property Voice.textStyle = typewriter
2912 \property Staff.timeSignatureStyle = "C2/2"
2913 \time 2/2; a2^"C2/2" a2
2914 \property Staff.timeSignatureStyle = "C4/4"
2915 \time 2/2; a2^"C4/4" a2
2916 \property Staff.timeSignatureStyle = "old2/2"
2917 \time 2/2; a2^"old2/2" a2
2918 \property Staff.timeSignatureStyle = "old3/2"
2919 \time 2/2; a2^"old3/2" a2
2920 \property Staff.timeSignatureStyle = "old2/4"
2921 \time 2/2; a2^"old2/4" a2
2922 \property Staff.timeSignatureStyle = "old4/4"
2923 \time 2/2; a2^"old4/4" a2
2924 \property Staff.timeSignatureStyle = "old6/4"
2925 \time 2/2; a2^"old6/4" a2
2926 \property Staff.timeSignatureStyle = "old9/4"
2927 \time 2/2; a2^"old9/4" a2
2928 \property Staff.timeSignatureStyle = "old4/8"
2929 \time 2/2; a2^"old4/8" a2
2930 \property Staff.timeSignatureStyle = "old6/8"
2931 \time 2/2; a2^"old6/8" a2
2932 \property Staff.timeSignatureStyle = "old6/8alt"
2933 \time 2/2; a2^"old6/8alt" a2
2934 \property Staff.timeSignatureStyle = "old9/8"
2935 \time 2/2; a2^"old9/8" a2
2938 linewidth = 4.5 \in;
2944 @item @code{voltaSpannerDuration}@indexcode{voltaSpannerDuration} @propertytype{moment}
2945 Set to an integer to control the size of the brackets printed by
2946 @code{\alternative}. The integer specifies the number of whole
2947 notes duration to use for the brackets. It is rounded to the
2948 nearest measure. This can be used to shrink the length of
2949 brackets in the situation where one alternative is very large.
2950 It may have odd effects if the specified duration is longer than
2951 the music given in an @code{\alternative}.
2954 @subsubheading GrandStaff properties
2956 @cindex properties!GrandStaff
2959 @item @code{maxVerticalAlign}@indexcode{maxVerticalAlign} @propertytype{number}
2960 Set the maximum vertical distance between staffs.
2962 @item @code{minVerticalAlign}@indexcode{minVerticalAlign} @propertytype{number}
2963 Set the minimum vertical distance between staffs.
2966 @subsubheading Score properties
2968 @cindex properties!Score
2974 @item @code{skipBars}@indexcode{skipBars} @propertytype{boolean}
2975 Set to 1 to skip the empty bars that are produced by
2976 multimeasure notes and rests. These bars will not appear on the
2977 printed output. Set to zero (the default) to expand multimeasure
2978 notes and rests into their full length, printing the appropriate
2979 number of empty bars so that synchronization with other voices is
2984 @mudela[fragment,verbatim,center]
2985 r1 r1*3 R1*3\property Score.skipBars=1 r1*3 R1*3
2990 @item @code{breakAlignOrder}@indexcode{breakAlignOrder} @propertytype{list of string}
2992 Defines the order in which prefatory matter (clefs, key signatures) appears, eg. this puts the key signatures after the bar lines:
2994 \property Score.breakAlignOrder = #'(
3005 @item @code{timing}@indexcode{timing} @propertytype{boolean}
3006 Keep administration of measure length, position, bar number, etc?
3007 Switch off for cadenzas.
3009 @item @code{currentBarNumber}@indexcode{currentBarNumber} @propertytype{integer}
3010 Contains the current barnumber. This property is incremented at
3013 @item @code{measurePosition}@indexcode{measurePosition} @propertytype{Moment}
3015 How much of the current measure (measured in whole notes) have we had?
3017 @item @code{oneBeat}@indexcode{oneBeat} @propertytype{Moment}
3019 How long does one beat in the current time signature last?
3021 @item @code{measureLength}@indexcode{measureLength} @propertytype{Moment}
3023 How long does one measure in the current time signature last?
3027 @subsubheading ChordNamesVoice properties
3029 @cindex properties!ChordNamesVoice
3032 @item @code{chordInversion}@indexcode{chordInversion} @propertytype{boolean}
3033 Determines whether LilyPond should look for chord inversions when
3034 translating from notes to chord names. Set to 1 to find
3035 inversions. The default is 0 which does not look for
3041 @node Notation output definitions
3042 @section Notation output definitions
3046 @cindex notation output
3048 @cindex output definition
3053 The most important output definition is the @code{\paper} block, for
3054 music notation. The syntax is
3058 @code{\paper @{} [@var{paperidentifier}] @var{items} @code{@}}
3061 where each of the items is one of
3064 @item An assignment. The assignment must be terminated by a
3065 semicolon. See section XREF-papervars [FIXME] for information on
3068 @item A context definition. See section XREF-contextdefs [FIXME] for
3069 more information on context definitions.
3074 A margin shape declaration. The syntax is
3078 \shape @var{indent1}@code{,} @var{width1}@code{,}
3079 @var{indent2}@code{,} @var{width2} @dots{} @code{;}
3084 Each pair of @var{indent} and @var{width} values is a dimension
3085 specifying how far to indent and how wide to make the line.
3086 The indentation and width of successive lines are specified by
3087 the successive pairs of dimensions. The last pair of
3088 dimensions will define the characeristics of all lines beyond
3089 those explicitly specified.
3091 @item A font declaration. Its syntax is
3095 @var{fontsize} @code{=} \font@keyindex{font} @var{fontname}
3098 @var{fontsize} is an integer describing the font to be used.
3099 0 is the default font. @var{fontname} is the basename of
3100 a font (usually a member of the Feta family).
3105 @cindex changing font size and paper size
3107 The Feta font provides musical symbols at six different sizes. These
3108 fonts are 11 point, 13 point, 16 point, 20 point,
3109 23 point, and 26 point. The point size of a font is the
3110 height of the five lines in a staff when displayed in the font.
3112 Definitions for these sizes are the files @file{paperSZ.ly}, where
3113 @code{SZ} is one of 11, 13, 16, 20, 23 and 26. If you include
3114 any of these files, the identifiers @code{paper_eleven},
3115 @code{paper_thirteen}, @code{paper_sixteen}, @code{paper_twenty},
3116 @code{paper_twentythree}, and @code{paper_twentysix} are defined
3117 respectively. The default @code{\paper} block is also set.
3119 To change the paper size, you must first set the
3120 @code{papersize}@indexcode{papersize} variable at top level. Set it to the strings
3121 @code{a4}, @code{letter}, or @code{legal}. After this specification,
3122 you must set the font as described above. If you want the default
3123 font, then use the 20 point font. The new paper size will not
3124 take effect if the font is not loaded and selected afterwards. Paper
3125 size selection works by loading a file named after the paper size you
3130 @cindex paper variables
3132 @node Paper variables
3133 @section Paper variables
3135 There is a large number of paper variables that are used to control
3136 details of the layout. These variables control the defaults for the
3137 entire score. Usually, they do not have to be changed; they are by
3138 default set to values that depend on the font size in use. The
3139 values are used by the graphic objects while formatting the score;
3140 they are therefore implementation dependent. Most variables are
3141 accompanied by documentation in the initalization file
3142 @file{params.ly} or @file{paperSZ.ly}, where @code{SZ} is the staff
3145 Nevertheless, here are some variables you may want to use or change:
3148 @item @code{indent}@indexcode{indent}
3149 The indentation of the first line of music.
3151 @item @code{interline}@indexcode{interline}
3152 The distance between two staff lines, calculated from the center
3153 of the lines. You should use either this or @code{rulethickness}
3154 as a unit for distances you modify.
3156 @item @code{linewidth}@indexcode{linewidth}
3157 Sets the width of the lines. If set to -1.0, a single
3158 unjustified line is produced.
3160 @item @code{output}@indexcode{output}
3161 Specifies an alternate name for the the output @file{s}.
3162 A @file{.tex}, @file{.midi} or @file{.ps} extension will be
3163 added to the string you specify.
3165 @item @code{rulethickness}@indexcode{rulethickness}
3166 Determines the thickness of staff and bar lines.
3171 @section contextdefs
3173 @cindex context definition
3175 A notation contexts is defined by the following information
3180 @item The LilyPond modules that do the actual conversion of music to
3181 notation. Each module is a so-called
3186 @item How these modules should cooperate, i.e. which ``cooperation
3187 module'' should be used. This cooperation module is a special
3190 @item What other contexts the context can contain,
3192 @item What properties are defined.
3195 A context definition has this syntax:
3199 \translator @code{@{}
3200 @var{translatorinit} @var{translatormodifierlist}
3204 @var{translatorinit} can be an identifier or of the form
3208 \type @var{typename} @code{;}
3211 @var{typename} is one of
3214 @item @code{Engraver_group_engraver}@indexcode{Engraver_group_engraver}
3215 The standard cooperation engraver.
3217 @item @code{Score_engraver}@indexcode{Score_engraver}
3218 This is cooperation module that should be in the top level context.
3220 @item @code{Grace_engraver_group}@indexcode{Grace_engraver_group}
3221 This is a special cooperation module (resembling
3222 @code{Score_engraver}) that is used to created an embedded
3226 @var{translatormodifierlist} is a list of items where each item is
3230 @item @code{\consists} @var{engravername} @code{;}
3231 Add @var{engravername} to the list of modules in this context.
3232 Section XREF-engravers [FIXME] contains an overview of the engravers
3233 available. The order of engravers added with @code{\consists} is
3236 @item @code{\consistsend} @var{engravername} @code{;}
3237 Analogous to @code{\consists}, but makes sure that
3238 @var{engravername} is always added to the end of the list of
3241 Some engraver types need to be at the end of the list; this
3242 insures they are put there, and stay there, if a user adds or
3243 removes engravers. This command is usually not needed for
3246 @item @code{\accepts} @var{contextname} @code{;}
3247 Add @var{contextname} to the list of context this context can
3248 contain. The first listed context the context to create by
3251 @item @code{\remove} @var{engravername} @code{;}
3252 Remove a previously added (with @code{\consists}) engraver.
3254 @item @code{\name} @var{contextname} @code{;}
3255 This sets name of the context, e.g. @code{Staff}, @code{Voice}. If
3256 the name is not specified, the translator won't do anything.
3258 @item @var{propname} @code{=} @var{value} @code{;}
3259 A property assignment. It is allowed to use reals for
3263 In the @code{\paper} block, it is also possible to define translator
3264 identifiers. Like other block identifiers, the identifier can only
3265 be used as the very first item of a translator. In order to define
3266 such an identifier outside of @code{\score}, you must do
3272 foo = \translator @{ @dots{} @}
3279 \translator @{ \foo @dots{} @}
3287 @cindex paper types, engravers, and pre-defined translators
3289 Some pre-defined identifiers can simplify modification of
3290 translators. The pre-defined identifiers are:
3293 @item @code{StaffContext}@indexcode{StaffContext}
3294 Default Staff context.
3296 @item @code{RhythmicStaffContext}@indexcode{RhythmicStaffContext}
3297 Default RhythmicStaff context.
3299 @item @code{VoiceContext}@indexcode{VoiceContext}
3300 Default Voice context.
3302 @item @code{ScoreContext}@indexcode{ScoreContext}
3303 Default Score context.
3305 @item @code{ScoreWithNumbers}@indexcode{ScoreWithNumbers}
3306 Score context with numbering at the Score level.
3308 @item @code{BarNumberingStaffContext}@indexcode{BarNumberingStaffContext}
3309 Staff context with numbering at the Staff level.
3311 @item @code{HaraKiriStaffContext}@indexcode{HaraKiriStaffContext}
3312 Staff context that does not print if it only contains rests.
3313 Useful for orchestral scores.@footnote{Harakiri, also called
3314 Seppuku, is the ritual suicide of the Samourai.}
3316 @item @code{OrchestralPartStaffContext}@indexcode{OrchestralPartStaffContext}
3318 @item @code{OrchestralScoreContext}@indexcode{OrchestralScoreContext}
3321 Using these pre-defined values, you can remove or add items to the
3330 \remove Some_engraver;
3331 \consists Different_engraver;
3343 The engravers for paper output are:
3348 @item @code{Bar_engraver}@indexcode{Bar_engraver}
3349 Engraves bar lines. Normally in @code{Staff} and
3350 @code{RhythmicStaff}.
3352 @item @code{Bar_number_engraver}@indexcode{Bar_number_engraver}
3353 Engrave bar numbers. These numbers appear at the start of each
3354 line. Not normally in any translator. Can be added to
3355 @code{Score} for score-wide numbering or to @code{Staff} for
3356 numbering on each staff.
3358 @item @code{Beam_engraver}@indexcode{Beam_engraver}
3359 Handles beam requests by engraving beams. Normally appears in
3360 the @code{Voice} translator. If omitted, then notes will be
3361 printed with flags instead of beams.
3363 @item @code{Beam_req_swallow_translator}
3364 @indexcode{Beam_req_swallow_translator}
3365 Swallows beam requests. In @code{LyricVoice}.
3367 @item @code{Chord_name_engraver}@indexcode{Chord_name_engraver}
3368 Engraves chord names. Normally in @code{ChordNameVoice} .
3370 @item @code{Chord_tremolo_engraver}@indexcode{Chord_tremolo_engraver}
3372 @item @code{Clef_engraver}@indexcode{Clef_engraver}
3373 Engraves the clef symbol. Normally in @code{Staff}.
3375 @item @code{Collision_engraver}@indexcode{Collision_engraver}
3377 @item @code{Dot_column_engraver}@indexcode{Dot_column_engraver}
3378 Engraves dots on dotted notes shifted to the right of the note.
3379 Normally in @code{Voice}. If omitted, then dots appear on top of
3382 @item @code{Dynamic_engraver}@indexcode{Dynamic_engraver}
3383 Engraves dynamics symbols. Normally in @code{Voice}.
3385 @item @code{Font_size_engraver}@indexcode{Font_size_engraver}
3387 @item @code{Key_engraver}@indexcode{Key_engraver}
3388 Engraves the key signature. Normally in @code{Staff}.
3390 @item @code{Local_key_engraver}@indexcode{Local_key_engraver}
3392 @item @code{Lyric_engraver}@indexcode{Lyric_engraver}
3393 Engraves lyrics. Normally in @code{LyricVoice}.
3395 @item @code{Multi_measure_rest_engraver}
3396 @indexcode{Multi_measure_rest_engraver}
3397 Engraves multi-measure rests that are produced with @code{R}.
3398 Normally in @code{Voice}.
3400 @item @code{Piano_bar_engraver}@indexcode{Piano_bar_engraver}
3402 @item @code{Pitch_squash_engraver}@indexcode{Pitch_squash_engraver}
3403 Treat all pitches as middle C. Used in @code{RhythmicStaff}.
3404 Note that the notes move, but the locations of accidentals stay
3407 @item @code{Priority_horizontal_align_engraver}
3408 @indexcode{Priority_horizontal_align_engraver}
3410 @item @code{Repeat_engraver}@indexcode{Repeat_engraver}
3411 Handles repeats? In @code{Staff} and @code{RhythmicStaff}.
3413 @item @code{Rest_collision_engraver}@indexcode{Rest_collision_engraver}
3414 Handles collisions of rests. In @code{Staff}.
3416 @item @code{Rest_engraver}@indexcode{Rest_engraver}
3417 Engraves rests. Normally in @code{Voice}.
3419 @item @code{Rhythmic_column_engraver}@indexcode{Rhythmic_column_engraver}
3421 @item @code{Score_priority_engraver}@indexcode{Score_priority_engraver}
3423 @item @code{Script_engraver}@indexcode{Script_engraver}
3424 Handles note ornaments generated by @code{\script}. Normally in
3427 @item @code{Separating_line_group_engraver}
3428 @indexcode{Separating_line_group_engraver}
3430 @item @code{Skip_req_swallow_translator}
3431 @indexcode{Skip_req_swallow_translator}
3433 @item @code{Slur_engraver}@indexcode{Slur_engraver}
3434 Engraves slurs. Normally in @code{Voice}.
3436 @item @code{Span_bar_engraver}@indexcode{Span_bar_engraver}
3437 Engraves lines across multiple staffs. Normally in
3438 @code{Staffgroup} and @code{GrandStaff}. Removing this from
3439 @code{StaffGroup} gives the definition of @code{ChoirStaff}.
3441 @item @code{Span_score_bar_engraver}@indexcode{Span_score_bar_engraver}
3443 @item @code{Staff_group_bar_engraver}@indexcode{Staff_group_bar_engraver}
3445 @item @code{Instrument_name_engraver}@indexcode{Instrument_name_engraver}
3446 Prints the name of the instrument (specified by
3447 @code{Staff.instrument} and @code{Staff.instr}) at the left of the
3450 @item @code{Staff_sym_engraver}@indexcode{Staff_sym_engraver}
3452 @item @code{Stem_engraver}@indexcode{Stem_engraver}
3453 Engraves stems. Normally in @code{Voice}.
3455 @item @code{Ties_engraver}@indexcode{Ties_engraver}
3456 Engraves ties. Normally in @code{Voice}.
3458 @item @code{Time_signature_engraver}@indexcode{Time_signature_engraver}
3459 Engraves the time signature. Normally in @code{Staff} and
3460 @code{RhythmicStaff}.
3462 @item @code{Timing_engraver}@indexcode{Timing_engraver}
3463 Responsible for synchronizing timing information from staffs.
3464 Normally in @code{Score}. In order to create polyrhythmic music,
3465 this engraver should be removed from @code{Score} and placed in
3468 @item @code{Tuplet_engraver}@indexcode{Tuplet_engraver}
3469 Engraves tuplet brackets? In @code{Staff}.
3471 @item @code{Vertical_align_engraver}@indexcode{Vertical_align_engraver}
3477 @section Sound output
3481 The MIDI block is analogous to the paper block, but it is simpler.
3482 The @code{\midi} block can contain:
3486 @item a @code{\tempo} definition
3487 @item context definitions
3490 Assignments in the @code{\midi} block are not allowed.
3494 @cindex context definition
3496 Context definitions follow precisely the same syntax as within the
3497 \paper block. Translation modules for sound are called performers.
3498 The contexts for MIDI output are defined in @file{ly/performer.ly}.
3502 @cindex MIDI instrument names
3507 The MIDI instrument name is set by the
3508 @code{Staff.midiInstrument}@indexcode{Staff.midiInstrument} property or,
3509 if that property is not set, the
3510 @code{Staff.instrument}@indexcode{Staff.instrument} property. The
3511 instrument name should be chosen from the following list. If the
3512 selected string does not exactly match, then LilyPond uses the default
3518 "acoustic grand" "contrabass" "lead 7 (fifths)"
3519 "bright acoustic" "tremolo strings" "lead 8 (bass+lead)"
3520 "electric grand" "pizzicato strings" "pad 1 (new age)"
3521 "honky-tonk" "orchestral strings" "pad 2 (warm)"
3522 "electric piano 1" "timpani" "pad 3 (polysynth)"
3523 "electric piano 2" "string ensemble 1" "pad 4 (choir)"
3524 "harpsichord" "string ensemble 2" "pad 5 (bowed)"
3525 "clav" "synthstrings 1" "pad 6 (metallic)"
3526 "celesta" "synthstrings 2" "pad 7 (halo)"
3527 "glockenspiel" "choir aahs" "pad 8 (sweep)"
3528 "music box" "voice oohs" "fx 1 (rain)"
3529 "vibraphone" "synth voice" "fx 2 (soundtrack)"
3530 "marimba" "orchestra hit" "fx 3 (crystal)"
3531 "xylophone" "trumpet" "fx 4 (atmosphere)"
3532 "tubular bells" "trombone" "fx 5 (brightness)"
3533 "dulcimer" "tuba" "fx 6 (goblins)"
3534 "drawbar organ" "muted trumpet" "fx 7 (echoes)"
3535 "percussive organ" "french horn" "fx 8 (sci-fi)"
3536 "rock organ" "brass section" "sitar"
3537 "church organ" "synthbrass 1" "banjo"
3538 "reed organ" "synthbrass 2" "shamisen"
3539 "accordion" "soprano sax" "koto"
3540 "harmonica" "alto sax" "kalimba"
3541 "concertina" "tenor sax" "bagpipe"
3542 "acoustic guitar (nylon)" "baritone sax" "fiddle"
3543 "acoustic guitar (steel)" "oboe" "shanai"
3544 "electric guitar (jazz)" "english horn" "tinkle bell"
3545 "electric guitar (clean)" "bassoon" "agogo"
3546 "electric guitar (muted)" "clarinet" "steel drums"
3547 "overdriven guitar" "piccolo" "woodblock"
3548 "distorted guitar" "flute" "taiko drum"
3549 "guitar harmonics" "recorder" "melodic tom"
3550 "acoustic bass" "pan flute" "synth drum"
3551 "electric bass (finger)" "blown bottle" "reverse cymbal"
3552 "electric bass (pick)" "skakuhachi" "guitar fret noise"
3553 "fretless bass" "whistle" "breath noise"
3554 "slap bass 1" "ocarina" "seashore"
3555 "slap bass 2" "lead 1 (square)" "bird tweet"
3556 "synth bass 1" "lead 2 (sawtooth)" "telephone ring"
3557 "synth bass 2" "lead 3 (calliope)" "helicopter"
3558 "violin" "lead 4 (chiff)" "applause"
3559 "viola" "lead 5 (charang)" "gunshot"
3560 "cello" "lead 6 (voice)"
3566 @cindex MIDI types and performers
3568 The types available for MIDI translators are:
3571 @item @code{Performer_group_performer}@indexcode{Performer_group_performer}
3572 @item @code{Score_performer}@indexcode{Score_performer}
3573 @item @code{Staff_performer}@indexcode{Staff_performer}
3576 The performers for MIDI translators are:
3579 @item @code{Key_performer}@indexcode{Key_performer}
3580 @item @code{Time_signature_performer}@indexcode{Time_signature_performer}
3581 @item @code{Note_performer}@indexcode{Note_performer}
3582 @item @code{Lyric_performer}@indexcode{Lyric_performer}
3583 @item @code{Swallow_performer}@indexcode{Swallow_performer}
3588 @node Pre-defined Identifiers
3590 @section Pre-defined Identifiers
3592 @cindex pre-defined identifiers
3595 Various identifiers are defined in the initialization files to
3596 provide shorthands for some settings. Most of them are in
3597 @file{ly/declarations.ly}.
3600 @item @code{\break}@keyindex{break}
3601 Force a line break in music by using a large argument for the
3602 keyword @code{\penalty}.
3604 @item @code{\center}@keyindex{center}
3605 Used for setting direction properties. Equals 0.
3607 @item @code{\down}@keyindex{down}
3608 Used for setting direction setting properties. Is equal
3611 @item @code{\free}@keyindex{free}
3612 Used for setting direction setting properties. Is equal
3615 @item @code{\left}@keyindex{left}
3616 Used for setting text alignment property. Is equal to -1.
3618 @item @code{\nobreak}@keyindex{nobreak}
3619 Prevent a line break in music by using a large negative argument
3620 for the keyword @code{\penalty}.
3622 @item @code{\none}@keyindex{none}
3623 Used for setting @code{Score.beamslopedamping} and
3624 @code{Score.beamquantisation} properties. Is equal to 0.
3626 @item @code{\normal}@keyindex{normal}
3627 Used for setting @code{Score.beamslopedamping} and
3628 @code{Score.beamquantisation} properties. Is equal to 1.
3630 @item @code{\normalkey}@keyindex{normalkey}
3631 Select normal key signatures where each octave has the same key
3632 signature. This sets the @code{Staff.keyoctaviation} property.
3634 @item @code{\right}@keyindex{right}
3635 Used for setting text alignment property. Is set to 1.
3637 @item @code{\shiftoff}@keyindex{shiftoff}
3638 Disable horizontal shifting of note heads that collide. Sets the
3639 @code{Voice.horizontalNoteShift} property.
3641 @item @code{\shifton}@keyindex{shifton}
3642 Enable note heads that collide with other note heads to be
3643 shifted horiztonally. Sets the @code{Voice.horizontalNoteShift}
3646 @item @code{\slurboth}@keyindex{slurboth}
3647 Allow slurs to be above or below notes. This sets the
3648 @code{Voice.slurVerticalDirection} property.
3650 @item @code{\slurdown}@keyindex{slurdown}
3651 Force slurs to be below notes. This sets the
3652 @code{Voice.slurVerticalDirection} property.
3654 @item @code{\slurup}@keyindex{slurup}
3655 Force slurs to be above notes. This sets the
3656 @code{Voice.slurVerticalDirection} property.
3658 @item @code{\specialkey}@keyindex{specialkey}
3659 Allow key signatures do differ in different octaves. This sets
3660 the @code{Staff.keyoctaviation} property.
3662 @item @code{\stemboth}@keyindex{stemboth}
3663 Allow stems, beams, and slurs to point either upwards or
3664 downwards, decided automatically by LilyPond. This sets the
3665 @code{Voice.verticalDirection} property.
3667 @item @code{\stemdown}@keyindex{stemdown}
3668 Force stems, beams, and slurs to point down. This sets the
3669 @code{Voice.verticalDirection} property.
3671 @item @code{\stemup}@keyindex{stemup}
3672 Force stems, beams and slurs to point up. This sets the
3673 @code{Voice.verticalDirection} property.
3675 @item @code{\traditional}@keyindex{traditional}
3676 Used for setting the @code{Score.beamquantisation} property. Is
3679 @item @code{\up}@keyindex{up}
3680 Used for setting various direction properties. Is equal