1 \input texinfo @c -*-texinfo-*-
2 @setfilename reference-manual.info
3 @settitle LilyPond 1-2-0 Reference Manual
5 @node Top, , Running LilyPond, (dir)
8 * LilyPond 1-2-0 Reference Manual::LilyPond 1-2-0 Reference Manual
11 @macro keyindex {word}
16 @macro indexcode {word}
23 @node LilyPond 1-2-0 Reference Manual, Overview, , Top
26 * Top level:: Top level
27 * notenames:: notenames
28 * Lexical conventions:: Lexical conventions
32 * Music expressions:: Music expressions
33 * Atomic music expressions:: Atomic music expressions
34 * atomicmusic:: atomicmusic
37 * manualbeam:: manualbeam
39 * Compound music expressions:: Compound music expressions
40 * compoundmusic:: compoundmusic
42 * sec-repeats:: sec-repeats
43 * transpose:: transpose
44 * Ambiguities:: Ambiguities
45 * Notation conversion specifics:: Notation conversion specifics
47 * lyricprint:: lyricprint
48 * Notation Contexts:: Notation Contexts
49 * contextselection:: contextselection
50 * Notation output definitions:: Notation output definitions
53 * papervars:: papervars
54 * contextdefs:: contextdefs
55 * engravers:: engravers
56 * Sound output:: Sound output
58 * Pre-defined Identifiers:: Pre-defined Identifiers
60 * Running LilyPond:: Running LilyPond
62 @chapter LilyPond 1.2.0 Reference Manual
66 @node Overview, Top level, LilyPond 1-2-0 Reference Manual, LilyPond 1-2-0 Reference Manual
69 This document@footnote{This document has been revised for
70 LilyPond 1.2.} describes the the GNU LilyPond input format, which is
71 a language for defining music. We call this language @emph{Music
72 Definition Language} or @emph{Mudela}, for short.@footnote{If anybody
73 comes up with a better name, we'd gladly take this. Gourlay already
74 uses a ``Musical Description Language,'' ISO standard 10743 defines a
75 ``Standard Music Description Language.'' We're not being original
78 @emph{Mudela} is a language that allows you to
81 @item create musical expressions by combining pitches, durations
82 @item output those musical expressions to various formats
83 @item give those musical expressions and output definitions names, so
84 you can enter them in manageable chunks.
87 @emph{Mudela} aims to define a piece of music completely, both from
88 typesetting and from a performance point of view.
92 @node Top level, notenames, Overview, LilyPond 1-2-0 Reference Manual
97 This section describes what you may enter at top level.
101 @cindex score definition
103 The output is generated combining a music expression with an output
104 definition. A score block has the following syntax:
108 @code{\score @{} @var{musicexpr} @var{outputdefs} @code{@}}
111 @var{outputdefs} are zero or more output definitions. If no output
112 definition is supplied, the default @code{\paper} block will be added.
124 @code{\header} @code{@{} @var{key1} = @var{val1};
125 @var{key2} = @var{val2}; ... @code{@}}
128 A header describes the file's contents. It can also appear in a
129 @code{\score} block. Tools like @code{ly2dvi}@indexcode{ly2dvi} can use this
130 information for generating titles. Key values that are used by
131 @code{ly2dvi} are: title, subtitle, composer, opus, poet, instrument,
132 metre, arranger, piece and tagline.
134 It is customary to put the @code{\header} at the top of the file.
137 @node notenames, Lexical conventions, Top level, LilyPond 1-2-0 Reference Manual
139 Note name tables can be specified using
143 @code{\notenames}@keyindex{notenames}
144 @code{@{} @var{assignmentlist} @code{@}}
147 @var{assignmentlist} is a list of definitions of the form
151 @var{name} = @var{pitch}
154 Chord modifiers can be set analogously, with
155 @code{\chordmodifiers}@keyindex{chordmodifiers}.
159 A @code{\paper} block at top level sets the default paper block. A
160 @code{\midi} block at top level works similarly.
164 LilyPond contains a Scheme interpreter (the GUILE library) for
165 internal use. The following commands access the interpreter
170 @code{\scm}@keyindex{scm} @var{scheme} @code{;}
173 Evaluates the specified Scheme code. The result is discarded.
177 @code{\scmfile}@keyindex{scmfile} @var{filename} @code{;}
180 Reads Scheme code from the specified file. The result is discarded.
184 Identifier assignments may appear at top level. Semicolons are
185 forbidden after top level assignments.
189 @node Lexical conventions, notelang, notenames, LilyPond 1-2-0 Reference Manual
190 @section Lexical conventions
192 @cindex lexical conventions
201 A one line comment is introduced by a `@code{%}' character.
202 Block comments are started by `@code{%@{}' and ended by `@code{%@}}'.
203 They cannot be nested.
209 Keywords start with a backslash, followed by a number of lower case
210 alphabetic characters. These are all the keywords.
220 @code{\chordmodifiers}
274 Formed from an optional minus sign followed by digits. Arithmetic
275 operations cannot be done with integers, and integers cannot be mixed
283 Formed from an optional minus sign and a sequence of digits followed
284 by a @emph{required} decimal point and an optional exponent such as
285 @code{-1.2e3}. Reals can be built up using the usual operations:
286 `@code{+}@indexcode{+}', `@code{-}@indexcode{-}', `@code{*}@indexcode{*}', and
287 `@code{/}@indexcode{/}', with parentheses for grouping.
289 A real constant can be followed by one of the dimension
292 @code{\mm}@keyindex{mm},
293 @code{\pt}@keyindex{pt}, @code{\in}@keyindex{in}, or
294 @code{\cm}@keyindex{cm}, for millimeters, points, inches and
295 centimeters, respectively. This converts the number to a real that
296 is the internal representation of dimensions.
303 Begins and ends with the `@code{"}' character. To include a `@code{"}'
304 character in a string write `@code{\"}'. Various other backslash
305 sequences have special interpretations as in the C language. A
306 string that contains no spaces can be written without the quotes.
307 See section @xref{modes} for details on unquoted strings; their
308 interpretation varies depending on the situation. Strings can be
309 concatenated with the `@code{+}' operator.
313 The tokenizer accepts the following commands. They can appear
318 @code{\maininput}@keyindex{maininput}
321 This command is used in init files to signal that the user file must
322 be read. This command cannot be used in a user file.
326 @code{\include}@keyindex{include} @var{file}
329 Include @var{file}. The argument @var{file} may be a quoted string (an
330 unquoted string will not work here!) or a string identifier. The full
331 filename including the @file{.ly} extension must be given,
335 @code{\version}@keyindex{version} @var{string} @code{;}
338 Specify the version of LilyPond that a file was written for. The
339 argument is a version string in quotes, for example @code{"1.2.0"}.
340 This is used to detect invalid input, and to aid
341 @code{convert-mudela}, a tool that automatically upgrades input files.
345 @cindex other languages
347 @node notelang, modes, Lexical conventions, LilyPond 1-2-0 Reference Manual
349 Note name definitions have been provided in various languages.
350 Simply include the language specific init file. For example:
351 `@code{\include "english.ly"}'. The available language files and the
352 names they define are:
357 Note Names sharp flat
359 nederlands.ly c d e f g a bes b -is -es
360 english.ly c d e f g a bf b -s/-sharp -f/-flat
361 deutsch.ly c d e f g a b h -is -es
362 norsk.ly c d e f g a b h -iss/-is -ess/-es
363 svenska.ly c d e f g a b h -iss -ess
364 italiano.ly do re mi fa sol la sid si -d -b
365 catalan.ly do re mi fa sol la sid si -d/-s -b
370 Pitch names can be redefined using the
371 @code{\notenames}@keyindex{notenames} command, see
372 subsection @xref{notenames}.
376 @cindex lexical modes
380 @node modes, Types, notelang, LilyPond 1-2-0 Reference Manual
382 To simplify entering notes, lyrics, and chords, @emph{Mudela} has three
383 special input modes on top of the default mode. In each mode, words
384 are identified on the input. If @code{"word"} is encountered, it is
385 treated as a string. If @code{\word} is encountered, it is treated as
386 a keyword or as an identifier. The behavior of the modes differs in
387 two ways: Different modes treat unquoted words differently, and
388 different modes have different rules for deciding what is a word.
394 At the start of parsing, @emph{Mudela} is in Normal mode. In Normal
395 mode, a word is an alphabetic character followed by alphanumeric
396 characters. If @code{word} is encountered on the input it is
402 Note mode is introduced by the keyword
403 @code{\notes}@keyindex{notes}. In Note mode, words can only
404 contain alphabetic characters. If @code{word} is encountered,
405 LilyPond first checks for a notename of @code{word}. If no
406 notename is found, then @code{word} is treated as a string.
408 Since combinations of numbers and dots are used for indicating
409 durations, it is not possible to enter real numbers in this mode.
414 Chord mode is introduced by the keyword
415 @code{\chords}@keyindex{chords}. It is similar to Note mode, but
416 words are also looked up in a chord modifier table (containing
417 @code{maj}, @code{dim}, etc).
419 Since combinations of numbers and dots are used for indicating
420 durations, you can not enter real numbers in this mode. Dashes
421 and carets are used to indicate chord additions and subtractions,
422 so scripts can not be entered in Chord mode.
427 Lyrics mode is introduced by the keyword
428 @code{\lyrics}@keyindex{lyrics}. This mode has rules that make it
429 easy to include punctuation and diacritical marks in words. A
430 word in Lyrics mode begins with: an alphabetic character,
431 `@code{_}', `@code{?}', `@code{!}', `@code{:}', `@code{'}', the
432 control characters @code{^A} through @code{^F}, @code{^Q} through
433 @code{^W}, @code{^Y}, @code{^^}, any 8-bit character with ASCII code
434 over 127, or a two-character combination of a backslash followed
435 by one of `@code{`}', `@code{'}', `@code{"}', or
436 `@code{^}'.@footnote{The purpose of Lyrics mode is that you can
437 enter lyrics in TeX format or a standard encoding without
438 needing quotes. The precise definition of this mode indeed is
439 ludicrous. This will remain so until the authors of LilyPond
440 acquire a deeper understanding of character encoding, or someone
441 else steps up to fix this.}
443 Subsequent characters of a word can be any character that is not
444 a digit and not white space. One important consequence of this
445 is that a word can end with `@code{@}}', which may be confusing if
446 you thought the closing brace was going to terminate Lyrics
447 mode.@footnote{LilyPond will issue a warning, though.} Any
448 `@code{_}' characters which appear in an unquoted word are
449 converted to spaces. This provides a mechanism for introducing
450 spaces into words without using quotes. Quoted words can also be
451 used in Lyrics mode to specify words that cannot be written with
452 the above rules. Here are some examples. Not all of these words
453 are printable by TeX.
460 2B_||_!2B % not a word because it starts with a digit
461 ``Hello'' % not a word because it starts with `
462 _ _ _ _ % 4 words, each one a space
467 Since combinations of numbers and dots are used for indicating
468 durations, you can not enter real numbers in this mode.
471 It is possible to create words that break the rules by prefixing them
472 with the dollar sign `@code{$}@indexcode{$}'. Regardless of the context, a
473 word beginning with `@code{$}' extends until the next white space
474 character. Such words can contain numbers (even in Note mode), or
475 other forbidden characters. The dollar sign can be used to create
476 and access identifiers that could not otherwise be used.@footnote{Use
477 of `@code{$}' hampers readability and portability to future LilyPond
478 versions, thus the use of the dollar sign is discouraged.}
482 @node Types, Music expressions, modes, LilyPond 1-2-0 Reference Manual
485 @cindex types and identifiers
487 @emph{Mudela} has a limited set of types:
493 @item music expressions
494 @item durations of notes and rests (specified with
495 @code{\notenames}@keyindex{notenames})
496 @item note name tables
497 @item context definitions, part of output definitions. See
498 section @xref{contextdefs} for more information
499 @item output definitions (like @code{\paper}@keyindex{paper} blocks
500 and @code{\midi}@keyindex{midi} blocks)
501 @item score definitions (@code{\score}@keyindex{score} blocks)
504 Type is a syntactical property: @emph{Mudela} has no real type system,
505 so there is no support for generic expressions, functions, or user
506 defined types. For the same reason, it is not possible to mix reals
507 and integers in arithmetic expressions, and ``type
510 (e.g., using a string identifier to
511 initialize a @code{\paper}@keyindex{paper} block) will yield a ``parse
514 Identifiers allow objects to be assigned to names. To assign an
515 identifier, you use `@var{name}=@var{value}' and to refer to an
516 identifier, you preceed its name with a backslash:
517 `@code{\}@var{name}'. Identifier assignments must appear at top level
518 in the @emph{Mudela} file. Semicolons are forbidden after assignments
519 appearing at top level but they are obligatory after assignments
520 appearing in the @code{\paper} block, see Section @xref{paper}.
522 @var{value} is any of the types listed above.
524 An identifier can be created with any string for its name, but you
525 will only be able to refer to identifiers whose names begin with a
526 letter, being entirely alphanumeric. It is impossible to refer to an
527 identifier whose name is the same as the name of a keyword.
529 The right hand side of an identifier assignment is parsed completely
530 before the assignment is done, so it is allowed to redefine an
531 identifier in terms of its old value, e.g.
535 @code{foo = \foo * 2.0}
538 When an identifier is referenced, the information it points to is
539 copied. Therefore it only makes sense to put identifiers for
540 translators, output definitions, and @code{\score}@keyindex{score}
541 blocks as the first item in a block. For this reason, if you
542 reference a @code{\foo} variable in a @code{\foo} block, it must be the
543 first item in the list following @code{\foo}.@footnote{@code{\paper@{\one
544 \two@}} does not make sense, because the information of @code{\two}
545 would overwrite the information of @code{\one}, thereby making the
546 reference to the first identifier useless.}
550 @node Music expressions, Atomic music expressions, Types, LilyPond 1-2-0 Reference Manual
551 @section Music expressions
553 @cindex music expressions
555 Music in @emph{Mudela} is entered as a music expression. Notes, rests,
556 lyric syllables are music expressions (the atomic
558 @cindex atomic music expressions
559 , and you can combine
560 music expressions to form new ones. This example forms a compound
561 expressions out of the quarter @code{c} note and a @code{d}
567 \sequential @{ c4 d4 @}
572 The meaning of this compound expression is to play the `@code{c}'
573 first, and then the `@code{d}' (as opposed to playing them
574 simultaneously, for instance).
576 Atomic music expression are discussed in
577 subsection @xref{atomicmusic}. Compound music expressions are
578 discussed in subsection @xref{compoundmusic}.
582 @node Atomic music expressions, atomicmusic, Music expressions, LilyPond 1-2-0 Reference Manual
583 @section Atomic music expressions
584 @node atomicmusic, notedesc, Atomic music expressions, LilyPond 1-2-0 Reference Manual
593 The syntax for pitch specification is
597 @code{\musicalpitch}@keyindex{musicalpitch}
598 @code{@{} @var{octave} @var{note} @var{shift} @code{@}}
601 @var{octave} is specified by an integer, zero for the octave
602 containing middle C. @var{note} is a number from 0 to 7, with 0
603 corresponding to C and 7 corresponding to B. The shift is zero for a
604 natural, negative to add flats, or positive to add sharps.
606 In Note and Chord mode, pitches may be designated by names. See
607 section @xref{notelang} for pitch names in different languages.
609 The syntax for duration specification is
613 @code{\duration}@keyindex{duration}
614 @code{@{} @var{length} @var{dotcount} @code{@}}
617 @var{length} is the negative logarithm (base 2) of the duration:
618 1 is a half note, 2 is a quarter note, 3 is an eighth
619 note, etc. The number of dots after the note is given by
622 In Note, Chord, and Lyrics mode, durations may be designated by
623 numbers and dots. See Section @xref{notelang} for details.
626 @node notedesc, barlines, atomicmusic, LilyPond 1-2-0 Reference Manual
628 @cindex note specification
632 @cindex entering notes
634 A note specification has the form
638 @var{pitch}[@var{octavespec}][@code{!}][@code{?}][@var{duration}]
641 The pitch of the note is specified by the note's name.
644 The default names are the Dutch note names. The notes are specified
645 by the letters `@code{c}' through `@code{b}', where `@code{c}' is an
646 octave below middle C and the letters span the octave above that C.
647 In Dutchcindex(notenames!Dutch), a sharp is formed by adding
648 `@code{-is}' to the end of a pitch name. A flat is formed by adding
649 `@code{-es}'. Double sharps and double flats are obtained by adding
650 `@code{-isis}' or `@code{-eses}'. `@code{aes}' and `@code{ees}' are
651 contracted to `@code{as}' and `@code{es}' in Dutch, but both forms will
654 LilyPond has predefined sets of notenames for various languages. See
655 section @xref{notelang} for details.
658 The optional octave specification takes the form of a series of
659 single quote (`@code{'}@indexcode{'}') characters or a series of comma
660 (`@code{,}@indexcode{,}') characters. Each @code{'} raises the pitch by one
661 octave; each @code{,} lowers the pitch by an octave.
663 @mudela[fragment,verbatim,center]
664 c' d' e' f' g' a' b' c''
667 @mudela[fragment,verbatim,center]
668 cis' dis' eis' fis' gis' ais' bis'
671 @mudela[fragment,verbatim,center]
672 ces' des' es' fes' ges' as' bes'
675 @mudela[fragment,verbatim,center]
676 cisis' eisis' gisis' aisis' beses'
679 @mudela[fragment,verbatim,center]
680 ceses' eses' geses' ases' beses'
683 Whenever a C-sharp is desired, you must specify a C-sharp. LilyPond
684 will determine what accidentals to typeset depending on the key and
685 context. A reminder accidental
686 @cindex reminder accidental
688 forced by adding an exclamation mark `@code{!}' after the pitch. A
689 cautionary accidental,
690 @cindex cautionary accidental
692 accidental within parentheses can be obtained by adding the question
693 mark `@code{?}@indexcode{?}' after the pitch.
695 @mudela[fragment,verbatim,center]
696 cis' d' e' cis' c'? d' e' c'!
702 Durations are entered as their reciprocal values. For notes longer
703 than a whole note, use identifiers.
709 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
718 \notes \relative c'' {
720 a1 a2 a4 a8 a16 a32 a64 a64
723 loose_column_distance = 2.5 * \interline;
726 \type "Score_engraver";
728 \consists "Note_heads_engraver";
729 \consists "Stem_engraver";
730 \consists "Rhythmic_column_engraver";
741 r1 r2 r4 r8 r16 r32 r64 r64
750 \notes \relative c'' {
752 r1 r2 r4 r8 r16 r32 r64 r64
755 loose_column_distance = 2.5 * \interline;
758 \type "Score_engraver";
760 \consists "Rest_engraver";
761 \consists "Stem_engraver";
762 \consists "Rhythmic_column_engraver";
769 If the duration is omitted then it is set equal to the previous
770 duration. If there is no previous duration, a quarter note is
771 assumed. The duration can be followed by a dot (`@code{.}@indexcode{.}')
772 to obtain dotted note lengths.
774 @mudela[fragment,verbatim,center]
778 You can alter the length of duration by writing
779 `@code{*}@var{fraction}' after it. This will not affect the
780 appearance of note heads or rests.
783 Rests are entered like notes, with note name `@code{r}@indexcode{r}',
784 or `@code{R}@indexcode{R}'. There is also a note name `@code{s}@indexcode{s}',
785 which produces a space of the specified duration.
786 `@code{R}' is specifically meant for entering parts: the @code{R} rest
787 can expand to fill a score with rests, or it can be printed as a
788 single multimeasure rest.
791 @cindex lyrics expressions
793 Syllables are entered like notes, with pitches replaced by text. For
794 example, `@code{Twin-4 kle4 twin-4 kle4}' enters four syllables, each
795 with quarter note duration. Note that the hyphen has no special
796 meaning for lyrics, and does not introduce special symbols. See
797 section @xref{modes} for a description of what is interpreted as
800 Spaces can be introduced into a lyric either by using quotes
801 (`@code{"}') or by using an underscore without quotes: `@code{He_could4
802 not4}'. All unquoted underscores are converted to spaces. Printing
803 lyrics is discussed in section @xref{lyricprint}.
811 @code{\property}@keyindex{property}
812 @var{contextname}@code{.}@var{propname} @code{=} @var{value}
815 Sets the @var{propname} property of the context @var{contextname} to
816 the specified @var{value}. All three arguments are strings.
817 Depending on the context, it may be necessary to quote the strings or
818 to leave space on both sides of the dot.
822 @cindex translator switches
826 @code{\translator}@keyindex{translator}
827 @var{contexttype} = @var{name}
830 A music expression indicating that the context which is a direct
831 child of the a context of type @var{contexttype} should be shifted to
832 a context of type @var{contexttype} and the specified name.
834 Usually this is used to switch staffs in Piano music, e.g.
838 @code{\translator Staff = top} @var{Music}
845 Commands are music expressions that have no duration.
850 @code{\key}@keyindex{key} @var{pitch} @var{type} @code{;}
853 Change the key signature. @var{type} should be
854 @code{\major}@keyindex{major} or @code{\minor}@keyindex{minor} to get
855 @var{pitch}-major or @var{pitch}-minor, respectively. The second
856 argument is optional; the default is major keys. The @var{\context}
857 argument can also be given as an integer, which tells the number of
858 semitones that should be added to the pitch given in the subsequent
859 @code{\key}@keyindex{key} commands to get the corresponding major key,
860 e.g., @code{\minor}@keyindex{minor} is defined as 3. The standard
861 mode names @code{\ionian}@keyindex{ionian},
862 @code{\locrian}@keyindex{locrian}, @code{\aeolian}@keyindex{aeolian},
863 @code{\mixolydian}@keyindex{mixolydian}, @code{\lydian}@keyindex{lydian},
864 @code{\phrygian}@keyindex{phrygian}, and @code{\dorian}@keyindex{dorian}
869 @code{\keysignature}@keyindex{keysignature} @var{pitchseq} @code{;}
872 Specify an arbitrary key signature. The pitches from @var{pitch} will
873 be printed in the key signature in the order that they appear on the
879 @code{\mark}@keyindex{mark} @var{unsigned} @code{;} @*
880 @code{\mark} @var{string} @code{;}
883 Prints a mark over or under (depending on the
884 @code{markDirection}@indexcode{markDirection} property) the staff. You must add
885 @code{Mark_engraver}@indexcode{Mark_engraver} to either the Score or Staff context for
888 @node barlines, manualbeam, notedesc, LilyPond 1-2-0 Reference Manual
892 @code{\bar}@keyindex{bar} @var{bartype} @code{;}
895 This is a request to print a special bar symbol. It replaces the
896 regular bar symbol with a special
897 symbol. The argument @var{bartype} is a string which specifies the
898 kind of bar to print. Options are @code{":|"}
899 @cindex "|A@@@code{:|}
902 @cindex "|B@@@code{|:}
904 @cindex "|C@@@code{:|:}
907 @cindex "|D@@@code{||}
909 @cindex "|E@@@code{|.}
912 @cindex "|F@@@code{.|}
914 @cindex "|G@@@code{.|.}
916 These produce, respectively, a right repeat, a left repeat, a double
917 repeat, a double bar, a start bar, an end bar, and a thick double
918 bar. If @var{bartype} is set to @code{"empty"} then nothing is
919 printed, but a line break is allowed at that spot.
921 You are encouraged to use @code{\repeat} for repetitions.
922 See section @xref{sec-repeats}.
928 @code{\cadenza}@keyindex{cadenza} @var{togglevalue} @code{;}
931 Music expression that toggles the automatic generation of bar lines.
932 If @var{togglevalue} is 1, bar line generation is turned off. If
933 @var{togglevalue} is 0, a bar line is immediately printed and
934 automatic bar generation is turned on.
938 @code{\time}@keyindex{time} @var{numerator}@code{/}@var{denominator} @code{;}
941 Change the time signature. The default time signature is 4/4.
942 The time signature is used to generate bar lines.
946 @code{\tempo}@keyindex{tempo} @var{duration} = @var{perminute} @code{;}
949 Used to specify the tempo. For example, `@code{\tempo 4 = 76;}'
950 requests output with 76 quarter notes per minute.
954 @code{\partial}@keyindex{partial} @var{duration} @code{;}
961 This creates an incomplete measure (anacrusis, upbeat) at the start of
962 the music, e.g., `@code{\partial 8*2;}' creates a starting measure
963 lasting two eighth notes.
967 @code{|}@indexcode{|}
972 @cindex shorten measures
976 `@code{|}' is a barcheck. Whenever a barcheck is encountered during
977 interpretation, a warning message is issued if it doesn't fall at a
978 measure boundary. This can help you finding errors in the input.
979 The beginning of the measure will be relocated, so this can also
980 be used to shorten measures.
985 @code{\penalty}@keyindex{penalty} @var{int} @code{;}
988 Discourage or encourage line breaks. See identifiers
989 @code{\break}@keyindex{break} and @code{\nobreak}@keyindex{nobreak} in
990 section @xref{ident}.
994 @code{\clef}@keyindex{clef} @var{clefname} @code{;}
997 Music expression that sets the current clef. The argument is a
998 string which specifies the name of the clef. Several clef names are
999 supported. If `@code{_8}' or `@code{^8}' is added to the end of a clef
1000 name, then the clef lowered or raised an octave will be generated.
1001 Here are the supported clef names with middle C shown in each
1010 %\property Voice.textStyle = typewriter
1011 \clef subbass; c'4-"\kern -5mm subbass"
1012 \clef bass; c'4^"\kern -2mm bass"
1013 \clef baritone; c'4_"\kern -5mm baritone"
1014 \clef varbaritone; c'4^"\kern -6mm varbaritone"
1015 \clef tenor; c'4_"\kern -3mm tenor"
1016 \clef "G_8"; c'4^"\kern -2mm G\\_8"
1019 linewidth = 4.5 \in;
1031 \clef alto; c'4_"\kern -2mm alto"
1032 \clef mezzosoprano; c'4^"\kern -9mm mezzosoprano"
1033 \clef soprano; c'4_"\kern -6mm soprano"
1034 \clef treble; c'4^"\kern -4mm treble"
1035 \clef french; c'4_"\kern -4mm french"
1038 linewidth = 4.5 \in;
1044 The three clef symbols can also be obtained using the names `@code{G}',
1045 `@code{C}' or `@code{F}', optionally followed by an integer which
1046 indicates at which note line the clef is located. An as example, the
1047 @code{mezzosoprano} clef can also be given as `@code{C2}'.
1051 @code{\skip}@keyindex{skip} @var{duration} @code{;}
1054 Skips the amount of time specified by @var{duration}. If no other
1055 music is played, a gap will be left for the skipped time with no
1056 notes printed. It works in Note Mode or Lyrics Mode. In Note mode,
1057 this has the same effect as the space rest `@code{s}'.
1062 @node manualbeam, tremolo, barlines, LilyPond 1-2-0 Reference Manual
1064 A beam is specified by surrounding the beamed notes with brackets
1065 `@code{[}@indexcode{[}' and `@code{]}@indexcode{]}'.
1067 @mudela[fragment,verbatim,center]
1068 [a'8 a'] [a'16 a' a' a']
1071 Some more elaborate constructions:
1073 @mudela[fragment,verbatim,center]
1074 [a'16 <a' c''> c'' <a' c''>]
1075 \times 2/3 { [e'8 f' g'] }
1078 Beaming can be generated automatically; see section @xref{autobeam}.
1080 To place tremolo marks
1081 @cindex tremolo beams
1082 between two notes, begin
1083 with `@code{[:}@var{length}' and end with `@code{]}'. Tremolo marks
1084 will appear instead of beams. Putting more than two notes in such a
1085 construction will produce odd effects. To create tremolo beams on a
1086 single note, simply attach `@code{:}@var{length}' to the note itself
1087 (see also section @xref{tremolo}).
1089 @mudela[fragment,verbatim,center]
1090 [:16 e'1 g'] [:8 e'4 f']
1093 @mudela[fragment,verbatim,center]
1094 c'4:32 [:16 c'8 d'8]
1098 @cindex --@@@code{-}@code{-}
1106 The syntax for an extender mark is `@code{__}'. This syntax can only
1107 be used within lyrics mode. The syntax for a spanning hyphen (i.e.,
1108 a hyphen that will be printed between two lyric syllables) is
1114 A tie connects two adjacent note heads of the same pitch. When used
1115 with chords, it connects all of the note heads whose pitches match.
1116 Ties are indicated using the tilde symbol `@code{~}@indexcode{~}'.
1117 If you try to tie together chords which have no common pitches, a
1118 warning message will appear and no ties will be created.
1120 @mudela[fragment,verbatim,center]
1121 e' ~ e' <c' e' g'> ~ <c' e' g'>
1126 [TODO: explain Requests]
1129 @cindex articulations
1135 A variety of symbols can appear above and below notes to indicate
1136 different characteristics of the performance. These symbols can be
1137 added to a note with `@var{note}@code{-\}@var{name}'. Numerous symbols
1138 are defined in @file{script.ly} and @file{script.scm}. Symbols can be
1139 forced to appear above or below the note by writing
1140 `@var{note}@code{^\}@var{name}' and `@var{note}@code{_\}@var{name}'
1141 respectively. Here is a chart showing symbols above notes, with the
1142 name of the corresponding symbol appearing underneath.
1148 c''-\accent c''-\marcato c''-\staccatissimo c''-\fermata
1149 c''-\stopped c''-\staccato c''-\tenuto c''-\upbow
1150 c''-\downbow c''^\lheel c''-\rheel c''^\ltoe
1151 c''-\rtoe c''-\turn c''-\open c''-\flageolet
1152 c''-\reverseturn c''-\trill c''-\prall c''-\mordent
1153 c''-\prallprall c''-\prallmordent c''-\upprall c''-\downprall
1154 c''-\thumb c''-\segno c''-\coda
1156 \context Lyrics \lyrics {
1157 accent__ marcato__ staccatissimo__ fermata
1158 stopped__ staccato__ tenuto__ upbow
1159 downbow__ lheel__ rheel__ ltoe
1160 rtoe__ turn__ open__ flageolet
1161 reverseturn__ trill__ prall__ mordent
1162 prallprall__ prallmordent__ uprall__ downprall
1163 thumb__ segno__ coda
1167 linewidth = 5.875\in;
1174 In addition, it is possible to place arbitrary strings of text or
1175 TeX above or below notes by using a string instead of an
1176 identifier: `@code{c^"text"}'. Fingerings
1179 placed by simply using digits. All of these note ornaments appear in
1180 the printed output but have no effect on the MIDI rendering of the
1183 To save typing, fingering instructions (digits 0 to 9 are
1184 supported) and single characters shorthands exist for a few
1191 \property Voice.textStyle = typewriter
1197 c''4-^_"c-\\^{ }" s4
1204 linewidth = 5.875 \in;
1211 Dynamic marks are specified by using an identifier after a note:
1212 `@code{c4-\ff}' (the dash is optional for dynamics: `@code{c4 \ff})'.
1213 The available dynamic marks are:
1214 @code{\ppp}@keyindex{ppp},
1215 @code{\pp}@keyindex{pp}, @code{\p}@keyindex{p}, @code{\mp}@keyindex{mp},
1216 @code{\mf}@keyindex{mf}, @code{\f}@keyindex{f}, @code{\ff}@keyindex{ff},
1217 @code{\fff}@keyindex{fff}, @code{\fff}@keyindex{ffff},
1218 @code{\fp}@keyindex{fp}, @code{\sf}@keyindex{sf},
1219 @code{\sff}@keyindex{sff}, @code{\sp}@keyindex{sp},
1220 @code{\spp}@keyindex{spp}, @code{\sfz}@keyindex{sfz}, and
1221 @code{\rfz}@keyindex{rfz}.
1226 @code{\textscript}@keyindex{textscript} @var{text} @var{style}
1229 Defines a text to be printed over or under a note. @var{style} is a
1230 string that may be one of @code{roman}, @code{italic}, @code{typewriter},
1231 @code{bold}, @code{Large}, @code{large}, @code{dynamic} or @code{finger}.
1233 You can attach a general textscript request using this syntax:
1238 c4-\textscript "6" "finger"
1239 c4-\textscript "foo" "normal"
1244 This is equivalent to `@code{c4-6 c4-"foo"}'.
1251 @code{\script}@keyindex{script} @var{alias}
1254 Prints a symbol above or below a note. The argument is a string
1255 which points into the script-alias table defined in @file{script.scm}.
1256 The scheme definitions specify whether the symbol follows notes into
1257 the staff, dependence of symbol placement on staff direction, and a
1258 priority for placing several symbols over one note. Usually the
1259 @code{\script}@keyindex{script} keyword is not used directly. Various
1260 helpful identifier definitions appear in @file{script.ly}.
1265 Slurs connects chords and try to avoid crossing stems. A slur is
1266 started with `@code{(}' and stopped with `@code{)}'. The
1267 starting `@code{(}' appears to the right of the first note in
1268 the slur. The terminal `@code{)}' appears to the left of the
1269 first note in the slur. This makes it possible to put a note in
1270 slurs from both sides:
1272 @mudela[fragment,verbatim,center]
1273 f'()g'()a' [a'8 b'(] a'4 g'2 )f'4
1279 A crescendo mark is started with @code{\cr}@keyindex{cr} and terminated
1280 with @code{\rc}@keyindex{rc}. A decrescendo mark is started with
1281 @code{\decr}@keyindex{decr} and terminated with
1282 @code{\rced}@keyindex{rced}. There are also shorthands for these
1283 marks. A crescendo can be started with @code{\<}@keyindex{<} and a
1284 decrescendo can be started with @code{\>}@keyindex{>}. Either one can
1285 be terminated with @code{\!}@keyindex{"!}. Note that @code{\!}
1286 must go before the last note of the dynamic mark whereas @code{\rc}
1287 and @code{\rced} go after the last note. Because these marks are
1288 bound to notes, if you want to get several marks during one note, you
1289 must use spacer notes.
1291 @mudela[fragment,verbatim,center]
1292 c'' \< \! c'' d'' \decr e'' \rced
1293 < f''1 { s4 \< \! s2 \> \! s4 } >
1299 @code{\spanrequest}@keyindex{spanrequest} @var{startstop} @var{type}
1302 Define a spanning request. The @var{startstop} parameter is either -1
1303 (@code{\start}@keyindex{start}) or 1 (@code{\stop}@keyindex{stop}) and
1304 @var{type} is a string that describes what should be started.
1305 Supported types are @code{crescendo}, @code{decrescendo},
1306 @code{beam}, @code{slur}. This is an internal command. Users should
1307 use the shorthands which are defined in the initialization file
1310 You can attach a (general) span request to a note using
1312 @mudela[fragment,verbatim,center]
1313 c'4-\spanrequest \start "slur"
1314 c'4-\spanrequest \stop "slur"
1317 The slur syntax with parentheses is a shorthand for this.
1321 @cindex tremolo marks
1323 @node tremolo, Compound music expressions, manualbeam, LilyPond 1-2-0 Reference Manual
1325 Tremolo marks can be printed on a single note by adding
1326 `@code{:}[@var{length}]' after the note. The length must be at
1327 least 8. A @var{length} value of 8 gives one line across
1328 the note stem. If the length is omitted, then the last value is
1329 used, or the value of the @code{abbrev}@indexcode{abbrev} property if there was
1332 @mudela[verbatim,fragment,center]
1338 @node Compound music expressions, compoundmusic, tremolo, LilyPond 1-2-0 Reference Manual
1339 @section Compound music expressions
1341 @cindex compound music expressions
1343 @node compoundmusic, relative, Compound music expressions, LilyPond 1-2-0 Reference Manual
1345 Music expressions are compound data structures. You can nest music
1346 expressions any way you like. This simple example shows how three
1347 chords can be expressed in two different ways:
1349 @mudela[fragment,verbatim,center]
1350 \notes \context Staff {
1352 <a c'> <b d' > <c' e' >
1353 <{a b c'}{c' d' e'}>
1359 @cindex context selection
1363 @code{\context}@keyindex{context}
1364 @var{contexttype} [@code{=} @var{contextname}] @var{musicexpr}
1367 Interpret @var{musicexpr} within a context of type @var{contexttype}.
1368 If the context does not exist, it will be created. The new context
1369 can optionally be given a name. See
1370 section @xref{contextselection} and @xref{contextdefs} for more
1371 information on interpretation contexts.
1379 Mode switching keywords form compound music expressions: @code{\notes}
1380 @keyindex{notes} @var{musicexpr}, @code{\chords} @keyindex{chords}
1381 @var{musicexpr}, and @code{\lyrics} @keyindex{lyrics} @var{musicexpr}.
1382 These expressions do not add anything to the meaning of their
1383 arguments. They are just a way to indicate that the arguments should
1384 be parsed in indicated mode. See section @xref{modes} for more
1385 information on modes.
1387 More information on context selection can be found in
1388 section @xref{contextselection}.
1392 @cindex sequential music
1398 @code{\sequential}@keyindex{sequential}
1399 @code{@{} @var{musicexprlist} @code{@}}
1402 This means that list should be played or written in sequence, i.e.,
1403 the second after the first, the third after the second. The duration
1404 of sequential music is the the sum of the durations of the elements.
1405 There is a shorthand, which leaves out the keyword:
1409 @code{@{} @var{musicexprlist} @code{@}}
1414 @cindex simultaneous music
1421 @code{\simultaneous}@keyindex{simultaneous}
1422 @code{@{} @var{musicexprlist} @code{@}}
1425 It constructs a music expression where all of its arguments start at
1426 the same moment. The duration is the maximum of the durations of the
1427 elements. The following shorthand is a common idiom:
1431 @code{<} @var{musicexprlist} @code{>}
1434 If you try to use a chord as the first thing in your score, you might
1435 get multiple staffs instead of a chord.
1437 @mudela[verbatim,center]
1446 This happens because the chord is interpreted by a score context.
1447 Each time a note is encountered a default Voice context (along with a
1448 Staff context) is created. The solution is to explicitly instantiate
1451 @mudela[verbatim,center]
1453 \notes\context Voice <c''4 e''>
1462 @cindex relative pitch specification
1464 @node relative, sec-repeats, compoundmusic, LilyPond 1-2-0 Reference Manual
1466 It is easy to get confused by octave changing marks and accidentally
1467 putting a pitch in the wrong octave. A much better way of entering a
1468 note's octave is `the relative octave' mode.
1472 @code{\relative}@keyindex{relative} @var{startpitch} @var{musicexpr}
1475 The octave of notes that appear in @var{musicexpr} are calculated as
1476 follows: If no octave changing marks are used, the basic interval
1477 between this and the last note is always taken to be a fourth or
1478 less.@footnote{The interval is determined without regarding
1479 accidentals. A @code{fisis} following a @code{ceses} will be put above
1480 the @code{ceses}.} The octave changing marks `@code{'}' and `@code{,}'
1481 can then be added to raise or lower the pitch by an extra octave.
1482 Upon entering relative mode, an absolute starting pitch must be
1483 specified that will act as the predecessor of the first note of
1486 Entering scales is straightforward in relative mode.
1488 @mudela[fragment,verbatim,center]
1494 And octave changing marks are used for intervals greater than a fourth.
1496 @mudela[fragment,verbatim,center]
1498 c g c f, c' a, e'' }
1501 If the preceding item is a chord, the first note of the chord is used
1502 to determine the first note of the next chord. But other notes
1503 within the second chord are determined by looking at the immediately
1506 @mudela[fragment,verbatim,center]
1514 The pitch after the @code{\relative} contains a notename. To parse
1515 the pitch as a notename, you have to be in note mode, so there must
1516 be a surrounding @code{\notes}@keyindex{notes} keyword (which is not
1519 The relative conversion will not affect @code{\transpose} or
1520 @code{\relative} sections in its argument. If you want to use
1521 relative within transposed music, you must place an additional
1522 @code{\relative} inside the @code{\transpose}.
1524 It is strongly recommended to use relative pitch mode: less work,
1525 less error-prone, and more readable.
1529 Chord names are a way to generate simultaneous music expressions that
1530 correspond with traditional chord names. It can only be used in
1531 Chord mode (see section @xref{modes}).
1535 @var{tonic}[@var{duration}][@code{-}@var{modifiers}][@code{^}@var{subtractions}][@code{/}@var{inversion}].
1538 @var{tonic} should be the tonic note of the chord, and @var{duration}
1539 is the chord duration in the usual notation. There are two kinds of
1540 modifiers. One type is @emph{chord additions}, which are obtained by
1541 listing intervals separated by dots. An interval is written by its
1542 number with an optional `@code{+}' or `@code{-}' to indicate raising or
1543 lowering by half a step. Chord additions has two effects: It adds
1544 the specified interval and all lower odd numbered intervals to the
1545 chord, and it may lower or raise the specified interval. Intervals
1546 must be separated by a dot (`@code{.}').
1550 @mudela[fragment,verbatim]
1554 c-9 c-9-.5+.7+ c-3-.5- c-4.6.8
1561 The second type of modifier that may appear after the `@code{-}' is a
1562 named modifier. Named modifiers are listed in the file
1563 @file{chord-modifiers.ly}. The available modifiers are `@code{m}' and
1564 `@code{min}' which lower the 3rd half a step, `@code{aug}@indexcode{aug}' which
1565 raises the 5th, `@code{dim}@indexcode{dim}' which lowers the 5th,
1566 `@code{maj}@indexcode{maj}' which adds a raised 7th, and `@code{sus}@indexcode{sus}'
1567 which replaces the 5th with a 4th.
1571 @mudela[fragment,verbatim]
1574 c1-m c-min7 c-maj c-aug c-dim c-sus
1582 Chord subtractions are used to eliminate notes from a chord. The
1583 notes to be subtracted are listed after a `@code{^}' character,
1586 @mudela[fragment,verbatim,center]
1594 Chord inversions can be specified by appending `@code{/}@indexcode{/}' and
1595 the name of a single note to a chord. This has the effect of
1596 lowering the specified note by an octave so it becomes the lowest
1597 note in the chord. If the specified note is not in the chord, a
1598 warning will be printed.
1600 @mudela[fragment,verbatim,center]
1609 Throughout these examples, chords have been shifted around the staff
1610 using @code{\transpose}.
1612 You should not combine @code{\relative} with named chords.
1618 Tuplets are made out of a music expression by multiplying their
1619 duration with a fraction.
1623 @code{\times}@keyindex{times} @var{fraction} @var{musicexpr}
1626 The duration of @var{musicexpr} will be multiplied by the fraction.
1627 In print, the fraction's denominator will be printed over the notes,
1628 optionally with a bracket. The most common tuplet is the triplet in
1629 which 3 notes have the length of 2, so the notes are 2/3 of
1630 their written length:
1632 @mudela[fragment,verbatim,center]
1633 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
1642 @code{\grace}@keyindex{grace} @var{musicexpr}
1645 A grace note expression has duration 0; the next real note is
1646 assumed to be the main note.
1648 You cannot have the grace note after the main note, in terms of
1649 duration, and main notes, but you can typeset the grace notes to the
1650 right of the main note using the property
1651 @code{graceAlignPosition}@indexcode{graceAlignPosition}.
1653 When grace music is interpreted, a score-within-a-score is set up:
1654 @var{musicexpr} has its own time bookkeeping, and you could (for
1655 example) have a separate time signature within grace notes. While in
1656 this score-within-a-score, you can create notes, beams, slurs, etc.
1657 Unbeamed eighth notes and shorter by default have a slash through the
1658 stem. This behavior can be controlled with the
1659 @code{stemStyle}@indexcode{stemStyle} property.
1663 @mudela[fragment,verbatim]
1665 \grace c8 c4 \grace { [c16 c16] } c4
1666 \grace { \property Grace.stemStyle = "" c16 } c4
1672 At present, nesting @code{\grace}@keyindex{grace} notes, e.g.
1676 @code{\grace @{ \grace c32 c16 @} c4}
1679 may result in run-time errors of LilyPond. Since the meaning of such
1680 a construct is unclear, we don't consider this a loss. Similarly,
1681 juxtaposing two @code{\grace} sections is syntactically valid, but
1682 makes no sense and may cause runtime errors.
1684 Ending a staff or score with grace notes may also generate a run-time
1685 error, since there will be no main note to attach the grace notes to.
1691 @node sec-repeats, transpose, relative, LilyPond 1-2-0 Reference Manual
1693 In order to specify repeats, use the @code{\repeat}@keyindex{repeat}
1694 keyword. Since repeats look and sound differently when played or
1695 printed, there are a few different variants of repeats.
1699 Repeated music is fully written (played) out. Useful for MIDI
1703 This is the normal notation: Repeats are not written out, but
1704 alternative endings (voltas) are printed, left to right.
1707 Alternative endings are written stacked, which is useful for
1711 The syntax for repeats is
1715 @code{\repeat} @var{variant} @var{repeatcount} @var{repeatbody}
1718 If you have alternative endings, you may add
1722 @code{\alternative}@keyindex{alternative}
1723 @code{@{} @var{alternative1}
1725 @var{alternative3} ... @code{@}}
1728 where each @var{alternative} is a Music expression.
1730 Normal notation repeats are used like this:
1734 @mudela[fragment,verbatim]
1736 \repeat volta 2 { c'4 d' e' f' }
1737 \repeat volta 2 { f' e' d' c' }
1742 With alternative endings:
1746 @mudela[fragment,verbatim]
1748 \repeat volta 2 {c'4 d' e' f'}
1749 \alternative { {d'2 d'} {f' f} }
1754 Folded repeats look like this:@footnote{Folded repeats offer little
1755 more over simultaneous music. However, it is to be expected that
1756 more functionality -- especially for the MIDI backend -- will be
1761 @mudela[fragment,verbatim]
1763 \repeat fold 2 {c'4 d' e' f'}
1764 \alternative { {d'2 d'} {f' f} }
1771 @mudela[fragment,verbatim]
1775 \repeat volta 2 { e | c2 d2 | e2 f2 | }
1776 \alternative { { g4 g g } { a | a a a a | b1 } }
1783 If you don't give enough alternatives for all of the repeats, then
1784 the first alternative is assumed to be repeated often enough to equal
1785 the specified number of repeats.
1789 @mudela[fragment,verbatim]
1792 \repeat volta 3 { \partial 4; e | c2 d2 | e2 f2 | }
1793 \alternative { { g4 g g }
1794 {\partial 1; e4 e e }
1795 {\partial 1; a a a a | b1 } }
1802 It is possible to nest @code{\repeat}. This is not entirely
1803 supported: the notes will come be in the right places, but the repeat
1808 @cindex transposition of pitches
1810 @node transpose, Ambiguities, sec-repeats, LilyPond 1-2-0 Reference Manual
1812 A music expression can be transposed with
1813 @code{\transpose}@keyindex{transpose}. The syntax is
1817 @code{\transpose} @var{pitch} @var{musicexpr}
1820 This means that middle C in @var{musicexpr} is transposed to
1823 @code{\transpose} distinguishes between enharmonic pitches: both
1824 @code{\transpose cis'} or @code{\transpose des'} will transpose up half
1825 a tone. The first version will print sharps and the second version
1830 @mudela[fragment,verbatim]
1835 \transpose des'' { \key e; c d e f }
1836 \transpose cis'' { \key e; c d e f }
1842 If you want to use both @code{\transpose} and @code{\relative}, then
1843 you must use @code{\transpose} first. @code{\relative} will have no
1844 effect music that appears inside a @code{\transpose}.
1848 @cindex automatic lyric durations
1850 If you have lyrics that are set to a melody, you can import the
1851 rhythm of that melody into the lyrics using @code{\addlyrics}.
1852 @keyindex{addlyrics} The syntax for this is
1856 @code{\addlyrics} @var{musicexpr1 musicexpr2}
1859 This means that both @var{musicexpr1} and @var{musicexpr2} are
1860 interpreted, but that every non-command atomic music expression
1861 (``every syllable'') in @var{musicexpr2} is interpreted using timing
1862 of @var{musicexpr1}.
1864 If the property @code{automaticMelismata}@indexcode{automaticMelismata} is set in the
1865 context of @var{musicexpr1}, no lyrics will be put on slurred or tied
1870 @mudela[verbatim,fragment]
1873 \property Voice.automaticMelismata = "1"
1874 c8 () cis d8. e16 f2
1876 \context Lyrics \lyrics {
1882 You should use a single rhythm melody, and single rhythm lyrics (a
1883 constant duration is the obvious choice). If you do not, you will get
1884 undesired effects when using multiple stanzas:
1888 @mudela[verbatim,fragment]
1891 c8 () cis d8. e16 f2
1893 \context Lyrics \lyrics
1900 It is valid (but probably not very useful) to use notes instead of
1901 lyrics for @var{musicexpr2}.
1906 @node Ambiguities, Notation conversion specifics, transpose, LilyPond 1-2-0 Reference Manual
1907 @section Ambiguities
1911 The grammar contains a number of ambiguities.@footnote{The authors
1912 hope to resolve them at a later time.}
1915 @item The assignment
1925 can be interpreted as making a string identifier @code{\foo}
1926 containing @code{"bar"}, or a music identifier @code{\foo}
1927 containing the syllable `bar'.
1929 @item The assignment
1939 can be interpreted as making an integer identifier
1940 containing -6, or a Request identifier containing the
1941 fingering `6' (with neutral direction).
1943 @item If you do a nested repeat like
1955 then it is ambiguous to which @code{\repeat} the
1956 @code{\alternative} belongs. This is the classic if-then-else
1957 dilemma. It may be solved by using braces.
1959 @item (an as yet unidentified ambiguity :-)
1964 @node Notation conversion specifics, autobeam, Ambiguities, LilyPond 1-2-0 Reference Manual
1965 @section Notation conversion specifics
1969 @cindex automatic beam generation
1971 @node autobeam, lyricprint, Notation conversion specifics, LilyPond 1-2-0 Reference Manual
1973 By default, LilyPond will generate beams automatically. This feature
1974 can be disabled by setting the @code{Voice.noAutoBeaming}@indexcode{Voice.noAutoBeaming}
1975 property to 1. It can be overridden for specific cases by
1976 specifying explicit beams as described in
1977 section @xref{manualbeam}.
1979 A large number of Voice properties are used to decide how to generate
1980 beams. Their default values appear in @file{auto-beam-settings.ly}.
1981 In general, beams can begin anywhere, but their ending location is
1982 significant. Beams can end on a beat, or at durations specified by
1983 the @code{Voice.beamAutoEnd}@indexcode{Voice.beamAutoEnd} property. To end beams every
1984 quarter note, for example, you could set
1985 @code{Voice.beamAutoEnd}@indexcode{Voice.beamAutoEnd} equal to `@code{"1/4"}'. To end beams
1986 at every three eighth notes you would set it to `@code{"3/8"}'. The
1987 same syntax can be used to specify beam starting points using
1988 @code{Voice.beamAutoBegin}@indexcode{Voice.beamAutoBegin}.
1990 To allow different settings for different time signatures, these
1991 property names can start with `@code{time}@var{N}@code{_}@var{M}' to
1992 restrict the definition to `@var{N}@code{/}@var{M}' time. For example,
1993 to specify beams ending only for 6/8 time you would use the
1994 property @code{Voice.time6_8beamAutoEnd}. To allow different endings
1995 for notes of different durations, the duration can be tacked onto the
1996 end of the property. To specify beam endings for beams that contain
1997 32nd notes, you would use @code{Voice.beamAutoEnd_32}.
2005 @cindex printing!chord names
2007 For displaying printed chord names, use the @code{ChordNames}@indexcode{ChordNames}
2008 and @code{ChordNameVoice}@indexcode{ChordNameVoice} contexts. The chords may be entered
2009 either using the notation described above, or directly using
2014 @mudela[fragment,verbatim]
2016 \context ChordNames {
2017 \chords{a b c} \notes{<d f g> <e g b>}
2019 \context Staff \notes {
2027 LilyPond examines chords specified as lists of notes to determine a
2028 name to give the chord. By default, LilyPond will not try to
2029 identify chord inversions:
2031 @mudela[fragment,verbatim,center]
2033 \context ChordNameVoice \notes {
2036 \context Thread \notes {
2042 If you want inversions to be recognized, you must set the property
2043 @code{ChordNames.chordInversion}@indexcode{ChordNames.chordInversion}:
2045 @mudela[fragment,verbatim,center]
2047 \property Score.chordInversion = 1
2048 \context ChordNameVoice \notes {
2051 \context Thread \notes {
2061 @cindex printing!lyrics
2063 @node lyricprint, Notation Contexts, autobeam, LilyPond 1-2-0 Reference Manual
2065 Lyric syllables must be interpreted within a @code{Lyrics} context
2067 @cindex context!Lyrics
2070 Here is a full example:
2077 \notes \transpose c'' {
2079 e f g2 | e4 f g2 \bar "|.";
2081 \context Lyrics \lyrics {
2082 Va-4 der Ja- cob Va- der Ja- cob
2083 Slaapt gij nog?2 Slaapt4 gij nog?2
2091 You may want a continuous line after the syllables to show melismata.
2092 To achieve this effect, add a `@code{__}' lyric as a separate word
2093 after the lyric to be extended. This will create an extender, a line
2094 that extends over the entire duration of the lyric. This line will
2095 run all the way to the start of the next lyric, so you may want to
2096 shorten it by using a blank lyric (using `@code{_}').
2103 \notes \relative c'' {
2104 a4 () b () c () d | c () d () b () a | c () d () b () a
2106 \context Lyrics \lyrics {
2107 foo1 __ | bar2. __ _4 | baz1 __
2116 If you want to have hyphens centered between syllables (rather than
2117 attached to the end of the first syllable) you can use the special
2118 `@code{-}@code{-}' lyric as a separate word between syllables. This
2119 will result in a hyphen which length varies depending on the space
2120 between syllables, and which will be centered between the syllables.
2128 \notes \transpose c'' {
2130 e f g2 | e4 f g2 \bar "|.";
2132 \context Lyrics \lyrics {
2133 Va4 -- der Ja -- cob | Va -- der Ja -- cob |
2134 Slaapt gij nog?2 | Slaapt4 gij nog?2
2144 @node Notation Contexts, contextselection, lyricprint, LilyPond 1-2-0 Reference Manual
2145 @section Notation Contexts
2147 @cindex notation contexts
2149 Notation contexts are objects that only exist during a run of
2150 LilyPond. During the interpretation phase of LilyPond, the Music
2151 expression contained in a @code{\score} block is interpreted in time
2152 order. This is the order in which humans read, play, and write
2155 A context is an object that holds the reading state of the
2156 expression; it contains information like
2159 @item What notes are playing at this point?
2160 @item What symbols will be printed at this point?
2161 @item In what style will they printed?
2162 @item What is the current key signature, time signature, point within
2166 Contexts are grouped hierarchically: A @code{Voice} context is
2167 contained in a @code{Staff} context (because a staff can contain
2168 multiple voices at any point), a @code{Staff} context is contained in
2169 a @code{Score}, @code{StaffGroup}, or @code{ChoirStaff} context (because
2170 these can all contain multiple staffs).
2172 Contexts associated with sheet music output are called @emph{notation
2173 contexts}, those for sound output are called playing contexts.
2175 Contexts are created either manually or automatically. Initially,
2176 the top level music expression is interpreted by the top level
2177 context (the @code{Score} context). When a atomic music expression
2178 (i.e. a note, a rest, @code{\bar}, or @code{\time} commands), a nested
2179 set of contexts is created that can process these atomic expressions,
2185 \score @{ \notes < c4 > @}
2190 The sequential music, `@code{@{ c4 @}}' is interpreted by @code{Score}
2191 context. When the note `@code{c4}' itself is interpreted, a set of
2192 contexts is needed that will accept notes. The default for this is a
2193 @code{Voice} context, contained in a @code{Staff} context. Creation of
2194 these contexts results in the staff being printed.
2197 @node contextselection, Notation output definitions, Notation Contexts, LilyPond 1-2-0 Reference Manual
2201 You can also create contexts manually, and you probably have to do so
2202 if you want to typeset complicated multiple part material. If a
2203 `@code{\context} @var{name} @var{musicexpr}' expression is encountered
2204 during the interpretation phase, the @var{musicexpr} argument will be
2205 interpreted with a context of type @var{name}. If you specify a name,
2206 the specific context with that name is searched.
2208 If a context of the specified type and name can not be found, a new
2209 one is created. For example,
2215 \notes \relative c'' {
2216 c4 <d4 \context Staff = "another" e4> f
2223 In this example, the @code{c} and @code{d} are printed on the
2224 default staff. For the @code{e}, a context Staff called
2225 `@code{another}' is specified; since that does not exist, a new
2226 context is created. Within @code{another}, a (default) Voice context
2227 is created for the @code{e4}. When all music referring to a
2228 context is finished, the context is ended as well. So after the
2229 third quarter, @code{another} is removed.
2231 Almost all music expressions inherit their interpretation context
2232 from their parent. In other words, suppose that the syntax for a
2237 @code{\keyword} @var{musicexpr1} @var{musicexpr2} ...
2240 When the interpretation of this music expression starts, the context
2241 for @var{musicexpr1}, @var{musicexpr2}, etc. is that of the total
2244 Lastly, you may wonder, why this:
2250 \notes \relative c'' @{
2258 doesn't result in this:
2263 \notes \relative c'' {
2270 For the @code{c4}, a default @code{Staff} (with a contained
2271 @code{Voice}) context is created. After the @code{c4} ends, no
2272 music refers to this default staff, so it would be ended, with the
2273 result shown. To prevent this inconvenient behavior, the context to
2274 which the sequential music refers is adjusted during the
2275 interpretation. So after the @code{c4} ends, the context of the
2276 sequential music is also the default @code{Voice} context.
2277 The @code{d4} gets interpreted in the same context
2282 These are the contexts supplied with the package. They are defined
2283 in the initialization file @file{ly/engraver.ly}.
2286 @item @code{Grace}@indexcode{Grace} @*
2287 The context for handling grace notes. It is instantiated
2288 automatically when you use @code{\grace}. Basically, it is an
2289 `embedded' miniature of the Score context. Since this context
2290 needs special interaction with the rest of LilyPond, you should
2291 not explicitly instantiate it.
2293 @item @code{LyricVoice}@indexcode{LyricVoice} @*
2294 Corresponds to a voice with lyrics. Handles the printing of a
2295 single line of lyrics.
2297 @item @code{Thread}@indexcode{Thread} @*
2298 Handles note heads, and is contained in the Voice context. You
2299 have to instantiate this explicitly if you want to adjust the
2300 style of individual note heads.
2302 @item @code{Voice}@indexcode{Voice} @*
2303 Corresponds to a voice on a staff. This context handles the
2304 conversion of dynamic signs, stems, beams, super- and subscripts,
2305 slurs, ties, and rests.
2307 You have to instantiate this explicitly if you want to have
2308 multiple voices on the same staff.
2310 @item @code{ChordNamesVoice}@indexcode{ChordNamesVoice} @*
2311 A voice with chord names. Handles printing of a line of chord
2314 @item @code{ChordNames}@indexcode{ChordNames} @*
2315 Typesets chord names. Can contain @code{ChordNamesVoice}
2318 @item @code{Lyrics}@indexcode{Lyrics} @*
2319 Typesets lyrics. It can contain @code{LyricVoice} contexts.
2321 @item @code{Staff}@indexcode{Staff} @*
2322 Handles clefs, bar lines, keys, accidentals. It can contain
2323 @code{Voice} contexts.
2325 @item @code{RhythmicStaff}@indexcode{RhythmicStaff} @*
2326 A context like @code{Staff} but for printing rhythms. Pitches are
2327 ignored; the notes are printed on one line. It can contain
2328 @code{Voice} contexts.
2330 @item @code{GrandStaff}@indexcode{GrandStaff} @*
2331 Contains @code{Staff} or @code{RhythmicStaff} contexts. It adds a
2332 brace on the left side, grouping the staffs together. The bar
2333 lines of the contained staffs are connected vertically. It can
2334 contain @code{Staff} contexts.
2336 @item @code{PianoStaff}@indexcode{PianoStaff} @*
2337 Just like @code{GrandStaff} but with @code{minVerticalAlign} set
2338 equal to @code{maxVerticalAlign} so that interstaff beaming and
2339 slurring can be used.
2341 @item @code{StaffGroup}@indexcode{StaffGroup} @*
2342 Contains @code{Staff} or @code{RhythmicStaff} contexts. Adds a
2343 bracket on the left side, grouping the staffs together. The bar
2344 lines of the contained staffs are connected vertically. It can
2345 contain @code{Staff}, @code{RhythmicStaff}, @code{GrandStaff}, or
2346 @code{Lyrics} contexts.
2348 @item @code{ChoirStaff}@indexcode{ChoirStaff} @*
2349 Identical to @code{StaffGroup} except that the contained staffs
2350 are not connected vertically.
2352 @item @code{Score}@indexcode{Score} @*
2353 This is the top level notation context. No other context can
2354 contain a @code{Score} context. This context handles the
2355 administration of time signatures. It also makes sure that items
2356 such as clefs, time signatures, and key-signatures are aligned
2357 across staffs. It can contain @code{Lyrics}, @code{Staff},
2358 @code{RhythmicStaff}, @code{GrandStaff}, @code{StaffGroup}, and
2359 @code{ChoirStaff} contexts.
2361 You cannot explicitly instantiate a Score context (since it is
2362 not contained in any other context). It is instantiated
2363 automatically when an output definition (a @code{\score} or
2364 @code{\paper} block) is processed.
2369 Properties that are set in one context are inherited by all of the
2370 contained contexts. This means that a property valid for the
2371 @code{Voice} context can be set in the @code{Score} context (for
2372 example) and thus take effect in all @code{Voice} contexts.
2374 Properties can be preset within the @code{\translator} block
2375 corresponding to the appropriate context. In this case, the syntax
2380 @var{propname} @code{=} @var{value}
2383 This assignment happens before interpretation starts, so a
2384 @code{\property} expression will override any predefined settings.
2386 The @code{\property} expression will create any property you specify.
2387 There is no guarantee that a property will be used. So if you spell
2388 a property name wrong, there will be no error message.
2390 The property settings are used during the interpretation phase. They
2391 are read by the LilyPond modules where interpretation contexts are
2392 built of. These modules are called @emph{translators}. Translators for
2393 notation are called @emph{engravers}, and translators for sound are
2394 called @emph{performers}.
2396 The precise result of a property is determined by the implementation
2397 of the translator that reads them. Therefore, the result of a
2398 property can vary, since it is implementation and configuration
2401 In order to fully find out what properties are used, you must
2402 currently search the source code for calls to @code{get_property}.
2403 The rest of the section is devoted to an (incomplete) overview of
2404 available properties.
2407 @cindex properties!Lyrics
2410 @item @code{textStyle}@indexcode{textStyle} @*
2411 Set the font for lyrics. The available font choices are
2412 @code{roman}, @code{italic}, @code{bold}, @code{large}, @code{Large},
2413 @code{typewriter}, and @code{finger}. The @code{finger} font can
2414 only display numbers. Note also that you must be careful when
2415 using @code{\property} in Lyrics mode, because of the way strings
2416 are parsed. Either put quotes around the arguments to
2417 @code{\property} or be sure to leave a space on both sides of the
2422 @cindex properties!Thread
2425 @item @code{noteheadStyle}@indexcode{noteheadStyle} @*
2426 Selects type of note head. Choices are @code{cross},
2427 @code{diamond}, @code{harmonic}, @code{transparent}, and @code{""}.
2428 They are shown in that order below.
2434 \property Staff.barNonAuto = 1
2435 \property Voice.noteHeadStyle = cross
2437 \property Voice.noteHeadStyle = diamond
2439 \property Voice.noteHeadStyle = harmonic
2441 \property Voice.noteHeadStyle = transparent
2443 \property Voice.noteHeadStyle = ""
2454 @subsubheading Grace properties
2456 @cindex properties!Grace
2460 @item @code{stemStyle}@indexcode{stemStyle} @*
2461 By default set to @code{"grace"} meaning that all unbeamed
2462 notes with flags are typeset with a slash through the flag.
2463 Setting to @code{""} gives standard flags.
2467 @cindex properties!Voice
2470 @item @code{abbrev}@indexcode{abbrev} @*
2471 Set length for tremolo to be used if no length is explicitly
2474 @item @code{articulationScriptPadding}@indexcode{articulationScriptPadding}
2476 Determines the extra space added between articulation marks, such
2477 as staccato, tenuto, trill, up/down bow or fermata, and the
2478 closest staff line or note.
2480 @item @code{articulationScriptVerticalDirection}
2481 @indexcode{articulationScriptVerticalDirection} @*
2482 Determines the location of articulation marks. Set to @code{\up}
2483 to print marks above the staff; set to @code{\down} to print marks
2484 below the staff. This property does not override explicit
2485 directions marked with `@code{^}' or `@code{_}' in the mudela file.
2487 @item @code{noAutoBeaming}@indexcode{beamAuto} @*
2488 If set to 1 then beams are not generated automatically.
2490 @item @code{beamAutoEnd}@indexcode{beamAutoEnd} @*
2491 Specifies when automatically generated beams can end. See
2492 section @xref{autobeam}.
2494 @item @code{beamAutoBegin}@indexcode{beamAutoBegin} @*
2495 Specifies when automatically generated beams can start. See
2496 section @xref{autobeam}.
2498 @item @code{beamquantisation}@indexcode{beamquantisation} @*
2499 Set to @code{\none} for no quantization. Set to @code{\normal} to
2500 quantize position and slope. Set to @code{\traditional} to avoid
2501 wedges. These three settings are available via
2502 @code{\beamposfree}@keyindex{beamposfree},
2503 @code{\beamposnormal}@keyindex{beamposnormal}, and
2504 @code{\beampostraditional}@keyindex{beampostraditional}.
2506 @item @code{beamslopedamping}@indexcode{beamslopedamping} @*
2507 Set to @code{\none} for undamped beams. Set to @code{\normal} for
2508 damped beams. Set to @code{\infinity} for beams with zero slope.
2510 @code{\beamslopeproportional}@keyindex{beamslopeproportional},
2511 @code{\beamslopedamped}@keyindex{beamslopedamped}, and
2512 @code{\beamslopezero}@keyindex{beamslopezero} each set the
2513 corresponding value.
2515 @item @code{dynamicDirection}@indexcode{dynamicDirection} @*
2516 Determines location of dynamic marks. Set to @code{\up} to print
2517 marks above the staff; set to @code{\down} to print marks below
2520 @item @code{dynamicStyle}@indexcode{dynamicStyle} @*
2521 Set the text style for dynamics.
2523 @item @code{fontSize}@indexcode{fontSize} @*
2524 Can be used to select smaller font sizes for music. The normal
2525 font size is 0, and the two smaller sizes are -1
2528 @item @code{forceHorizontalShift}@indexcode{forceHorizontalShift} @*
2529 Force horizontal shift for collision resolution. It overrides
2530 automatic collision resolution. The value is the shift amount
2531 expressed in @code{note_width}, as set in the paper section.
2535 TODO: explain this in refman.
2537 horizontalNoteShift does not set shifting itself.
2539 Notes that are likely to collide, are grouped into a Collision
2540 object. Colliding notes within the collision are then grouped based
2541 on their stem direction and horizontalNoteShift setting, like this:
2556 (0,1,2, .. = horizontalNoteShift value. u,d = stem up / stem down)
2558 Only then the seperate groups are shifted horizontally. When
2559 collision is done with this shifting, any forceHorizontalShift
2560 settings will override the default shifts.
2563 This scheme makes sense, because you only have to set
2564 horizontalNoteShift once in each voice. (Otherwise you'd have to set
2565 and unset it for each collision in a score.)
2569 @item @code{horizontalNoteShift}@indexcode{horizontalNoteShift} @*
2570 Enable LilyPond to shift notes horizontally if they collide with
2571 other notes. This is useful when typesetting many voices on one
2572 staff. The identifier @code{\shift}@keyindex{shift} is defined to
2573 enable this. Traditionally, the outer chords (the upmost and
2574 downmost voices), should have no @code{horizontalNoteShift}.
2576 @item @code{markScriptPadding}@indexcode{markScriptPadding} @*
2577 Determines the extra space added between the mark and the closest
2580 @item @code{markDirection}@indexcode{markDirection} @*
2581 Determines if marks should be printed above or below the staff.
2582 Set to @code{\up} to print marks above the staff; set to
2583 @code{\down} to print marks below the staff.
2585 @item @code{midiInstrument}@indexcode{midiInstrument} @*
2586 Sets the instrument for MIDI output. If this property is not set
2587 then LilyPond will use the @code{instrument} property. This must
2588 be set to one of the strings on the list of MIDI instruments that
2589 appears in section @xref{midilist}. If you use a string which
2590 is not listed, LilyPond will silently substitute piano.
2592 @item @code{oldTieBehavior}@indexcode{oldTieBehavior} @*
2593 Set to 1 in order to get old tie behavior where ties would
2594 connect unequal pitches. This property is deprecated, and its
2595 use is not recommended.
2597 @item @code{restStyle}@indexcode{restStyle} @*
2598 Change the layout of rests shorter than quarter notes.
2599 Currently, the standard layout @code{""} and mensural notation
2600 @code{"mensural"} are available. Mensural rests of duration
2601 32 or shorter are not available.
2603 @item @code{scriptHorizontal}@indexcode{scriptHorizontal} @*
2604 Put scripts left or right of note heads. Support for this is
2605 limited. Accidentals will collide with scripts.
2607 @item @code{slurVerticalDirection}@indexcode{slurVerticalDirection} @*
2608 Set to @code{\free} for free choice of slur direction, set to
2609 @code{\up} to force slurs up, set to @code{\down} to force slurs
2610 down. The shorthands @code{\slurup}@keyindex{slurup},
2611 @code{\slurdown}@keyindex{slurdown}, and
2612 @code{\slurboth}@keyindex{slurboth} are available.
2614 @item @code{slurDash}@indexcode{slurDash} @*
2615 Set to 0 for normal slurs, 1 for dotted slurs, and a
2616 larger value for dashed slurs. Identifiers
2617 @code{\slurnormal}@keyindex{slurnormal} and
2618 @code{\slurdotted}@keyindex{slurdotted} are predefined to set the
2621 @item @code{stemLength}@indexcode{stemLength} @*
2622 Set length of stems. Unit is `@code{interline}/2', so
2623 @code{stemLength} defaults to 7.
2625 @item @code{stemLeftBeamCount}@indexcode{stemLeftBeamCount} @*
2626 Specify the number of beams to draw on the left side of the next
2627 note. Overrides automatic beaming. The value is only used once,
2628 and then it is erased.
2630 @item @code{stemRightBeamCount}@indexcode{stemRightBeamCount} @*
2631 Specify the number of beams to draw on the right side of the next
2632 note. Overrides automatic beaming. The value is only used once,
2633 and then it is erased.
2634 @item @code{tieVerticalDirection}@indexcode{tieVerticalDirection} @*
2635 Set to @code{\free} for free choice of tie direction, set to
2636 @code{\up} to force ties up, set to @code{\down} to force ties
2639 @item @code{transposing}@indexcode{transposing} @*
2640 Transpose the MIDI output. Set this property to the number of
2641 half-steps to transpose by.
2644 @item @code{textEmptyDimension}@indexcode{textEmptyDimension} @*
2645 If set to 1 then text placed above or below the staff is
2646 assumed to have zero width.
2648 @item @code{textStyle}@indexcode{textStyle} @*
2649 Set the text style for superscripts and subscripts. See above
2650 for list of text styles.
2652 @item @code{textScriptPadding}@indexcode{textScriptPadding} @*
2653 Determines the extra space added between superscripted resp.
2654 subscripted text and the closest staff line or note.
2656 @item @code{verticalDirection}@indexcode{verticalDirection} @*
2657 Determines the direction of stems, subscripts, beams, slurs, and
2658 ties. Set to @code{\down} to force them down, @code{\up} to force
2659 them up, or @code{\free} to let LilyPond decide. This can be used
2660 to distinguish between voices on the same staff. The
2661 @code{\stemdown}@keyindex{stemdown}, @code{\stemup}@keyindex{stemup},
2662 and @code{\stemboth}@keyindex{stemboth} identifiers set this
2666 @item @code{tupletDirection}@indexcode{tupletDirection} @*
2667 Determines the direction of triplets and other tuplets. Set to
2668 @code{\down} to force them below the staff, @code{\up} to force
2669 them above, or @code{\free} to let LilyPond decide.
2671 @item @code{tupletVisibility}@indexcode{tupletVisibility} @*
2672 Determines whether tuplets of notes are labelled. Setting
2673 to 0 shows nothing; setting to 1 shows a number;
2674 setting to 2 shows a number and a bracket if there is no
2675 beam; setting to 3 shows a number, and if there is no beam
2676 it adds a bracket; setting to 4 shows both a number and a
2677 bracket unconditionally.
2681 @subsubheading Staff properties
2683 @cindex properties!Staff
2687 @item @code{barNonAuto}@indexcode{barNonAuto} @*
2688 If set to 1 then bar lines will not be printed
2689 automatically; they must be explicitly created with @code{\bar}
2690 keywords. Unlike with the @code{\cadenza} keyword, measures are
2691 still counted. Bar generation will resume according to that
2692 count if this property is set to zero.
2694 @item @code{barNumberDirection}@indexcode{barNumberDirection} @*
2695 Set to @code{\up} or @code{\down} to put bar numbers above or below
2698 @item @code{barNumberHangOnClef}@indexcode{barNumberHangOnClef} @*
2699 Set to 1 to cause bar numbers to appear above or below the
2700 clef instead of on the bar line. This property is deprecated.
2703 @item @code{barNumberScriptPadding}@indexcode{barNumberScriptPadding} @*
2704 Sets extra space between the bar number and the bar it labels.
2706 @item @code{barSize}@indexcode{barSize} @*
2707 Specify the height of the bar lines if it should be different
2708 than the staff height.
2710 @item @code{barAtLineStart}@indexcode{barAtLineStart} @*
2711 Set to 1 to produce a bar line after the clef at the start
2712 of each line (but not at the beginning of the music).
2714 @item @code{clefStyle}@indexcode{clefStyle} @*
2715 Determines how clefs are typeset. If set to @code{transparent},
2716 the clefs are not printed at all, if set to
2717 @code{fullSizeChanges}, clef changes in the middle of a line are
2718 typeset with a full size clef. By default, clef changes are
2719 typeset in smaller size.
2721 @item @code{createKeyOnClefChange}@indexcode{createKeyOnClefChange} @*
2722 Set to a nonempty string if you want key signatures to be printed
2723 when the clef changes. Set to the empty string if you do not
2724 want key signatures printed.
2726 @item @code{createInitdefaultClef}@indexcode{createInitdefaultClef} @*
2727 Specify whether clefs are created on default? (Doesn't seem to
2730 @item @code{defaultClef}@indexcode{defaultClef} @*
2731 Determines the default clef. See @code{\clef} keyword.
2733 @item @code{markHangOnClef}@indexcode{markHangOnClef} @*
2734 Set to 1 to cause marks to appear by clefs instead of by bar
2735 lines. Deprecated, use is not recommended.
2737 @item @code{marginDirection}@indexcode{marginDirection} @*
2738 Set to @code{\left} or @code{\right} to specify location of
2741 @item @code{marginScriptPadding}@indexcode{marginScriptPadding} @*
2742 Specify extra space for marginal scripts.
2744 @item @code{forgetAccidentals}@indexcode{forgetAccidentals} @*
2745 Causes accidentals to be printed at every note instead of
2746 remembered for the duration of a measure.
2748 @item @code{noResetKey}@indexcode{noResetKey} @*
2749 Do not reset the key at the start of a measure. Accidentals will
2750 be printed only once and are in effect until overridden, possibly
2751 many measures later.
2753 @item @code{staffLineLeading}@indexcode{staffLineLeading} @*
2754 Specifies the distance (in points) between lines of the staff.
2756 @item @code{numberOfStaffLines}@indexcode{numberOfStaffLines} @*
2757 Specifies the number of staff lines. The default is 5.
2759 @item @code{postBreakPadding}@indexcode{postBreakPadding} @*
2760 Extra space in points to be added after the clef, time signature
2761 and key signature on the staff. Deprecated, do not use.
2763 @item @code{noVoltaBraces}@indexcode{noVoltaBraces} @*
2764 Set to true to suppress the printing of brackets over alternate
2765 endings specified by the command @code{\alternative}.
2767 @item @code{numberOfStaffLines}@indexcode{numberOfStaffLines} @*
2768 Sets the number of lines that the staff has.
2770 @item @code{barAlways}@indexcode{barAlways} @*
2771 If set to 1 a bar line is drawn after each note.
2773 @item @code{defaultBarType}@indexcode{defaultBarType} @*
2774 Sets the default type of bar line. See Section @xref{barlines}
2775 for a list of available bar types.
2777 @item @code{instrument}, @code{instr}
2778 @indexcode{instrument}@indexcode{instr} @*
2779 If @code{Staff_margin_engraver}
2780 @cindex Staff_margin_engraver
2782 added to the Staff translator, then the @code{instrument} property
2783 is used to label the first line of the staff and the @code{instr}
2784 property is used to label subsequent lines. If the
2785 @code{midiInstrument} property is not set, then @code{instrument}
2786 is used to determine the instrument for MIDI output.
2788 @item @code{keyOctaviation}@indexcode{keyOctaviation} @*
2789 If set to 1, then keys are the same in all octaves. If set
2790 to 0 then the key signature for different octaves can be
2791 different and is specified independently:
2795 @code{\keysignature bes fis'}
2798 The default value is 1. Can be set to zero with
2799 @code{\specialkey} or reset to 1 with @code{\normalkey}.
2801 @item @code{timeSignatureStyle}@indexcode{timeSignatureStyle} @*
2802 Changes the default two-digit layout for time signatures. The
2803 following values are recognized:
2806 @item @code{C}@indexcode{C} @*
2807 4/4 and 2/2 are typeset as C and struck C, respectively. All
2808 other time signatures are written with two digits.
2810 @item @code{old}@indexcode{old} @*
2811 2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and 9/8 are
2812 typeset with old-style mensuration marks. All other time
2813 signatures are written with two digits.
2815 @item @code{1}@indexcode{1} @*
2816 All time signatures are typeset with a single
2817 digit, e.g. 3/2 is written as 3.
2819 @item @indexcode{CM/N}@code{C}@var{M}@code{/}@var{N},
2820 @indexcode{oldM/N}@code{old}@var{M}@code{/}@var{N} or
2821 @code{old6/8alt}@indexcode{old6/8alt} @*
2822 Tells LilyPond to use a specific symbol as time signature.
2825 The different time signature characters are shown below with its
2831 \notes\relative c'' {
2832 \property Voice.textStyle = typewriter
2833 \property Staff.timeSignatureStyle = "C2/2"
2834 \time 2/2; a2^"C2/2" a2
2835 \property Staff.timeSignatureStyle = "C4/4"
2836 \time 2/2; a2^"C4/4" a2
2837 \property Staff.timeSignatureStyle = "old2/2"
2838 \time 2/2; a2^"old2/2" a2
2839 \property Staff.timeSignatureStyle = "old3/2"
2840 \time 2/2; a2^"old3/2" a2
2841 \property Staff.timeSignatureStyle = "old2/4"
2842 \time 2/2; a2^"old2/4" a2
2843 \property Staff.timeSignatureStyle = "old4/4"
2844 \time 2/2; a2^"old4/4" a2
2845 \property Staff.timeSignatureStyle = "old6/4"
2846 \time 2/2; a2^"old6/4" a2
2847 \property Staff.timeSignatureStyle = "old9/4"
2848 \time 2/2; a2^"old9/4" a2
2849 \property Staff.timeSignatureStyle = "old4/8"
2850 \time 2/2; a2^"old4/8" a2
2851 \property Staff.timeSignatureStyle = "old6/8"
2852 \time 2/2; a2^"old6/8" a2
2853 \property Staff.timeSignatureStyle = "old6/8alt"
2854 \time 2/2; a2^"old6/8alt" a2
2855 \property Staff.timeSignatureStyle = "old9/8"
2856 \time 2/2; a2^"old9/8" a2
2859 linewidth = 4.5 \in;
2865 @item @code{voltaSpannerDuration}@indexcode{voltaSpannerDuration} @*
2866 Set to an integer to control the size of the brackets printed by
2867 @code{\alternative}. The integer specifies the number of whole
2868 notes duration to use for the brackets. It is rounded to the
2869 nearest measure. This can be used to shrink the length of
2870 brackets in the situation where one alternative is very large.
2871 It may have odd effects if the specified duration is longer than
2872 the music given in an @code{\alternative}.
2876 @cindex properties!GrandStaff
2879 @item @code{alignmentReference}@indexcode{alignmentReference} @*
2880 Set to @code{\center} for vertical alignment reference point to be
2881 in the center of the vertical group. Set to @code{\up} to put the
2882 reference point at the top of the group.
2884 @item @code{maxVerticalAlign}@indexcode{maxVerticalAlign} @*
2885 Set the maximum vertical distance between staffs.
2887 @item @code{minVerticalAlign}@indexcode{minVerticalAlign} @*
2888 Set the minimum vertical distance between staffs.
2892 @cindex properties!Score
2895 @item @code{skipBars}@indexcode{skipBars} @*
2896 Set to 1 to skip the empty bars that are produced by
2897 multimeasure notes and rests. These bars will not appear on the
2898 printed output. Set to zero (the default) to expand multimeasure
2899 notes and rests into their full length, printing the appropriate
2900 number of empty bars so that synchronization with other voices is
2905 @mudela[fragment,verbatim,center]
2906 r1 r1*3 R1*3\property Score.skipBars=1 r1*3 R1*3
2914 @cindex properties!ChordNamesVoice
2917 @item @code{chordInversion}@indexcode{chordInversion} @*
2918 Determines whether LilyPond should look for chord inversions when
2919 translating from notes to chord names. Set to 1 to find
2920 inversions. The default is 0 which does not look for
2926 @node Notation output definitions, output, contextselection, LilyPond 1-2-0 Reference Manual
2927 @section Notation output definitions
2931 @cindex notation output
2933 @cindex output definition
2935 @node output, paper, Notation output definitions, LilyPond 1-2-0 Reference Manual
2937 @node paper, papervars, output, LilyPond 1-2-0 Reference Manual
2939 The most important output definition is the @code{\paper} block, for
2940 music notation. The syntax is
2944 @code{\paper @{} [@var{paperidentifier}] @var{items} @code{@}}
2947 where each of the items is one of
2950 @item An assignment. The assignment must be terminated by a
2951 semicolon. See section @xref{papervars} for information on
2954 @item A context definition. See section @xref{contextdefs} for
2955 more information on context definitions.
2957 @item A margin shape declaration. The syntax is
2961 @code{\shape} @var{indent1}@code{,} @var{width1}@code{,}
2962 @var{indent2}@code{,} @var{width2} ... @code{;}
2967 Each pair of @var{indent} and @var{width} values is a dimension
2968 specifying how far to indent and how wide to make the line.
2969 The indentation and width of successive lines are specified by
2970 the successive pairs of dimensions. The last pair of
2971 dimensions will define the characeristics of all lines beyond
2972 those explicitly specified.
2974 @item A font declaration. Its syntax is
2978 @var{fontsize} @code{=} @code{\font}@keyindex{font} @var{fontname}
2981 @var{fontsize} is an integer describing the font to be used.
2982 0 is the default font. @var{fontname} is the basename of
2983 a font (usually a member of the Feta family).
2988 @cindex changing font size and paper size
2990 The Feta font provides musical symbols at six different sizes. These
2991 fonts are 11 point, 13 point, 16 point, 20 point,
2992 23 point, and 26 point. The point size of a font is the
2993 height of the five lines in a staff when displayed in the font.
2995 Definitions for these sizes are the files @file{paperSZ.ly}, where
2996 @code{SZ} is one of 11, 13, 16, 20, 23 and 26. If you include
2997 any of these files, the identifiers @code{paper_eleven},
2998 @code{paper_thirteen}, @code{paper_sixteen}, @code{paper_twenty},
2999 @code{paper_twentythree}, and @code{paper_twentysix} are defined
3000 respectively. The default @code{\paper} block is also set.
3002 To change the paper size, you must first set the
3003 @code{papersize}@indexcode{papersize} variable at top level. Set it to the strings
3004 @code{a4}, @code{letter}, or @code{legal}. After this specification,
3005 you must set the font as described above. If you want the default
3006 font, then use the 20 point font. The new paper size will not
3007 take effect if the font is not loaded and selected afterwards. Paper
3008 size selection works by loading a file named after the paper size you
3013 @cindex paper variables
3015 @node papervars, contextdefs, paper, LilyPond 1-2-0 Reference Manual
3017 There is a large number of paper variables that are used to control
3018 details of the layout. These variables control the defaults for the
3019 entire score. Usually, they do not have to be changed; they are by
3020 default set to values that depend on the font size in use. The
3021 values are used by the graphic objects while formatting the score;
3022 they are therefore implementation dependent. Most variables are
3023 accompanied by documentation in the initalization file
3024 @file{params.ly} or @file{paperSZ.ly}, where @code{SZ} is the staff
3027 Nevertheless, here are some variables you may want to use or change:
3030 @item @code{indent}@indexcode{indent} @*
3031 The indentation of the first line of music.
3033 @item @code{interline}@indexcode{interline} @*
3034 The distance between two staff lines, calculated from the center
3035 of the lines. You should use either this or @code{rulethickness}
3036 as a unit for distances you modify.
3038 @item @code{linewidth}@indexcode{linewidth} @*
3039 Sets the width of the lines. If set to -1.0, a single
3040 unjustified line is produced.
3042 @item @code{output}@indexcode{output} @*
3043 Specifies an alternate name for the the output @file{s}.
3044 A @file{.tex}, @file{.midi} or @file{.ps} extension will be
3045 added to the string you specify.
3047 @item @code{rulethickness}@indexcode{rulethickness} @*
3048 Determines the thickness of staff and bar lines.
3050 @item @code{castingalgorithm}@indexcode{castingalgorithm} @*
3051 The algorithm to use for breaking lines. Choices are
3052 @code{\Gourlay}@keyindex{Gourlay} for a TeX-like dynamic
3053 programming algorithm, and @code{\Wordwrap}@keyindex{Wordwrap} for
3054 a simple algorithm. Gourlay breaking looks much better, but
3055 takes a lot more resources. Wordwrap leaves loosely spaced lines
3060 @node contextdefs, engravers, papervars, LilyPond 1-2-0 Reference Manual
3062 @cindex context definition
3064 A notation contexts is defined by the following information
3069 @item The LilyPond modules that do the actual conversion of music to
3070 notation. Each module is a so-called
3075 @item How these modules should cooperate, i.e. which ``cooperation
3076 module'' should be used. This cooperation module is a special
3079 @item What other contexts the context can contain,
3081 @item What properties are defined.
3084 A context definition has this syntax:
3088 @code{\translator} @code{@{}
3089 @var{translatorinit} @var{translatormodifierlist}
3093 @var{translatorinit} can be an identifier or of the form
3097 @code{\type} @var{typename} @code{;}
3100 @var{typename} is one of
3103 @item @code{Engraver_group_engraver}@indexcode{Engraver_group_engraver} @*
3104 The standard cooperation engraver.
3106 @item @code{Score_engraver}@indexcode{Score_engraver} @*
3107 This is cooperation module that should be in the top level context.
3109 @item @code{Grace_engraver_group}@indexcode{Grace_engraver_group} @*
3110 This is a special cooperation module (resembling
3111 @code{Score_engraver}) that is used to created an embedded
3115 @var{translatormodifierlist} is a list of items where each item is
3119 @item @code{\consists} @var{engravername} @code{;} @*
3120 Add @var{engravername} to the list of modules in this context.
3121 Section @xref{engravers} contains an overview of the engravers
3122 available. The order of engravers added with @code{\consists} is
3125 @item @code{\consistsend} @var{engravername} @code{;} @*
3126 Analogous to @code{\consists}, but makes sure that
3127 @var{engravername} is always added to the end of the list of
3130 Some engraver types need to be at the end of the list; this
3131 insures they are put there, and stay there, if a user adds or
3132 removes engravers. This command is usually not needed for
3135 @item @code{\accepts} @var{contextname} @code{;} @*
3136 Add @var{contextname} to the list of context this context can
3137 contain. The first listed context the context to create by
3140 @item @code{\remove} @var{engravername} @code{;} @*
3141 Remove a previously added (with @code{\consists}) engraver.
3143 @item @code{\name} @var{contextname} @code{;} @*
3144 This sets name of the context, e.g. @code{Staff}, @code{Voice}. If
3145 the name is not specified, the translator won't do anything.
3147 @item @var{propname} @code{=} @var{value} @code{;} @*
3148 A property assignment. It is allowed to use reals for
3152 In the @code{\paper} block, it is also possible to define translator
3153 identifiers. Like other block identifiers, the identifier can only
3154 be used as the very first item of a translator. In order to define
3155 such an identifier outside of @code{\score}, you must do
3161 foo = \translator @{ ... @}
3168 \translator @{ \foo ... @}
3176 @cindex paper types, engravers, and pre-defined translators
3178 Some pre-defined identifiers can simplify modification of
3179 translators. The pre-defined identifiers are:
3182 @item @code{StaffContext}@indexcode{StaffContext} @*
3183 Default Staff context.
3185 @item @code{RhythmicStaffContext}@indexcode{RhythmicStaffContext} @*
3186 Default RhythmicStaff context.
3188 @item @code{VoiceContext}@indexcode{VoiceContext} @*
3189 Default Voice context.
3191 @item @code{ScoreContext}@indexcode{ScoreContext} @*
3192 Default Score context.
3194 @item @code{ScoreWithNumbers}@indexcode{ScoreWithNumbers} @*
3195 Score context with numbering at the Score level.
3197 @item @code{BarNumberingStaffContext}@indexcode{BarNumberingStaffContext} @*
3198 Staff context with numbering at the Staff level.
3200 @item @code{HaraKiriStaffContext}@indexcode{HaraKiriStaffContext} @*
3201 Staff context that does not print if it only contains rests.
3202 Useful for orchestral scores.@footnote{Harakiri, also called
3203 Seppuku, is the ritual suicide of the Samourai.}
3205 @item @code{OrchestralPartStaffContext}@indexcode{OrchestralPartStaffContext}
3207 @item @code{OrchestralScoreContext}@indexcode{OrchestralScoreContext}
3210 Using these pre-defined values, you can remove or add items to the
3219 \remove Some_engraver;
3220 \consists Different_engraver;
3229 @node engravers, Sound output, contextdefs, LilyPond 1-2-0 Reference Manual
3231 The engravers for paper output are:
3236 @item @code{Bar_engraver}@indexcode{Bar_engraver} @*
3237 Engraves bar lines. Normally in @code{Staff} and
3238 @code{RhythmicStaff}.
3240 @item @code{Bar_number_engraver}@indexcode{Bar_number_engraver} @*
3241 Engrave bar numbers. These numbers appear at the start of each
3242 line. Not normally in any translator. Can be added to
3243 @code{Score} for score-wide numbering or to @code{Staff} for
3244 numbering on each staff.
3246 @item @code{Beam_engraver}@indexcode{Beam_engraver} @*
3247 Handles beam requests by engraving beams. Normally appears in
3248 the @code{Voice} translator. If omitted, then notes will be
3249 printed with flags instead of beams.
3251 @item @code{Beam_req_swallow_translator}
3252 @indexcode{Beam_req_swallow_translator} @*
3253 Swallows beam requests. In @code{LyricVoice}.
3255 @item @code{Chord_name_engraver}@indexcode{Chord_name_engraver} @*
3256 Engraves chord names. Normally in @code{ChordNameVoice} .
3258 @item @code{Chord_tremolo_engraver}@indexcode{Chord_tremolo_engraver}
3260 @item @code{Clef_engraver}@indexcode{Clef_engraver} @*
3261 Engraves the clef symbol. Normally in @code{Staff}.
3263 @item @code{Collision_engraver}@indexcode{Collision_engraver}
3265 @item @code{Dot_column_engraver}@indexcode{Dot_column_engraver} @*
3266 Engraves dots on dotted notes shifted to the right of the note.
3267 Normally in @code{Voice}. If omitted, then dots appear on top of
3270 @item @code{Dynamic_engraver}@indexcode{Dynamic_engraver} @*
3271 Engraves dynamics symbols. Normally in @code{Voice}.
3273 @item @code{Font_size_engraver}@indexcode{Font_size_engraver}
3275 @item @code{Key_engraver}@indexcode{Key_engraver} @*
3276 Engraves the key signature. Normally in @code{Staff}.
3278 @item @code{Local_key_engraver}@indexcode{Local_key_engraver}
3280 @item @code{Lyric_engraver}@indexcode{Lyric_engraver} @*
3281 Engraves lyrics. Normally in @code{LyricVoice}.
3283 @item @code{Multi_measure_rest_engraver}
3284 @indexcode{Multi_measure_rest_engraver} @*
3285 Engraves multi-measure rests that are produced with @code{R}.
3286 Normally in @code{Voice}.
3288 @item @code{Piano_bar_engraver}@indexcode{Piano_bar_engraver}
3290 @item @code{Pitch_squash_engraver}@indexcode{Pitch_squash_engraver} @*
3291 Treat all pitches as middle C. Used in @code{RhythmicStaff}.
3292 Note that the notes move, but the locations of accidentals stay
3295 @item @code{Priority_horizontal_align_engraver}
3296 @indexcode{Priority_horizontal_align_engraver}
3298 @item @code{Repeat_engraver}@indexcode{Repeat_engraver} @*
3299 Handles repeats? In @code{Staff} and @code{RhythmicStaff}.
3301 @item @code{Rest_collision_engraver}@indexcode{Rest_collision_engraver} @*
3302 Handles collisions of rests. In @code{Staff}.
3304 @item @code{Rest_engraver}@indexcode{Rest_engraver} @*
3305 Engraves rests. Normally in @code{Voice}.
3307 @item @code{Rhythmic_column_engraver}@indexcode{Rhythmic_column_engraver}
3309 @item @code{Score_priority_engraver}@indexcode{Score_priority_engraver}
3311 @item @code{Script_engraver}@indexcode{Script_engraver} @*
3312 Handles note ornaments generated by @code{\script}. Normally in
3315 @item @code{Separating_line_group_engraver}
3316 @indexcode{Separating_line_group_engraver}
3318 @item @code{Skip_req_swallow_translator}
3319 @indexcode{Skip_req_swallow_translator}
3321 @item @code{Slur_engraver}@indexcode{Slur_engraver} @*
3322 Engraves slurs. Normally in @code{Voice}.
3324 @item @code{Span_bar_engraver}@indexcode{Span_bar_engraver} @*
3325 Engraves lines across multiple staffs. Normally in
3326 @code{Staffgroup} and @code{GrandStaff}. Removing this from
3327 @code{StaffGroup} gives the definition of @code{ChoirStaff}.
3329 @item @code{Span_score_bar_engraver}@indexcode{Span_score_bar_engraver}
3331 @item @code{Staff_group_bar_engraver}@indexcode{Staff_group_bar_engraver}
3333 @item @code{Staff_margin_engraver}@indexcode{Staff_margin_engraver} @*
3334 Prints the name of the instrument (specified by
3335 @code{Staff.instrument} and @code{Staff.instr}) at the left of the
3338 @item @code{Staff_sym_engraver}@indexcode{Staff_sym_engraver}
3340 @item @code{Stem_engraver}@indexcode{Stem_engraver} @*
3341 Engraves stems. Normally in @code{Voice}.
3343 @item @code{Ties_engraver}@indexcode{Ties_engraver} @*
3344 Engraves ties. Normally in @code{Voice}.
3346 @item @code{Time_signature_engraver}@indexcode{Time_signature_engraver} @*
3347 Engraves the time signature. Normally in @code{Staff} and
3348 @code{RhythmicStaff}.
3350 @item @code{Timing_engraver}@indexcode{Timing_engraver} @*
3351 Responsible for synchronizing timing information from staffs.
3352 Normally in @code{Score}. In order to create polyrhythmic music,
3353 this engraver should be removed from @code{Score} and placed in
3356 @item @code{Tuplet_engraver}@indexcode{Tuplet_engraver} @*
3357 Engraves tuplet brackets? In @code{Staff}.
3359 @item @code{Vertical_align_engraver}@indexcode{Vertical_align_engraver}
3364 @node Sound output, midilist, engravers, LilyPond 1-2-0 Reference Manual
3365 @section Sound output
3369 The MIDI block is analogous to the paper block, but it is simpler.
3370 The @code{\midi} block can contain:
3374 @item a @code{\tempo} definition
3375 @item context definitions
3378 Assignments in the @code{\midi} block are not allowed.
3382 @cindex context definition
3384 Context definitions follow precisely the same syntax as within the
3385 \paper block. Translation modules for sound are called performers.
3386 The contexts for MIDI output are defined in @file{ly/performer.ly}.
3390 @cindex MIDI instrument names
3392 @node midilist, Pre-defined Identifiers, Sound output, LilyPond 1-2-0 Reference Manual
3394 The MIDI instrument name is set by the
3395 @code{Staff.midiInstrument}@indexcode{Staff.midiInstrument} property or, if that property is
3396 not set, the @code{Staff.instrument}@indexcode{Staff.instrument} property. The instrument
3397 name should be chosen from the following list. If the selected
3398 string does not exactly match, then LilyPond uses the default piano.
3404 "acoustic grand" "contrabass" "lead 7 (fifths)"
3405 "bright acoustic" "tremolo strings" "lead 8 (bass+lead)"
3406 "electric grand" "pizzicato strings" "pad 1 (new age)"
3407 "honky-tonk" "orchestral strings" "pad 2 (warm)"
3408 "electric piano 1" "timpani" "pad 3 (polysynth)"
3409 "electric piano 2" "string ensemble 1" "pad 4 (choir)"
3410 "harpsichord" "string ensemble 2" "pad 5 (bowed)"
3411 "clav" "synthstrings 1" "pad 6 (metallic)"
3412 "celesta" "synthstrings 2" "pad 7 (halo)"
3413 "glockenspiel" "choir aahs" "pad 8 (sweep)"
3414 "music box" "voice oohs" "fx 1 (rain)"
3415 "vibraphone" "synth voice" "fx 2 (soundtrack)"
3416 "marimba" "orchestra hit" "fx 3 (crystal)"
3417 "xylophone" "trumpet" "fx 4 (atmosphere)"
3418 "tubular bells" "trombone" "fx 5 (brightness)"
3419 "dulcimer" "tuba" "fx 6 (goblins)"
3420 "drawbar organ" "muted trumpet" "fx 7 (echoes)"
3421 "percussive organ" "french horn" "fx 8 (sci-fi)"
3422 "rock organ" "brass section" "sitar"
3423 "church organ" "synthbrass 1" "banjo"
3424 "reed organ" "synthbrass 2" "shamisen"
3425 "accordion" "soprano sax" "koto"
3426 "harmonica" "alto sax" "kalimba"
3427 "concertina" "tenor sax" "bagpipe"
3428 "acoustic guitar (nylon)" "baritone sax" "fiddle"
3429 "acoustic guitar (steel)" "oboe" "shanai"
3430 "electric guitar (jazz)" "english horn" "tinkle bell"
3431 "electric guitar (clean)" "bassoon" "agogo"
3432 "electric guitar (muted)" "clarinet" "steel drums"
3433 "overdriven guitar" "piccolo" "woodblock"
3434 "distorted guitar" "flute" "taiko drum"
3435 "guitar harmonics" "recorder" "melodic tom"
3436 "acoustic bass" "pan flute" "synth drum"
3437 "electric bass (finger)" "blown bottle" "reverse cymbal"
3438 "electric bass (pick)" "skakuhachi" "guitar fret noise"
3439 "fretless bass" "whistle" "breath noise"
3440 "slap bass 1" "ocarina" "seashore"
3441 "slap bass 2" "lead 1 (square)" "bird tweet"
3442 "synth bass 1" "lead 2 (sawtooth)" "telephone ring"
3443 "synth bass 2" "lead 3 (calliope)" "helicopter"
3444 "violin" "lead 4 (chiff)" "applause"
3445 "viola" "lead 5 (charang)" "gunshot"
3446 "cello" "lead 6 (voice)"
3452 @cindex MIDI types and performers
3454 The types available for MIDI translators are:
3457 @item @code{Performer_group_performer}@indexcode{Performer_group_performer}
3458 @item @code{Score_performer}@indexcode{Score_performer}
3459 @item @code{Staff_performer}@indexcode{Staff_performer}
3462 The performers for MIDI translators are:
3465 @item @code{Key_performer}@indexcode{Key_performer}
3466 @item @code{Time_signature_performer}@indexcode{Time_signature_performer}
3467 @item @code{Note_performer}@indexcode{Note_performer}
3468 @item @code{Lyric_performer}@indexcode{Lyric_performer}
3469 @item @code{Swallow_performer}@indexcode{Swallow_performer}
3474 @node Pre-defined Identifiers, ident, midilist, LilyPond 1-2-0 Reference Manual
3475 @section Pre-defined Identifiers
3477 @cindex pre-defined identifiers
3479 @node ident, Running LilyPond, Pre-defined Identifiers, LilyPond 1-2-0 Reference Manual
3481 Various identifiers are defined in the initialization files to
3482 provide shorthands for some settings. Most of them are in
3483 @file{ly/declarations.ly}.
3486 @item @code{\break}@keyindex{break} @*
3487 Force a line break in music by using a large argument for the
3488 keyword @code{\penalty}.
3490 @item @code{\center}@keyindex{center} @*
3491 Used for setting direction properties. Equals 0.
3493 @item @code{\down}@keyindex{down} @*
3494 Used for setting direction setting properties. Is equal
3497 @item @code{\free}@keyindex{free} @*
3498 Used for setting direction setting properties. Is equal
3501 @item @code{\left}@keyindex{left} @*
3502 Used for setting text alignment property. Is equal to -1.
3504 @item @code{\nobreak}@keyindex{nobreak} @*
3505 Prevent a line break in music by using a large negative argument
3506 for the keyword @code{\penalty}.
3508 @item @code{\none}@keyindex{none} @*
3509 Used for setting @code{Score.beamslopedamping} and
3510 @code{Score.beamquantisation} properties. Is equal to 0.
3512 @item @code{\normal}@keyindex{normal} @*
3513 Used for setting @code{Score.beamslopedamping} and
3514 @code{Score.beamquantisation} properties. Is equal to 1.
3516 @item @code{\normalkey}@keyindex{normalkey} @*
3517 Select normal key signatures where each octave has the same key
3518 signature. This sets the @code{Staff.keyoctaviation} property.
3520 @item @code{\right}@keyindex{right} @*
3521 Used for setting text alignment property. Is set to 1.
3523 @item @code{\shiftoff}@keyindex{shiftoff} @*
3524 Disable horizontal shifting of note heads that collide. Sets the
3525 @code{Voice.horizontalNoteShift} property.
3527 @item @code{\shifton}@keyindex{shifton} @*
3528 Enable note heads that collide with other note heads to be
3529 shifted horiztonally. Sets the @code{Voice.horizontalNoteShift}
3532 @item @code{\slurboth}@keyindex{slurboth} @*
3533 Allow slurs to be above or below notes. This sets the
3534 @code{Voice.slurVerticalDirection} property.
3536 @item @code{\slurdown}@keyindex{slurdown} @*
3537 Force slurs to be below notes. This sets the
3538 @code{Voice.slurVerticalDirection} property.
3540 @item @code{\slurup}@keyindex{slurup} @*
3541 Force slurs to be above notes. This sets the
3542 @code{Voice.slurVerticalDirection} property.
3544 @item @code{\specialkey}@keyindex{specialkey} @*
3545 Allow key signatures do differ in different octaves. This sets
3546 the @code{Staff.keyoctaviation} property.
3548 @item @code{\stemboth}@keyindex{stemboth} @*
3549 Allow stems, beams, and slurs to point either upwards or
3550 downwards, decided automatically by LilyPond. This sets the
3551 @code{Voice.verticalDirection} property.
3553 @item @code{\stemdown}@keyindex{stemdown} @*
3554 Force stems, beams, and slurs to point down. This sets the
3555 @code{Voice.verticalDirection} property.
3557 @item @code{\stemup}@keyindex{stemup} @*
3558 Force stems, beams and slurs to point up. This sets the
3559 @code{Voice.verticalDirection} property.
3561 @item @code{\traditional}@keyindex{traditional} @*
3562 Used for setting the @code{Score.beamquantisation} property. Is
3565 @item @code{\up}@keyindex{up} @*
3566 Used for setting various direction properties. Is equal
3572 @node Running LilyPond, Top, ident, LilyPond 1-2-0 Reference Manual
3573 @section Running LilyPond
3575 @cindex running LilyPond
3578 When invoked with a filename that has no extension, LilyPond will try
3579 adding `@file{.ly}' as an extension first, then `@file{.fly}' and
3580 finally `@file{.sly}' extension. If the filename ends with
3581 `@file{.fly}', LilyPond processes the file as music using
3582 `@file{init.fly}'. In this case, LilyPond does something like:
3588 \notes\relative c @{
3589 \input "yourfile.fly"
3598 The result of `@file{.sly}' is similar except that a single unjustified
3601 If you invoke LilyPond with a file `@file{foo.}@var{ext}' that doesn't
3602 have the `@file{.ly}' extension, then LilyPond will look for a file
3603 called `@file{init.}@var{ext}' and process this file. The file
3604 `@file{init.}@var{ext}' must contain the @code{\maininput} keyword or
3605 LilyPond will not read the user specified file.
3607 When LilyPond processes @file{filename.ly} it will produce
3608 @file{filename.tex} as output. If @file{filename.ly} contains a second
3609 @code{\paper} keyword, then LilyPond will produce @file{filename-1.tex}
3610 as well. Subsequent @code{\paper} keywords will produce sequentially
3611 numbered file names. Several files can be specified; they will each
3612 be processed independently.@footnote{Not entirely true: The status of