1 mailto(gnu-music-discuss@gnu.org)
4 redef(var)(1)(whenlatex(latexcommand({\normalfont\scshape )ARG1+latexcommand(}))\
8 redef(code)(1)(tt(ARG1))
14 the use of semicolons needs to be documented once it settles down
16 the explanation of how lyrics mode parses words seems ridiculous.
17 Is there a simple way to explain this, or is the behavior
18 too complicated for a reasonable explanation?
19 \relative and \tranpose and \times make it necessary to specify
20 an explicit \type staff, or bizarre things happen.
23 extender* (see extender.ly)
24 \repeat & \alternative -> probably should have an example
28 property: stemLeftBeamCount stemRightBeamCount
29 interstaff beams (beam-interstaff.ly)
30 interstaff slurs (see preludes-1.ly)
31 boolean property barAuto
32 property: noteheadStyle
33 harmonics: test/harmonics.fly
35 properties: beamAutoEndx ??? rational string "1/2"
41 chordNameStyle (banter)
42 chordInversionPreserve
49 {Mark,BarNumber,Margin}{Direction,ScriptPadding}
56 This document contains Mudela fragments. You need at least
57 Yodl-1.30.18 to convert this to tex or html.
60 htmlbodyopt(bgcolor)(white)
61 htmlcommand(<font color=black>)
64 \setlength{\topmargin}{-0.25in}
65 \setlength{\textheight}{9in}
66 \setlength{\textwidth}{5.875in}
67 \setlength{\oddsidemargin}{0.25in}
68 \setlength{\evensidemargin}{0.25in}
72 whentexinfo(notableofcontents())
74 article(Mudela 1.0.14 / LilyPond 1.1.27 Reference Manual)
75 (Adrian Mariano, Han-Wen Nienhuys and Jan Nieuwenhuizen)
76 (nop()PIPETHROUGH(date "+%B %d, %Y")()()nop())
82 * paragraphs have too much space.
87 latexcommand(\def\interexample{})
88 latexcommand(\def\preexample{\par})
89 latexcommand(\def\postexample{\par\medskip})
90 latexcommand(\def\file#1{{code(#1)}})
92 latexcommand(\def\texttt#1{\tt #1})
93 latexcommand(\def\textbf#1{\bf #1})
96 COMMENT(urg, texinfo include breaks)
98 includefile(html-disclaimer.yo-urg)
101 bf(This document is not up to date). All rendered examples of course
102 are current, but the rest probably isn't. Adjusting the tutorial was
103 considered more important than writing the reference manual. We
104 apologize for the inconvenience. For a complete and up-to-date
105 definition, see file(lily/parser.yy), file(lily/lexer.ll), and the
108 This document describes the the GNU LilyPond input format, which is an
109 effective language for defining music. We call this language (rather
110 arrogantly) The Musical Definition Language or Mudela, for
111 short.footnote(If anybody comes up with a better name, we'd gladly
112 take this. Gourlay already uses Musical Description Language,
113 G-Sharp Score Definition Language. ISO standard 10743 defines a
114 Standard Music Description Language. We're not being original here.)
116 The first aim of Mudela is to define a piece of music, being complete
117 from both from a musical typesetting, as from a musical performing
120 The Musical Definition Language (Mudela), has a logical structure,
121 making use of identifiers, that allows for flexible input, and
122 definition reuse. See the documentation file file(MANIFESTO), included
123 with the LilyPond sources for reasons and design considerations.
126 sect(Running LilyPond)
128 When invoked with a filename that has no extension, LilyPond will try adding
129 a file(.fly) extension first, and a file(.ly) extension second.
130 If the filename ends with
131 file(.fly), LilyPond processes the file as music using
132 file(init.fly). In this case, LilyPond does something
136 \input "yourfile.fly"
141 If you invoke LilyPond with a file file(foo.)var(ext) that doesn't
142 have the file(.ly) extension then LilyPond will look for a file called
143 file(init.)var(ext) and process this file. The file
144 file(init.)var(ext) must contain the code(\maininput) keyword or LilyPond
145 will not read the user specified file.
147 When LilyPond processes file(filename.ly) it will produce file(filename.tex) as
148 output. If file(filename.ly) contains a second code(\paper) keyword, then
149 LilyPond will produce file(filename-1.tex) as well. Subsequent code(\paper)
150 keywords will produces sequentially numbered file names. Several files can be
151 specified; they will each be processed independently.
155 subsect(Basic Mudela)
157 A Mudela file consists of keywords with arguments and identifier
158 assignments separated by spaces, tabs or newlines. Semicolons are
159 used by some keywords but are not generally required. A one line
160 comment is introduced by a code(%) character. Block comments are
161 started by code(%{) and ended by code(%}). They cannot be nested.
163 Mudela supports several types:
168 Formed from an optional minus sign followed by digits. Arithmetic
169 operations cannot be done with integers, and integers cannot be mixed
173 Formed from an optional minus sign and a sequence of digits followed
174 by a emph(required) decimal point and an optional exponent such as
175 code(-1.2e3). Reals can be built up using the usual operations:
176 code(+), code(-), code(*), and code(/), with parentheses for grouping.
179 Begins and ends with the code(") character. To include a code(")
180 character in a string write code(\"). Various other backslash
181 sequences have special interpretations as in the C language. A string
182 that contains no spaces can be written without the quotes. See
183 Section ref(modes) for details on unquoted strings; their
184 interpretation varies depending on the situation. On the right side
185 of identifier assignments and within the code(\header) keyword,
186 strings can be concatenated using the code(+) character.
188 dit(dimension) Consists of a real followed by one of the dimension
189 keywords: code(\mm), code(\pt), code(\in), or code(\cm). Dimensions
190 are converted immediately to a real which gives the dimension in
191 points, so they can be mixed with reals, but the result is no longer
192 of type dimension. The keywords that require a dimension
196 A pitch is a string which is the name of a pitch. Example: code(a).
197 The pitch names can be redefined with the code(\notenames) keyword.
198 See Section(notelang) for pitch names in different languages. Pitches
199 can only be specified inside note mode which is specified with
200 code(\notes). Therefore, keywords which require pitch arguments must
201 appear inside code(\notes).
204 Music is a compound type: arbitrarily complicated expressions with a
205 hierarchical structure can be formed from simple building blocks. The
206 simplest expression of type music is a single note. A note is formed
207 from a pitch and an optional duration and must be specified within
208 code(\notes). See Section ref(notedesc) for details. More
209 complicated expressions of type music are formed by surrounding a
210 sequence of expressions of type music with braces code({) and code(})
211 or with angle brackets code(<) and code(>). Items appearing in braces
212 will be treated as serial. Items in angle brackets will be
213 simultaneous. So for example code({ c e g }) represents an arpeggio
214 and code(< c e g >) represents a chord. These items can be nested any
215 way you like. This simple example shows how three chords can be
216 expressed in two different ways:
217 mudela(fragment,verbatim,center)(
218 \notes<{a b c'}{c' d' e'}{e' f' g'}>
219 \notes{<a c' e'><b d' f'><c' e' g'>}
226 Compound types are built up from the simple types. The compound types
227 are: arglist, assignlist and musiclist. An arglist is a
228 white space separated list of integers, reals and or strings surrounded
229 by braces code({) and code(}). An assignlist is a list of
230 identifier assignments, which have the form var(key)code(=)var(value).
231 A statement in Mudela has one of three forms:
232 verb(\keyword argument
233 \keyword argument1 argument2 ... ;
239 Identifiers allow names to be assigned to constants, music, or other
240 Mudela structures. To assign an identifier you use
241 var(name)=var(value) and to refer to an identifier, you preceed its
242 name with a backslash: code(\)var(name). It is legal to redefine an
243 identifier in terms of its old value: code(foo = \foo * 2.0).
244 Identifier assignments must appear at the top level in the Mudela
247 An identifier can be created with any string for its name, but you
248 will only be able to refer to identifiers whose names begin with a
249 letter and are entirely alphanumeric. It is also impossible to refer
250 to an identifier whose name is the same as the name of a keyword. The
251 following words are keywords:
252 verb(absdynamic duration mark property skip
253 accepts font midi pt spandynamic
254 alternative grouping mm relative tempo
255 bar header musicalpitch remove time
256 cadenza in name repeat times
257 chordmodifier include notenames scm translator
258 chords key notes scmfile transpose
259 clef keysignature paper score type
260 cm lyrics partial script version
261 consists maininput penalty shape)
263 The right hand side of an identifier assignment is parsed completely
264 when the assignment is made. It therefore must have any context
265 specified in the definition. For example, you must write
266 code(foo=\notes{a8 b c}) rather than code(foo={a8 b c}). Even though
267 the context is specified in the definition, you must refer to the
268 identifier inside the correct context:
269 verb(foo = \paper{ linewidth = 6.0\in; }
274 If code(\foo) is used here without the surrounding code(\paper) then
275 an error will result. Note however that the following is acceptible
276 verb(foo = \notes { ... }
278 It is not necessary to specify code(\notes).
280 Identifiers can be set equal to integers, reals, strings, music,
281 durations (specified with code(\duration)), note ornaments (specified
282 with code(\script), dynamics commands, or code(:)), note name tables
283 (specified with code(\notenames), translator definitions, the
284 code(\paper) block, the code(\midi) block or the code(\score) block.
285 When identifiers are used for translators, the code(\paper),
286 code(\midi), and code(\score) blocks, they may only be referred to as
287 the first item in a block. So code(\paper{\one \two}) is illegal
288 because the identifier code(\two) is not the first thing in the block.
289 Unlike other identifier definitions, translator identifier definitions
290 can only appear within code(\midi) or code(\paper) blocks. See
291 Section ref(translators) for more information.
295 subsect(Hierarchical structures)
297 The general structure consists of declarations:
298 verb(IDENTIFIER = \TYPE{
303 verb(\TYPE{ <type specific data> })
305 (Currently, code(\score) is the only type that can be instantiated
308 Most instantiations that use an IDENTIFIER are specified as follows:
310 verb(\TYPE{ \IDENTIFIER [...] })
312 Some exceptions on this rule have been made to prevent inputting
313 Mudela becoming tedious
320 To simplify different aspects of music definition (entering the notes
321 and manipulating them) Mudela has three different input modes which
322 affect how unquoted strings are interpreted.
323 In each mode, words are identified on the input. If code("word") is
324 encountered, it is treated as a string. If code(\word) is
325 encountered it is treated as a keyword or as an identifier. The
326 behavior of the modes differs in two ways: different modes treat
327 unquoted words different, and different modes have different rules for
328 deciding what is a word.
333 At the start of parsing, Mudela is in normal mode.
334 In normal mode, a word is an alphabetic character followed by
335 alphanumeric characters. If code(word) is encountered on the input it
336 is treated as a string.
338 dit(Note mode) Note mode is introduced by the keyword
339 code(\notes). In Note mode, words can only contain alphabetic
340 characters. If code(word) is encountered, LilyPond first checks for a
341 notename of code(word). If no notename is found, then code(word) is
342 treated as a string. If you mistype a notename, the parser will most
343 likely complain that you should be in code(\lyrics) mode to do lyrics.
345 dit(Chord mode) Chord mode is instroduced by the keyword code(\chords).
346 Very similar to Note mode.
347 COMMENT(I'm not sure how it differs)
349 dit(Lyric mode) Lyrics mode is introduced by the keyword
350 code(\lyrics). This mode is has rules that make it easy to include
351 punctuation and diacritical marks in words. A word in Lyrics mode
352 begins with: an alphabetic character, code(_),
353 code(?), code(!), code(:), code('),
354 the control characters code(^A) through code(^F), code(^Q) through
355 code(^W), code(^Y), code(^^), any 8-bit character with ASCII code over
356 127, or a two character combination of a backslash followed by one
357 of code(`), code('), code(") or code(^).
358 Subsequent characters of a word can be any character that is not a
359 digit and not white space. One important consequence of this is that
360 a word can end with code(}), which may be confusing if you thought the
361 code(}) was going to terminate lyrics mode. Any code(_) characters
362 which appear in an unquoted word are converted to spaces, providing a
363 mechanism for introducing spaces into words without using quotes.
364 Quoted words can also be used in lyrics mode to specify words that
365 cannot be specified with the above rules. Here are some examples.
366 Not all of these words are printable by TeX().
367 verb(a&@&@&TSI|{[ % a word
369 1THtrhortho % not a word because it starts with a digit
370 ``Hello'' % not a word because it starts with `
371 Leise DOEXPAND(Fl\)DOEXPAND("u\)ss{}teren meine Sapfe % 4 words
372 _ _ _ _ % 4 words, each one a space
375 It is possible to create words that break the rules by prefixing them with the
376 dollar sign code($). Regardless of the context, a word beginning with code($)
377 extends until the next white space character. Such words can contain numbers
378 (even in Note mode), or other forbidden characters. The dollar sign can be
379 used to create and access identifiers that could not otherwise be used.
382 These modes are of a lexical nature. Normal and Note mode largely
383 resemble each other, save the possibility of entering Reals,
384 meaning of code(_) and the resolution of words
386 What's this about reals? When can you enter them or not enter them?)
389 sect(Note Description)
392 subsect(Basic Note Specification)
394 A note specification has the form
395 var(pitch)[var(octavespec)][code(!)][code(?)][var(duration)].
396 The pitch of the note is specified by the note's name.
398 LilyPond has predefined note names for various languages. The default
399 names are the Dutch note names. The notes are specified by the
400 letters code(c) through code(b), where code(c) is an octave below
401 middle C and the letters span the ocatave above that C.
402 In Dutch, a sharp is formed by adding
403 code(-is) to the end of a pitch name. A flat is formed by adding code(-es).
404 Double sharps and double flats are obtained by adding code(-isis) or
406 Lily has predefined sets of notenames
407 for various nop(languages). See Section ref(notelang) for details.
408 Rests are specified with the note name code(r) or code(R).
409 There is also a note name code(s) which produces a nonprinting note of the
412 The optional octave specification takes the form of a series of single
414 code(') characters or a series of comma code(,) characters. Each
415 code(') raises the pitch by one octave; each code(,) lowers the pitch
418 mudela(fragment,verbatim,center)(
419 c' d' e' f' g' a' b' c''
422 mudela(fragment,verbatim,center)(
423 cis' dis' eis' fis' gis' ais' bis'
426 mudela(fragment,verbatim,center)(
427 ces' des' es' fes' ges' as' bes'
430 mudela(fragment,verbatim,center)(
431 cisis' eisis' gisis' aisis' beses'
434 mudela(fragment,verbatim,center)(
435 ceses' eses' geses' ases' beses'
438 Whenever a C-sharp is desired, you must specify a C-sharp. LilyPond
439 will determine what accidentals to typeset depending on the key and
441 A reminder accidental can be forced by
442 using the optional exclamation mark `code(!)'
444 A cautionary accidental, i.e., an accidental within paranthesis
445 can be obtained using the optional question mark `code(?)' on the pitch.
446 mudela(fragment,verbatim,center)(
447 cis' d' e' cis' c'? d' e' c'!
451 Durations are entered as their reciprocal values
452 mudela(fragment,verbatim,center)(
453 a'1 a'2 a'4 a a'8 a a'16 a'32 a'64
455 mudela(fragment,verbatim,center)(
459 If the duration is omitted then it is set equal to the previous
460 duration. If there is no previous duration, then a quarter note is
462 The duration can be followed by a dot code(.) to obtain dotted note
464 mudela(fragment,verbatim,center)(
468 Extra long notes can be obtained using the code(\breve) and
469 code(longa) durations:
470 mudela(fragment,verbatim,center)(
474 In order to get triplets and other tuplets, you must use the
475 code(\times) keyword which multiplies the duration by a fraction. The
476 syntax is code(\times) var(fraction) var(music). The length of all of
477 the specified music will be multiplied by the fraction and the
478 fraction's denominator will be printed over the notes. The most
479 common tuplet is the triplet in which 3 notes have the length of 2, so
480 the notes are 2/3 their written length:
481 mudela(fragment,verbatim,center)( b'4 \times 2/3 {c'4 c' c'} d'4 d'4 )
482 If you try to use code(\times) as the first thing in your music, you
483 may encounter the warning ``No one to print a tuplet start bracket''.
484 This happens because the Tuplet-engraver is in Voice and no Voice has
485 been created yet. You must explicitly specify the Voice context in
487 mudela(fragment,verbatim,center)(
488 \type Voice { \times 2/3 {c'4 d' e'}}
491 A shorthand for code(\times) is to write code(*)var(fraction) after a
492 duration. This shorthand will not label triplets correctly, but
493 it is convenient for long rests.
494 For long rests with durations equal to an integer number of whole notes,
495 LilyPond produces output that indicates the duration of the rest. If you use
496 code(r) then one rest symbol will be printed and several measures left blank.
497 If you use code(R) then all of the measure will be filled with whole rests.
498 mudela(fragment,verbatim,center)(
501 If you set the code(Score.SkipBars) property, then only one measure will be
502 printed; with code(R), a number indicating the length of the rest will be
504 mudela(fragment,verbatim,center)(
505 \property Score.SkipBars=1
508 Even though the code(\times) command is not explicit, it is still
509 necessary to specify a code(Voice) context if the music begins with
510 rests lengthened using code(*).
511 Otherwise, the following will result:
512 mudela(fragment,verbatim,center)(
516 subsect(Note Spanners: Beams, Slurs and Ties)
518 A beam is specified by surrounding the beamed notes with brackets
520 mudela(fragment,verbatim,center)(
521 [a'8 a'] [a'16 a' a' a']
523 Some more elaborate constructions:
524 mudela(fragment,verbatim,center)(
525 [a'16 <a' c''> c'' <a' c''>]
526 \times 2/3 { [e'8 f' g'] }
529 Another type of spanner is the slur. Slurs connects chords and try to
530 avoid crossing stems. A slur is started with code(CHAR(40)) and stopped with
531 code(CHAR(41)). The starting code(CHAR(40)) appears to the right of the first note
532 in the slur. The terminal code(CHAR(41)) apppears to the left of the first
533 note in the slur. This makes it possible to put a note in slurs from
535 mudela(fragment,verbatim,center)(
536 f'()g'()a' [a'8 b'(] a'4 g' )f'
539 A tie connects two adjacent note heads. When used with chords, it
540 connects all of the note heads. Ties are indicated using the tilde symbol
541 code(~) by analogy with TeX()'s tie which connects words.
543 mudela(fragment,verbatim,center)(
544 e' ~ e' <c' e' g'> ~ <c' e' g'>
547 It is possible to create beams and slurs that cross staffs by switching the
549 mudela(fragment,verbatim,center)(
551 \type Staff=one \notes\relative c'{
553 [c8 c \translator Staff=two \stemup c c]
554 \translator Staff=one
555 d4( \translator Staff=two )a4
557 \type Staff=two \notes{ \clef bass;}
562 COMMENT(!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
564 subsect(Note Ornaments)
566 A variety of symbols can appear above and below notes to indicate
567 different characteristics of the performance.
569 added to a note with `var(note)code(-\)var(name)'. Numerous different
570 symbols are defined in file(script.ly). Each symbol is defined using
571 the code(\script) keyword which specifies where symbols appear.
572 Symbols can be forced to appear above the note by writing
573 `var(note)code(^\)var(name)', and they can be forced to appear below
574 by writing `var(note)code(_\)var(name)'. Here is a chart showing
575 symbols above notes, with the name of the corresponding symbol
576 appearing underneath.
580 < \notes{ c''-\accent c''-\marcato c''-\staccatissimo f'-\fermata
581 c''-\stopped c''-\staccato c''-\tenuto c''-\upbow c''-\downbow
582 c''-\lheel c''-\rheel c''-\ltoe c''-\rtoe c''-\turn
583 c''-\open c''-\flageolet c''-\reverseturn
585 c''-\prall c''-\mordent c''-\prallprall c''-\prallmordent
586 c''-\upprall c''-\downprall c''-\thumb }
587 \type Lyrics \lyrics{
588 accent marcato staccatissimo fermata stopped
589 staccato tenuto upbow downbow lheel rheel ltoe rtoe turn
590 open flageolet reverseturn
592 mordent prallprall prallmordent uprall downprall thumb }
594 \paper{ linewidth = 5.875\in;
599 COMMENT( The following are defined in script.ly but do not work:
601 portato lbheel rbheel lbtoe rbtoe lfheel rfheel lftoe rftoe )
603 In addition, it is possible to place arbitrary strings of text or
604 TeX() above or below notes by using a string instead of an identifier:
605 `code(c^"text")'. Fingerings can be placed by simply using digits.
606 All of these note ornaments appear in the printed output but have no
607 effect on the MIDI rendering of the music.
609 To save typing, a few common symbols can be abbreviated with
613 \property Voice.textstyle = typewriter
619 c''4-^_"c-\\^{ }" s4 }
620 \paper { linewidth = 12.\cm; }})
622 Dynamic marks are specified by using an identifier after a note
623 without a dash: code(c4 \ff). Note that this syntax is inconsistent
624 with the syntax for other types of ornaments. The available dynamic
625 marks are: code(\pppppp), code(\ppppp), code (\pppp), code(\ppp), code(\pp),
626 code(\p), code(\mp), code(\mf), code(\f), code(\ff), code(\fff),
627 code(\ffff), code(\fffff), code(\ffffff),
628 code(\fp), code(sf), code(\sff), code(\sp), code(\spp), (\sfz) and code (\rfz).
630 A crescendo mark is started with code(\cr) and terminated with
631 code(\rc). A decrescendo mark is started with code(\decr) and
632 terminated with code(\rced). There are also shorthands for these
633 marks. A crescendo can be started with code(\<) and a decrescendo can
634 be started with code(\>). Either one can be terminated with code(\!).
635 Note that code(\!) must go before the last note of the dynamic mark whereas
636 code(\rc) and code(\rced) go after the last note. Because these marks are
637 bound to notes, if you want to get several marks during one note, you must use
639 mudela(fragment,verbatim,center)(
640 c'' \< \! c'' d'' \decr e'' \rced
641 < f''1 {s4 \< \! s4 \> \! s2 } >)
644 COMMENT(Broken!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
646 Tremolo marks can be printed by a note by adding code(:)[var(length)]
647 after the note. The length must be at least 8. A var(length) value
648 of 8 gives one line across the note stem.
649 If the length is omitted,
650 then the last value is used, or the value of the code(Abbrev)
651 property if there was no last value. To place tremolo marks in
652 between two notes, begin with code([:)var(length) and end with code(]).
653 The tremolo marks will appear instead of beams. Putting more than two
654 notes in such a construction will produce odd effects.
656 [TREMOLO BEAMS TEMPORARILY OUT OF ORDER]
658 COMMENT(mudela (fragment,verbatim,center)(
659 c'2:8 c':32 [:16 e'1 g'] [:8 e'4 f']
663 Is the last paragraph correct? Is it called "tremolo"? Why is
664 "abbreviation" used? (What is the unabreviated form?)
667 mudela (fragment,verbatim,center)(
674 sect(Other Ways to Enter Pitches)
676 subsect(Pitch Names in Other Languages)
679 The pitch names can be easily redefined using the code(\notenames) command.
680 Note name definitions have been provided in various languages.
681 Simply include the language specific init file. For example:
682 code(\include "english.ly"). The available language files and the names
685 verb( Note Names sharp flat
686 nederlands.ly c d e f g a bes b -is -es
687 english.ly c d e f g a bf b -s/-sharp -f/-flat
688 deutsch.ly c d e f g a b h -is -es
689 norsk.ly c d e f g a b h -iss/-is -ess/-es
690 svenska.ly c d e f g a b h -iss -ess
691 italiano.ly do re mi fa sol la sid si -d -b)
693 subsect(Relative Pitch Specification)
696 One very common error when entering music is to place notes in the wrong
697 octave. One way to avoid being confused by large numbers of octave changing
699 the code(\relative) keyword.
700 Music which appears within code(\relative) is
701 interpreted differently. The octave of a note is determined by making it as
702 close to the previous note as possible. The octave changing marks code(') and
703 code(,) can then be added to raise or lower this note by octaves. You have to
704 specify a starting pitch because the first note of a list has no predecessor.
706 mudela(fragment,verbatim,center)(
707 \relative c'' { c d b c, d b c' d
711 When the preceeding item is a chord, the first note of the chord is used to
712 determine the first note of the next chord. But other notes within the second
713 chord are determined by looking at the immediately preceeding note.
715 mudela(fragment,verbatim,center)(
716 \relative c' { <c e g>
720 The code(\relative) keyword can only appear in music, so there must be a
721 surrounding code(\notes) keyword which does not appear in the fragments shown
722 above. Also note that if the music passed to a code(\relative) keyword
723 contains a code(\transpose) keyword, the tranposed music will not be
724 processed in relative mode. An additional code(\relative) must be placed
725 inside the code(\transpose).
728 subsect(Tranposition of Pitches)
731 Another way to modify the meaning of the note names is to use the
732 code(\transpose) keyword. This keyword allows you to transpose music.
733 To use transposition, specify the pitch that middle C should be tranposed to.
734 It is important to distinguish between enharmonic pitches as they can produce
735 different transpositions. To transpose up half a step, for example, either
736 code(\transpose cis') or code(\transpose des') will work. But the first
737 version will print sharps and the second version will print flats.
738 In this example, a scale in the key of E is transposed to F, or to E-sharp
740 mudela(fragment,verbatim,center)(
741 \relative c' { \key e;
742 e fis gis a b cis dis e }
744 mudela(fragment,verbatim,center)(
745 \transpose des' \relative c' { \key e;
746 e fis gis a b cis dis e }
748 mudela(fragment,verbatim,center)(
749 \transpose cis' \relative c' { \key e;
750 e fis gis a b cis dis e }
752 If you want to use both code(\transpose) and code(\relative), then you must use
753 code(\transpose) first. Any code(\relative) keywords that are outside the
754 code(\transpose) have no effect on notes that appear inside the
759 Chords can be entered either by name or by listing the notes in angle brackets.
760 Chords can be displayed either as notes or by name. To enter chords by name,
761 either place them inside the code(\chords) keyword, or use
762 code(\notes) and surround them with
764 Chord names have the form
765 var(tonic)[var(duration)][code(-)var(modifier)][code(^)var(subtractions)][code(/)var(inversion)]
766 The var(tonic) should be the tonic note of the chord, and the var(duration) is
767 the chord duration in the usual notation. There are two kinds of modifiers.
768 One type is chord additions, which are obtained by listing intervals separated
769 by dots. An interval is written by its number with an optional code(+) or
770 code(-) to indicate raising or lowering by half a step. A chord additions has
771 two effects: it adds the specified interval and all lower odd numbered
772 intervals to the chord, and it may lower or raise the specified interval.
773 Intervals can be separated by a dot (code(.)) if you need to list
774 several unmodified intervals.
775 Repeating a code(-) character will remove a half step from the preceeding
777 mudela(fragment,verbatim,center)(
781 c-9-5+7+ c-3-5- c-4.6.8
783 The second type of modifier that may appear after the code(-) is
785 Named modifiers are listed in the file file(chord-modifiers.ly). The
786 available modifiers are code(m) and code(min) which lower
787 the 3rd half a step, code(aug) which raises the 5th, code(dim) which lowers
788 the 5th, code(maj) which adds a raised 7th, and code(sus) which replaces the
790 mudela(fragment,verbatim,center)(
793 c1-m c-min c-maj c-aug c-dim c-sus
796 Chord subtractions are used to eliminate notes from a chord. The notes to be
797 subtracted are listed after a code(^) character, separated by dots.
798 mudela(fragment,verbatim,center)(
804 Chord inversions can be specified by appending code(/) and the name of a
805 single note to a chord. This has the effect of lowering the specified note by
806 an octave so it becomes the lowest note in the chord. If the
807 specified note is not in the chord then a warning will be printed.
808 mudela(fragment,verbatim,center)(
810 @c1@ @c/e@ @c/g@ @c-7/e@
812 Throughout these examples, chords have been shifted around the staff
813 using code(\transpose). The code(\relative) keyword has odd effects
814 when combined with named chords.
816 For displaying printed chord names, use the code(ChordNames) context.
817 The chords may be entered either using the notation described above,
818 or directly using angle brackets.
819 mudela(fragment,verbatim)(
821 \type ChordNames { \chords{ a b c} \notes{ < d f g > < e g b > } }
822 \type Staff \notes{ a b c' d' e' }
825 Lilypond examines chords specified as lists of notes to determine a
826 name to give the chord. By default, LilyPond will not try to identify
828 mudela(fragment,verbatim,center)(
831 \notes{ < e' g' c'' > } }
832 \type Staff \notes{ c' }
834 If you want inversions to be recognized, you must set the property
835 code(Score.chordInversion):
836 mudela(fragment,verbatim,center)(
838 \property Score.chordInversion = 1
840 \notes{ < e' g' c'' > } }
841 \type Staff \notes{ c' }
846 chordInversionPreserve
847 and chordNameStyle = Banter
848 exist. What do these do?
854 Lyrics are entered like notes, with pitches replaced
855 by text. For example code(Twin-4 kle4 twin-4 kle4) enters four
856 syllables, each with quarter note duration. Note that the hyphen has
857 no special meaning for lyrics, and does not introduce special symbols.
858 See Section ref(modes) for a description of what is interpreted as a lyric.
860 In order to instruct LilyPond to write lyrics underneath the
861 staff, you must enter the lyrics context with code(\type Lyrics).
862 Lyrics should be entered in lyrics mode which is entered with code(\lyrics).
864 Spaces can be introduced into a lyric either by using quotes (code("))
865 or by using an underscore without quotes: code(He_could4 not4). All
866 unquoted underscores are converted to spaces. Here is a full example:
867 mudela(verbatim)(\score{
868 < \notes \transpose c'' {c d e c | c d e c | e f g'2 |
869 e'4 f g'2 \bar "|."; }
870 \type Lyrics \lyrics {
871 DOEXPAND(Fr\)`e-4 re Ja- que DOEXPAND(Fr\)`e- re Ja- que
872 Dor- mez vous?2 Dor-4 mez vous?2 }
880 Why does this warrant an URG?
883 When one word is attached to many notes, you may
884 want a continuous line after the lyric to show this. To achieve
885 this effect, add a code(__) lyric after the lyric to be extended.
887 an extender, a line that extends over the entire duration of
888 the lyric. There must be a lyric after the code(__), so if you want
889 to extend the final lyric, you will have to end with a blank lyric.
890 mudela(verbatim,center)(
892 < \notes \relative c''{
893 a4()b()c()d c()d()b()a }
894 \type Lyrics \lyrics {
899 COMMENT(Broken!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
904 LilyPond aligns all musical objects according to the amount of time
905 they occupy. All musical objects have a duration. When music is
906 written sequentially using braces the duration is the sum of the
907 durations of the elements. When music is stacked into simultaneous music
909 brackets, the duration is the maximum of the durations of the
912 Because LilyPond knows the durations of all musical elements, the time
913 signature enables LilyPond to draw bar lines automatically. The time
914 signature is specified with the code(\time) keyword: code(\time 3/4).
915 If no time signature is given, LilyPond assumes 4/4. The automatic
916 generation of bar lines can toggled with the code(\cadenza) keyword,
917 and an incomplete measure at the start of the music can be created
918 using the code(\partial) keyword: code(\partial 8*2;) creates a
919 starting measure lasting two eighth notes.
921 In order to help with error checking, you can insert bar markers in
922 your music by typing code(|). Whenever LilyPond encounters a code(|)
923 that doesn't fall at a measure boundary, she prints a warning message.
925 Rhythmic grouping is a concept closely associated with this.
926 A default grouping is selected for the chosen time signature.
927 The default consists of combinations of 2 and 3 beats with as many
928 groups of 3 as possible, and the groups of 3 coming first. For
929 example, 4/4 is divided into 2+2 and 8/8 is divided into 3+3+2. This
930 default grouping can be changed using the \grouping keyword which
931 takes a list of durations to specify the grouping.
935 sect(Composition: forming bigger structures)
938 The computer savy user may be interested in a more formal
939 specification. We can capture what have learned about forming
940 sentences in Mudela in a context-free grammar.
942 latexcommand(\smallskip)
945 row(cell(em(Music))cell(: em(Note)))
946 row(cell()cell(code(|) em(Rest)))
947 row(cell()cell(code(|) code({) em(MusicList) code(})))
948 row(cell()cell(code(|) code(<) em(MusicList) code(>)))
949 row(cell()cell(code(|) em(Command)))
950 row(cell()cell(code(|) code(\type) em(string) code(=) em(string) em(Music)))
952 row(cell(em(MusicList))cell(: em(empty)))
953 row(cell()cell(code(|) em(MusicList) em(Music)))
957 latexcommand(\smallskip)
959 In mathematics you can form expressions by combining expressions,
960 which are ultimately some kind of atom or terminal symbol. The same
961 goes for Mudela: there are some basic building blocks, and by
962 combining those you create complex music.
964 You can combine music in three ways:
966 it()If you enclose a sequence of music-elements in braces ( code({)
967 and code(}) ), then you form another kind of music called
970 The duration of sequential composition is the sum of the durations of its elements
972 { c c g g a a g2 } % twinkle twinkle
973 { { c c g g} { a a g2 } }
975 it()You can stack music by enclosing a sequence of music elements
976 with code(<) and code(>). This is called simultaneous music.
977 The duration of a simultaneous composition is the maximum of the durations
978 of its elements Example:
980 <a4 {cis8 cis8} e'4> % a-major chord
982 it()You can form music by transposing music:
985 d % from c to the d that's almost one octave down
986 { e4 f4 } % the horizontal music
990 it()verb(\translator)
994 Of course you can also combine these three mechanisms.
996 { c <c e> <c e g> <c e g \transpose d' dis > } % 4 increasing chords
1004 In order to specify repeats, use the code(\repeat) keyword. By
1005 default, repeats are printed with repeat symbols.
1006 mudela(fragment,verbatim,center)(
1008 \repeat 2 { c'4 d' e' f' }
1009 \repeat 2 { f' e' d' c' })
1010 In order to specify alternate endings, use the code(\alternative)
1012 mudela(fragment,verbatim,center)(
1014 \repeat 2 {c'4 d' e' f'}
1015 \alternative { {d'2 d'} {f' f} })
1016 When the repeats involve partial measures, it will be necessary to use
1017 code(\partial) keywords to indicate which measures are short.
1018 mudela(fragment,verbatim)(
1019 \type Staff { \relative c'{
1020 \repeat 2 { \partial 4; e | c2 d2 | e2 f2 | }
1021 \alternative { { g4 g g } {\partial 2.; a a a a | b1 } }
1023 Repeats can be unfolded by setting the unfoldRepeats
1028 Keywords sometimes appear alone, but usually they require arguments.
1029 A keyword may have a single argument, a sequence of arguments in
1030 braces, or a sequence of arguments separated by spaces and terminated
1031 by a semicolon. The precise syntax of each keyword is shown below.
1032 Keywords must appear in the right context. If you use a keyword in
1033 the wrong place, even if the usage is syntactically correct, you will
1034 get the message ``parse error'' from LilyPond.
1039 dit(code(\absdynamic) code({) var(code) code(})) Internal keyword for
1040 printing dynamic marks such as $f$ under music. The parameter
1041 var(code) is unsigned and specifies the dynamic mark to print.
1042 Normally you should use the more user friendly abbreviations defined
1043 in the init file file(dynamic.ly).
1045 dit(code(\accepts) var(string)code(;)) This keyword can appear only within a
1046 code(\translator) block. It specifies what contexts are allowed with the
1047 context that is being defined. See Section ref(translators).
1049 dit(code(\alternative) code({) var(music1) var(music2) ... code(}))
1050 Specifies alternative endings. Must come after a code(\repeat) keyword.
1052 dit(code(\bar) var(bartype)code(;)) Prints a special bar symbol, or at
1053 measure boundaries, replaces the regular bar symbol with a special
1054 symbol. The argument var(bartype) is a string which specifies the
1055 kind of bar to print. Options are code(":|"), code("|:"),
1056 code(":|:"), code("||"), code("|."), code(".|"), or code(".|.").
1057 These produce respectively a right repeat, a left repeat, a double
1058 repeat, a double bar, a start bar, an end bar, or a thick double bar.
1059 If var(bartype) is set to code("empty") then nothing is printed, but a
1060 line break is allowed at that spot. Note that the printing of special bars
1061 has no effect on the MIDI output.
1063 dit(code(\cadenza) var(togglevalue)code(;)) Toggles the automatic generation
1064 of bar lines. If var(togglevalue) is 0 then bar line generation is
1065 turne off. If var(togglevalue) is 1 then a bar is immediately
1066 printed and bar generation is turned on.
1068 dit(code(\clef) var(clefname)code(;)) Allowed only in music.
1069 Sets the current clef. The argument is
1070 a string which specifies the name of the clef. Several clef names are
1071 supported. If code(_8) or code(^8) is added to the end of a clef
1072 name then the clef lowered or raised an octave will be generated.
1073 Here are the supported clef names with middle C shown in each clef:
1077 %\property Voice.textstyle = typewriter
1078 \clef subbass; c'4-"\kern-10mm subbass"
1079 \clef bass; c'4^"\kern -8mm bass"
1080 \clef baritone; c'4_"\kern -10mm baritone"
1081 \clef varbaritone; c'4^"\kern -10mm varbaritone"
1082 \clef tenor; c'4_"\kern -10mm tenor"
1083 \clef "G_8"; c'4^"\kern -6mm G\_8" }
1084 \paper{ linewidth= 4.5 \in; }
1089 \notes{\cadenza 1; \clef alto; c'4_"\kern -10mm alto"
1090 % \clef scarlatti; c'4_"\kern -4mm scarlatti"
1091 \clef mezzosoprano; c'4^"\kern -10mm mezzosoprano"
1092 \clef soprano; c'4_"\kern -10mm soprano"
1093 \clef treble; c'4^"\kern -6mm treble"
1094 \clef french; c'4_"\kern -10mm french" }
1095 \paper{ linewidth= 4.5 \in; }
1098 The treble clef can also be obtained using the names code(G) or
1099 code(violin). The bass clef is also available by code(\clef F).
1101 dit(code(\cm)) Specify a dimension in centimeters.
1103 dit(code(\consists) var(string)code(;)) This keyword can appear only within a
1104 code(\translator) block. It specifies that an engraver or performer named
1105 var(string) should be added to the translator. See Section
1108 dit(code(\duration) code({) var(length) var(dotcount) code(})) Specify note
1109 duration. The parameter var(length) is the negative logarithm (base
1110 2) of duration: 1 is a half note, 2 is a quarter note, 3 is an eighth
1111 note, etc. The number of dots after the note is given by
1114 dit(code(\font) var(string)) Internal keyword. Used within
1115 code(\paper) to specify the font.
1117 dit(code(\grouping) var(durationseq)code(;)) Sets the metric structure of
1118 the measure. Each argument specifies the duration of one metric unit.
1119 For example, code(\duration 16*5;) specifies a grouping of five beats
1120 together in 5/16 time. The default grouping is to have as many groups
1121 of 3 as possible followed by groups of two.
1123 dit(code(\header) code({) var(key1) = var(val1); var(key2) = var(val2); ... code(}))
1124 Specifies information about the music. A header should appear at the
1125 top of the file describing the file's contents. If a file has
1126 multiple code(\score) blocks, then a header should appear in
1127 each score block describing its contents. Tools like code(ly2dvi) can
1128 use this information for generating titles. Key values that are used
1129 by ly2dvi are: title, subtitle, composer, opus, poet, instrument,
1130 metre, arranger, and piece.
1132 dit(code(\in)) Specify a dimension in inches.
1134 dit(code(\include) var(file)) Include the specified file. The
1135 argument var(file) is a string. The full filename including the
1136 file(.ly) extension must be given, and the filename must be quoted.
1137 (An unquoted string will not work here.)
1139 dit(code(\key) var(pitch) var(type) code(;)) Change the key signature.
1140 var(type) should be code(\major) or code(\minor) to get
1141 var(pitch)-major or var(pitch)-minor, respectively. The second
1142 argument is optional, the default is major keys.
1143 The var(\type) argument can also be given as an integer, which tells
1144 the number of semitones that should be added to the pitch given in the
1145 subsequent code(\key) commands to get the corresponding major key,
1146 e.g. code(\minor) is defined as 3.
1148 dit(code(\keysignature) var(pitchseq)code(;))
1149 Specify an arbitrary key signature. The pitches from var(pitch) will
1150 be printed in the key signature in the order that they appear on the list.
1152 dit(code(\lyrics) var(lyriclist)) Parse var(lyriclist) in lyrics mode.
1154 dit(code(\maininput)) Internal command. This command is used for creating init
1155 files like file(init.fly) that read the user file into the middle of another
1156 file. It is illegal to use this command in a user file.
1158 dit(code(\mark) var(unsigned)code(;) or code(\mark) var(string)code(;))
1159 Allowed in music only. Prints a mark over or under (depending on the
1160 code(markDirection) property) the staff.
1161 You must add code(Mark_engraver) to the Score context.
1163 dit(code(\midi) var(statementlist)) Appears in a score block to
1164 indicate that musical output should be produced and to set output
1165 parameters. Can also appear at the top level to set default output
1166 parameters. See code(\tempo).
1168 dit(code(\mm)) Specify a dimension in millimeters.
1170 dit(code(\musicalpitch) code({) var(octave) var(note) var(shift) code(}))
1171 Specify note pitch. The octave is specified by an integer,
1172 zero for the octave containing middle C. The note is a number from 0
1173 to 7, with 0 corresponding to C and 7 corresponding to B. The shift
1174 is zero for a natural, negative to add flats, or positive to add
1177 dit(code(\name) var(context)code(;)) Appears within code(\translator) to
1178 specify the name of the context that the translator handles. See Section
1181 dit(code(\notenames) var(assignmentlist)) Define new note names. This
1182 keyword can appear only at the top level.
1183 The argument is a list of definitions of the form
1184 var(name) = var(pitch), where var(pitch) is specified with the
1185 code(\musicalpitch) keyword.
1187 dit(code(\notes) var(music)) Enter note mode and process the
1190 dit(code(\paper) var(statmentlist))
1191 Appears in a score block to indicate that the music should be printed
1192 or to set output parameters. Can also appear at the top level to set
1193 default output parameters for all of the score blocks.
1194 The var(statmentlist) contains statements that change features of the
1195 output. See Section ref(paper).
1197 dit(code(\partial) var(duration)code(;)) Specify that the first measure of
1198 the music lasts only for the specified duration.
1200 dit(code(\penalty) code(=) var(int)code(;)) Allowed only in music.
1201 Discourage or encourage line breaks. See identifiers code(\break) and
1202 code(\nobreak) in Section ref(ident).
1204 dit(code(\property) var(contextname)code(.)var(propname) code(=) var(value))
1205 Sets the var(propname) property of the context var(contextname) to the
1206 specified var(value). All three arguments are strings. Depending on
1207 the context it may be necessary to quote the strings or to leave space
1208 on both sides of the dot.
1210 dit(code(\pt)) Specify a dimension in points.
1212 dit(code(\relative) var(pitch) var(music)) Processes the specified
1213 var(music) in relative pitch
1214 mode. In this mode, the octave of a pitch is chosen so that the
1215 pitch is closest to the preceeding pitch.
1216 The argument var(pitch) is
1217 the starting pitch for this comparision. In the case of chords, the
1218 first note of a chord is used as the base for the first pitches in the next
1219 chord. See Section ref(relative).
1221 dit(code(\remove) var(string)code(;)) Can appear only in a
1222 code(\translator) block. Specifies that a performer or engraver named
1223 var(string) should be removed. See Section ref(translators).
1225 dit(code(\repeat) var(count) code({) var(music) code(}))
1226 Repeats the specified
1227 music var(count) times. Alternative endings can be specified by adding a
1228 code(\alternative) keyword after the code(\repeat).
1230 dit(code(\scm) var(scheme)code(;)) Embeds specified Scheme code.
1232 dit(code(\scmfile) var(filename)code(;)) Reads Scheme code from the specified
1235 dit(code(\score) var(statementlist)) Create a Score context. This
1236 is the top level notation context.
1237 COMMENT(this still needs work)
1239 dit(code(\script) code({) var(name) var(instaff) var(withstem)
1240 var(location) var(invertible) var(priority) code(})) This keyword is
1241 used the initialization file(script.ly) to define the various symbols
1242 that can appear above and below notes. The first argument is the name
1243 of the symbol. The second argument var(instaff) is 1 if the symbol
1244 follows the notehead into the staff and 0 if the symbol stays above or
1245 below the staff lines. The third parameter var(withstem) is 0 if the
1246 symbol's placement does not depend on the stem direction; it is 1 if
1247 the symbol should be at the stem end of the note and it is -1 if the
1248 symbol should be at the note head end of the note. The argument
1249 var(location) is set to 1 for symbols that always appear above the
1250 staff; it is -1 for symbols that appear below the staff. If
1251 var(invertible) is set to 1 then the symbol can be inverted; otherwise
1252 it cannot. The last argument var(priority) sets a priority for the
1253 order of placement of several symbols on a single note.
1255 dit(code(\shape) code(=) var(indent1) var(width1) var(indent2)
1256 var(width2) ... code(;)) Allowed only within code(\paper). Each pair
1257 of var(indent) and var(width) values is a dimension specifying how far
1258 to indent and how wide to make the line. The indentation and width of
1259 successive lines are specified by the successive pairs of dimensions.
1260 The last pair of dimensions will define the characeristics of all
1261 lines beyond those explicitly specified.
1263 COMMENT(First pair of dimensions seems to be skipped. At least it is
1264 in the example file denneboom.ly.)
1266 dit(code(\skip) var(duration)code(;)) Skips the amount of time specified by
1267 var(duration). A gap will be left for the skipped time with no notes
1268 printed. It works in Note Mode or Lyrics Mode (but generates a
1269 mysterious error in lyrics).
1271 dit(code(\spandynamic) code({) var(kind) var(toggle) code(})) Internal
1272 keyword for crescendo and decrescendo symbols. The first parameter
1273 var(kind) is set to 1 for a crescendo and -1 for a decrescendo. The
1274 second parameter is set to 1 to start the mark and 2 to stop it.
1275 Users should use the abbreviations which are defined in the
1276 initialization file file(dynamic.ly).
1278 dit(code(\tempo) var(duration) = var(perminute)code(;)) Used within
1279 code(\midi) or within music to specify the tempo. For example,
1280 `code(\midi { \tempo 4 = 76;})' requests output with 76 quarter notes
1281 per minute. Note that if the music contains several tempo commands,
1282 only the last one is used to set the tempo for the entire MIDI output.
1283 COMMENT(Is this true?)
1285 dit(code(\time) var(numerator)code(/)var(denominator)code(;)) Change the time
1286 signature. The default time signature is 4/4.
1288 dit(code(\times) var(numerator)code(/)var(denominator) var(music))
1289 Multiply the duration of var(music) by the specified fraction.
1291 dit(code(\translator) var(statements) or code(\translator)
1292 var(context) = var(name)) The first variant appears only within
1293 code(\paper) and specifies a translator for
1294 converting music to notation. The translator is specified with a
1295 single code(\type) statement and a series of code(\accepts), and
1296 code(\consists) statements. See Section ref(translators).
1297 The second variant appears in
1298 music. It specifies that the current the contexts
1299 contained within the specified context should be shifted to the
1300 context with the specified name.
1302 COMMENT( \translator seems like a strange name for the second
1303 operation, and is the overloading desireable? )
1305 dit(code(\transpose) var(pitch) var(music)) Transposes the specified
1306 music. Middle C is tranposed to var(pitch). This is allowed in music only,
1307 and if it appears inside code(\relative), then any notes specified for
1308 transposition should be specified inside another code(\relative). See Section
1311 dit(code(\type) var(contexttype) [code(=) var(contextname)]
1312 var(music) or code(\type) var(translatortype)code(;)) The first
1313 variant is used only within music to create an instance of a
1314 context. The new context can optionally be given a name. The
1315 specified var(music) is processed in the new context. The second
1316 variant appears within a code(\translator) block and specifies the
1317 type of translator being created.
1319 dit(code(\version) var(string)) Specify the version of Mudela that a
1320 file was written for. The argument is the version number, for example
1321 code("1.0.1"). Note that the Mudela version is different from the
1327 sect(Notation Contexts)
1329 Notation contexts provide information that appears in printed music
1330 but not in the music itself. A new musical context is created using
1331 the code(\type) keyword: `code(\type) var(contexttype) [code(=)
1332 var(contextname)] var(music)'. The following context types are
1337 dit(code(LyricVoice)) Corresponds to a voice with lyrics. Handles the printing
1338 of a single line of lyrics.
1340 dit(code(Voice)) Corresponds to a voice on a staff.
1341 This context handles the conversion of noteheads,
1342 dynamic signs, stems, beams, super- and subscripts, slurs, ties and rests.
1344 dit(code(ChordNamesVoice)) A voice with chord names. Handles printing
1345 of a line of chord names.
1347 dit(code(ChordNames)) Typesets chord names. Can contain
1348 code(ChordNamesVoice) contexts.
1350 dit(code(Lyrics)) Typesets lyrics. It can contain code(LyricVoice) contexts.
1352 dit(code(Staff)) Handles clefs, bar lines, keys,
1353 accidentals. It can contain code(Voice) contexts.
1355 dit(code(RhythmicStaff)) A context like code(Staff) but for printing
1356 rhythms. Pitches are ignored; the notes are printed on one line.
1357 It can contain code(Voice) contexts.
1359 dit(code(GrandStaff)) Contains code(Staff) or code(RhythmicStaff)
1360 contexts. It adds a brace on the left side grouping the staffs
1361 together. The bar lines of the contained staffs are connected vertically.
1362 It can contain code(Staff) contexts.
1364 dit(code(PianoStaff)) Just like code(GrandStaff) but with
1365 code(minVerticalAlign) set equal to code(maxVerticalAlign) so that
1366 interstaff beaming and slurring can be used.
1368 dit(code(StaffGroup)) Contains code(Staff) or code(RhythmicStaff)
1369 contexsts. Adds a bracket on the left side, grouping the staffs
1370 together. The bar lines of the contained staffs are connected vertically.
1371 It can contain code(Staff), code(RhythmicStaff), code(GrandStaff) or code(Lyrics) contexts.
1373 dit(code(ChoirStaff)) Identical to code(StaffGroup) except that the
1374 contained staffs are not connected vertically.
1376 dit(code(Score)) This is the top level notation context. It is specified with
1377 the code(\score) keyword rather than the code(\type) command. No
1378 other context can contain a code(Score) context. This context handles
1379 the administration of time signatures. It also makes sure that items
1380 such as clefs, time signatures, and key-signatures are aligned across
1381 staffs. It can contain code(Lyrics), code(Staff),
1382 code(RhythmicStaff), code(GrandStaff), code(StaffGroup), and
1383 code(ChoirStaff) contexts.
1387 The various contexts have properties associated with them. These
1388 properties can be changed using the code(\property) command:
1389 `code(\property) var(context)code(.)var(propname) code(=) var(value)'.
1390 Properties can also be set within the code(\translator) block
1391 corresponding to the appropriate context. In this case, they are
1392 assigned by `var(propname) code(=) var(value)'. The settings made with
1393 code(\property) are processed after settings made in the code(\translator)
1394 block, so the code(\property) settings will override code(\translator)
1397 The code(\property) keyword will create any property you specify.
1398 There is no guarantee that a property will actually be used. If you
1399 spell a property name wrong, there will be no error message. In order to find
1400 out what properties are used, you must search the source code
1401 for code(get_property).
1402 Properties that are set in one context are inherited by all of the
1403 contained contexts. This means that a property valid for the Voice
1404 context can be set in the Score context (for example) and thus take
1405 effect in all Voice contexts.
1407 subsubsubsect(Lyrics properties)
1411 dit(code(textstyle)) Set the font for lyrics. The available font
1412 choices are code(roman), code(italic), code(bold), code(large),
1413 code(Large), code(typewriter), and code(finger). The code(finger)
1414 font can only display numbers. Note also that you must be careful
1415 when using code(\property) in Lyrics mode. Because of the way strings
1416 are parsed, either put quotes around the arguments to code(\property)
1417 or be sure to leave a space on both sides of the dot.
1419 dit(code(textalignment)) Controls alignment of lyrics. Set to code(\left)
1420 to align the left end of the lyric with the note; set to code(\right) to
1421 align the right end of the lyric with the note. Set to code(\center) to
1422 align the center of the lyric with the note.
1426 subsubsubsect(Voice properties)
1430 dit(code("midi_instrument")) Sets the instrument for MIDI output. This
1431 property name must be quoted because of the embedded underscore. If
1432 this property is not set then LilyPond will use the code(instrument)
1433 property. This must be set to one of the strings on the list of MIDI
1434 instruments that appears in Section ref(midilist). If you use a
1435 string which is not listed, LilyPond will silently substitute piano.
1437 dit(code(transposing)) Tranpose the MIDI output. Set this property to
1438 the number of half-steps to transpose by.
1440 dit(code(ydirection)) Determines the direction of stems, subscripts,
1441 beams, slurs, and ties. Set to code(\down) to force them down,
1442 code(\up) to force them up, or code(\free) to let LilyPond decide.
1443 This can be used to distinguish between voices on the same staff. The
1444 code(\stemdown), code(\stemup), and code(\stemboth) identifiers set
1445 this property. See also the identifiers code(\voiceone),
1446 code(\voicetwo), code(\voicethree) and code(\voicefour).
1448 dit(code(slurydirection)) Set to code(\free) for free choice of slur
1449 direction, set to code(\up) to force slurs up, set to code(\down) to
1450 force slurs down. The shorthands code(\slurup), code(\slurdown), and
1451 code(\slurboth) are available.
1453 dit(code(tieydirection)) Set to code(\free) for free choice of tie
1454 direction, set to code(\up) to force ties up, set to code(\down) to
1457 dit(code(slurdash)) Set to 0 for normal slurs, 1 for dotted slurs, and
1458 a larger value for dashed slurs. Identifiers code(\slurnormal) and
1459 code(\slurdotted) are predefined to set the first two settings.
1461 dit(code(hshift)) Set to 1 to enable LilyPond to shift notes
1462 horizontally if they collide with other notes. This is useful when
1463 typesetting many voices on one staff. The identifier code(\shift) is
1464 defined to enable this.
1466 dit(code(dynamicDir)) Determines location of dynamic marks. Set to
1467 code(\up) to print marks above the staff; set to code(\down) to print
1468 marks below the staff.
1470 dit(code(textalignment)) Controls alignment of superscripted and
1471 subscripted text. Set to \left to align the left end of the text with
1472 the note; set to \right to align the right end of the text with the
1473 note. Set to \center to align the center of the text with the note.
1475 dit(code(textstyle)) Set the text style for superscripts and
1476 subscripts. See above for list of text styles.
1478 dit(code(fontsize)) Can be used to select smaller font sizes for
1479 music. The normal font size is 0, and the two smaller sizes are -1
1482 dit(code(pletvisibility)) Determines whether tuplets of notes are
1483 labelled. Setting to 0 shows nothing; setting to 1 shows a number;
1484 setting to 2 shows a number and a bracket if there is no beam; setting
1485 to 3 shows a number, and if there is no beam it adds a bracket;
1486 setting to 4 shows both a number and a bracket unconditionally.
1488 dit(code(markScriptPadding)) Determines the extra space added between
1489 the mark and the closest staff line or note.
1491 dit(code(markDirection)) Determines if marks should be printed above
1492 or below the staff. Set to code(\up) to print marks above the staff;
1493 set to code(\down) to print marks below the staff.
1497 subsubsubsect(Staff properties)
1501 dit(code(defaultClef)) Determines the default clef. See code(\clef)
1504 dit(code(nolines)) Sets the number of lines that the staff has.
1506 dit(code(barAlways)) If set to 1 a bar line is drawn after each note.
1508 dit(code(defaultBarType)) Sets the default type of bar line. See
1511 dit(code(keyoctaviation)) If set to 1, then keys are the same in all
1512 octaves. If set to 0 then the key signature for different octaves can
1513 be different and is specified independently: code(\keysignature bes
1514 fis'). The default value is 1. Can be set to zero with
1515 code(\specialkey) or reset to 1 with code(\normalkey).
1517 dit(code(instrument) and code(instr)) If code(Staff_margin_engraver)
1518 is added to the Staff translator, then the code(instrument) property
1519 is used to label the first line of the staff and the code(instr)
1520 property is used to label subsequent lines. If the
1521 code(midi_instrument) property is not set then code(instrument) is
1522 used to determine the instrument for MIDI output.
1523 COMMENT(This prints the instrument name on top of the staff lines.)
1525 dit(code(abbrev)) Set length for tremolo to be used if no length is
1526 explicitly specified.
1528 dit(code(createKeyOnClefChange)) Set to a nonempty string if you want key
1529 signatures to be printed when the clef changes. Set to the empty string (the
1530 default) if you do not want key signatures printed.
1533 dit(code(timeSignatureStyle)) Changes the default two-digit layout
1534 for time signatures. The following values are recognized:
1536 dit(code(C)) 4/4 and 2/2 are typeset as C and struck C,
1537 respectively. All other time signatures are written with two digits.
1538 dit(code(old)) 2/2, 3/2, 3/4, 4/4, 6/4 and 9/4 are typeset with
1539 old-style mensuration marks. All other time signatures are
1540 written with two digits.
1541 dit(code(1)) All time signatures are typeset with a single
1542 digit, e.g. 3/2 is written as 3.
1543 dit(code(C2/2), code(C4/4), code(old2/2), code(old3/2),
1544 code(old3/4), code(old4/4), code(old6/4) or
1545 code(old9/4)) Tells Lilypond to use a specific symbol as time
1548 The different time signature characters are shown below with
1550 mudela(fragment,center)(
1552 \property Voice.textstyle = typewriter
1553 \property Staff.timeSignatureStyle = "C2/2"
1554 \time 2/2; a2^"C2/2" a2
1555 \property Staff.timeSignatureStyle = "C4/4"
1556 \time 2/2; a2^"C4/4" a2
1557 \property Staff.timeSignatureStyle = "old2/2"
1558 \time 2/2; a2^"old2/2" a2
1559 \property Staff.timeSignatureStyle = "old3/2"
1560 \time 2/2; a2^"old3/2" a2
1561 \property Staff.timeSignatureStyle = "old4/4"
1562 \time 2/2; a2^"old4/4" a2
1563 \property Staff.timeSignatureStyle = "old6/4"
1564 \time 2/2; a2^"old6/4" a2
1565 \property Staff.timeSignatureStyle = "old9/4"
1566 \time 2/2; a2^"old9/4" a2
1570 COMMENT(Broken!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
1577 subsubsubsect(GrandStaff properties)
1581 dit(code(maxVerticalAlign)) Set the maximum vertical distance between
1584 dit(code(minVerticalAlign)) Set the minimum vertical distance between
1589 subsubsubsect(Score properties)
1593 dit(code(SkipBars)) Set to 1 to skip the empty bars that are produced
1594 by multimeasure notes and rests. These bars will not appear on the
1595 printed output. Set to zero (the default) to expand multimeasure
1596 notes and rests into their full length, printing the appropriate
1597 number of empty bars so that synrchonization with other voices is
1598 preserved. COMMENT(meaning of "skip" here seems to be different from
1599 the meaning used for the keyword \skip.)
1601 dit(code(beamquantisation)) Set to code(\none) for no quantization.
1602 Set to code(\normal) to quantize position and slope. Set to
1603 code(\traditional) to avoid wedges. These three settings are
1604 available via code(\beamposfree), code(\beamposnormal), and
1605 code(\beampostraditional).
1607 dit(code(beamslopedamping)) Set to code(\none) for undamped beams.
1608 Set to code(\normal) for damped beams. Set to code(\infinity) for
1609 beams with zero slope. The identifiers code(\beamslopeproportional),
1610 code(\beamslopedamped), and code(\beamslopezero) each set the
1611 corresponding value.
1613 dit(code(chordInversion)) Determines whether LilyPond should look for
1614 chord inversions when translating from notes to chord names. Set to 1
1615 to find inversions. The default is 0 which does not look for inversions.
1624 bar-number-engraver.cc: "barScriptPadding" vertical space for numbers
1625 span-bar-engraver.cc: "singleStaffBracket" do single staffs get a bracket?
1628 sect(Pre-defined Identifiers)
1631 Various identifiers are defined in the initialization files to
1632 provide shorthands for some settings.
1635 dit(code(\break)) Force a line break in music by using a large
1636 argument for the keyword code(\penalty).
1637 dit(code(\center)) Used for setting textalignment property. Is set to 0.
1638 dit(code(\cr)) Start a crescendo.
1639 dit(code(\decr)) Start a decrescendo.
1640 dit(code(\down)) Used for setting direction setting properties. Is
1642 dit(code(\f)) Print forte symbol on the preceeding note.
1643 dit(code(\ff)) Print fortissimo symbol on the preceeding note.
1644 dit(code(\fff)) Print fortississimo symbol on preceeding note.
1645 dit(code(\ffff)) Print fortissississimo symbol on preceeding note.
1646 dit(code(\fffff)) Print fffff symbol on preceeding note.
1647 dit(code(\ffffff)) Print ffffff symbol on preceeding note.
1648 dit(code(\fp)) Print fortepiano symbol on preceeding note.
1649 dit(code(\free)) Used for setting direction setting properties. Is
1651 dit(code(\Gourlay)) Used for setting the paper variable
1652 code(castingalgorithm). Is equal to 1.0.
1653 dit(code(\infinity)) Used for setting the Score.beamslopedamping
1654 property. Is actually equal to 10000.
1655 dit(code(\left)) Used for setting textalignment property. Is equal to -1.
1656 dit(code(\major)) Used as the second argument of the code(\key)
1657 command to get a major key.
1658 dit(code(\minor)) Used as the second argument of the code(\key)
1659 command to get a minor key.
1660 dit(code(\mf)) Print mezzoforte symbol on preceeding note.
1661 dit(code(\mp)) Print mezzopiano symbol on preceeding note.
1662 dit(code(\nobreak)) Prevent a line break in music by using a large
1663 negative argument for the keyword code(\penalty).
1664 dit(code(\none)) Used for setting Score.beamslopedamping and
1665 Score.beamquantisation properties. Is equal to 0.
1666 dit(code(\normal)) Used for setting Score.beamslopedamping and
1667 Score.beamquantisation properties. Is equal to 1.
1668 dit(code(\normalkey)) Select normal key signatures where each octave
1669 has the same key signature. This sets the Staff.keyoctaviation property.
1670 dit(code(\p)) Print a piano symbol on preceeding note.
1671 dit(code(\pp)) Print pianissimo symbol on preceeding note.
1672 dit(code(\ppp)) Print pianississimo symbol on preceeding note.
1673 dit(code(\pppp)) Print pianissississimo symbol on preceeding note.
1674 dit(code(\ppppp)) Print ppppp symbol on preceeding note.
1675 dir(code(\pppppp)) Print pppppp symbol on preceeding note.
1676 dit(code(\rc)) Terminate a crescendo.
1677 dit(code(\rced)) Terminate a decrescendo
1678 dit(code(\rfz)) Print a rinforzato symbol on preceeding note.
1679 dit(code(\right)) Used for setting textalignment property. Is set to 1.
1680 dit(code(\sf)) Print a subito-forte symbol on preceeding note.
1681 dit(code(\sff)) Print a subito-fortissimo symbol on preceeding note.
1682 dit(code(\sfz)) Print a sforzato symbol on preceeding note.
1683 dit(code(\shiftoff)) Disable horizontal shifting of note heads that collide.
1684 Sets the Voice.hshift property.
1685 dit(code(\shifton)) Enable note heads that collide with other note heads
1686 to be shifted horiztonally. Sets the Voice.hshift property.
1687 dit(code(\slurboth)) Allow slurs to be above or below notes. This
1688 sets the Voice.slurydirection property.
1689 dit(code(\slurdown)) Force slurs to be below notes. This sets the
1690 Voice.slurydirection property.
1691 dit(code(\slurup)) Force slurs to be above notes. This sets the
1692 Voice.slurydirection property.
1693 dit(code(\sp)) Print a subito-piano symbol on preceeding note.
1694 dit(code(\spp)) Print a subito-forte symbol on preceeding note.
1695 dit(code(\specialkey)) Allow keys signatures do differ in different
1696 octaves. This sets the Staff.keyoctaviation property.
1697 dit(code(\stemboth)) Allow stems, beams, and slurs to point either
1698 direction. This sets the Voice.ydirection property.
1699 dit(code(\stemdown)) Force stems, beams, and slurs to point down.
1700 This sets the Voice.ydirection property.
1701 dit(code(\stemup)) Force stems, beams and slurs to point up. This
1702 sets the Voice.ydirection property.
1703 dit(code(\traditional)) Used for setting the
1704 Score.beamquantisation property. Is equal to 2.
1705 dit(code(\up)) Used for setting various direction properties. Is
1707 dit(code(\voiceone)) Enter Voice context called code(one) and force stems down.
1708 (See code(\stemdown).)
1709 dit(code(\voicetwo)) Enter Voice context called code(two) and force stems
1710 up. (See code(\stemup).)
1711 dit(code(\voicethree)) Enter Voice context called code(three) and force stems
1713 dit(code(\voicefour)) Enter Voice context called code(four), force stems down
1714 and turn on horizontal shifting. (See code(\stemdown) and code(\shifton).)
1715 dit(code(\Wordwrap)) Used for setting the paper variable
1716 code(castingalgorithm). Equal to 0.0.
1724 The output produced by LilyPond is controlled by the code(\paper) and
1725 code(\midi) keywords. These keywords appear in the code(\score) block
1726 to indicate that printed or musical output should be produced. If
1727 neither keyword appears in a code(\score) block, then paper output is
1728 produced but MIDI output is not produced.
1730 The contents of the code(\paper) and code(\midi) blocks can change the
1731 output in various ways. These blocks can appear at the top level of a
1732 Mudela file to set default parameters for each type of output. It is
1733 still necessary to explicitly specify the output type in the
1734 code(\score) blocks if you don't want the default behavior of
1735 producing only paper output.
1737 The code(\paper) and code(\midi) blocks
1738 may begin with an optional identifier reference. No
1739 identifier references are allowed anywhere else in the block.
1740 The code(\paper) block can contain the code(\shape) keyword; the
1741 code(\midi) block can contain the code(\tempo) keyword. Both of them
1742 can contain code(\translator) keywords. The code(\paper) block can
1743 also contain identifier assignments and parameter assignments. Unlike
1744 at the top level, these assignments must be terminated by a semicolon.
1747 subsect(Paper variables)
1749 Warning: this section is outdated and inaccurate.
1751 There are a large number of paper variables that are used to control
1752 details of the layout. Usually you will not want to change these
1753 variables; they are set by default to vaules that depend on the font
1754 size in use. The only way to find out what variables are supported is
1755 to search the source code for code(get_var). Two variables that you
1756 may want to change are code(linewidth) and code(indent).
1758 In order to change the font size used for the output, many variables
1759 need to be changed. Some identifiers and initialization files can
1760 simplify this process. The default size is 20pt. In order to select
1761 a different size, you must do two things. At the top level, do
1762 code(\include "paper)var(SZ)code(.ly") where var(SZ) is the height of
1763 the staff in points. Values presently allowed are 11, 13, 16, 20, and
1764 26. This loads some definitions, but does not cause them to take
1765 effect. In order to actually change the size, you must use one of the
1766 identifiers: code(\paper_eleven), code(\paper_thirteen),
1767 code(\paper_sixteen), code(\paper_twenty) or code(\paper_twentysix)
1768 inside a code(\paper) block.
1772 dit(var(integer)) If an integer appears on the left side of an
1773 assignment then a code(\font) keyword must appear on the right
1774 side. This defines a music font at a particular size. See Voice
1775 property code(\fontsize).
1777 dit(code(arithmetic_basicspace) and code(arithmetic_multiplier))
1778 The space taken by a note is determined by the formula
1781 )verb(arithmetic_multiplier * ( c + log2 (time) ))COMMENT(
1783 ) where code(time) is the amount of time a note occupies. The value
1784 of code(c) is chosen such that the smallest space within a measure is
1785 arithmetic_basicspace. The smallest space is the one following the
1786 shortest note in the measure. Typically arithmetic_basicspace is set
1787 to the width of a quarter note head.
1789 dit(code(barsize)) Specify height of bars. This value may need to be
1790 adjusted if you change the number of lines in the staff.
1791 dit(code(beam_dir_algorithm)) Specify algorithm for determining
1792 whether beams go up or down. It is real valued. If set to 2.0 then
1793 majority selection is used. If set to 3.0, then mean selection is
1794 used based on the mean center distance. If set to 4.0 then median
1795 selection is used, based on the median center distance.
1796 dit(code(castingalgorithm))
1797 dit(code(forced_stem_shorten)) Stems that have been forced to go the
1798 unnatural direction are shortened by this amount. Equal to
1799 dit(code(forced_stem_shorten0))
1800 dit(code(gourlay_energybound))
1801 dit(code(gourlay_maxmeasures)) Maximum number of measures per line
1802 when using Gourlay method.
1803 Decreasing this greatly reduces computation time. Default value: 10.
1804 dit(code(indent)) Sets the indentation of the first line of music.
1805 dit(code(interbeam))
1806 dit(code(interbeam4))
1807 dit(code(interline)) The distance between two staff
1808 lines, calculated from the center of the lines.
1809 dit(code(linewidth)) Sets the width of the lines. If it is set to
1810 -1.0, then a single unjustified line is produced.
1811 dit(code(notewidth)) Width of an average note head.
1812 dit(code(output)) Specifies an alternate
1813 name for the TeX() output. A file(.tex) extension will be added to
1814 the string you specify.
1815 dit(code(rulethickness)) Determines thickness of staff lines and bars.
1816 dit(code(slur_clip_angle))
1817 dit(code(slur_clip_height))
1818 dit(code(slur_clip_ratio))
1819 dit(code(slur_height_limit)) Specifies the maximum height of slurs.
1820 Normally equal to staff_height.
1821 dit(code(slur_ratio)) Specifes the ratio of slur hight to slur width
1822 to aim for. Default value is 0.3.
1823 dit(code(slur_rc_factor))
1824 dit(code(slur_slope_damping)) Allows slurs to start and end at
1825 different heights ???? Default value is 0.5.
1826 dit(code(slur_thickness)) Specify slur thickness. Equal to code(1.4 *
1827 \staffline) by default.
1828 dit(code(slur_x_gap)) Horizontal space between note and slur. Set to
1829 code(\interline / 5) by default.
1830 dit(code(slur_x_minimum))
1831 dit(code(staffheight)) The height of the staff from the center of the
1832 bottom line to the center of the top line. Equal to to code(4 * \interline).
1833 dit(code(stem_length)) Specify length of stems for notes in the staff
1834 that don't have beams.
1835 dit(code(stemthickness)) Specifies the thickness of the stem lines.
1836 dit(code(tie_slope_damping))
1837 dit(code(tie_x_minimum))
1841 subsect(MIDI Instrument Names)
1844 The MIDI instrument name is set by the code(Staff."midi_instrument")
1845 property or, if that property is not set, the code(Staff.instrument)
1846 property. The instrument name should be chosen from this list. If
1847 string does not exactly match one from this list then LilyPond uses
1850 COMMENT( acordina = accordion, tango accordian = concertina
1851 distortion guitar = distorted guitar
1852 orchestral strings = harp
1853 pan flute = wood flute? )
1855 verb("acoustic grand" "contrabass" "lead 7 (fifths)"
1856 "bright acoustic" "tremolo strings" "lead 8 (bass+lead)"
1857 "electric grand" "pizzicato strings" "pad 1 (new age)"
1858 "honky-tonk" "orchestral strings" "pad 2 (warm)"
1859 "electric piano 1" "timpani" "pad 3 (polysynth)"
1860 "electric piano 2" "string ensemble 1" "pad 4 (choir)"
1861 "harpsichord" "string ensemble 2" "pad 5 (bowed)"
1862 "clav" "synthstrings 1" "pad 6 (metallic)"
1863 "celesta" "synthstrings 2" "pad 7 (halo)"
1864 "glockenspiel" "choir aahs" "pad 8 (sweep)"
1865 "music box" "voice oohs" "fx 1 (rain)"
1866 "vibraphone" "synth voice" "fx 2 (soundtrack)"
1867 "marimba" "orchestra hit" "fx 3 (crystal)"
1868 "xylophone" "trumpet" "fx 4 (atmosphere)"
1869 "tubular bells" "trombone" "fx 5 (brightness)"
1870 "dulcimer" "tuba" "fx 6 (goblins)"
1871 "drawbar organ" "muted trumpet" "fx 7 (echoes)"
1872 "percussive organ" "french horn" "fx 8 (sci-fi)"
1873 "rock organ" "brass section" "sitar"
1874 "church organ" "synthbrass 1" "banjo"
1875 "reed organ" "synthbrass 2" "shamisen"
1876 "accordion" "soprano sax" "koto"
1877 "harmonica" "alto sax" "kalimba"
1878 "concertina" "tenor sax" "bagpipe"
1879 "acoustic guitar (nylon)" "baritone sax" "fiddle"
1880 "acoustic guitar (steel)" "oboe" "shanai"
1881 "electric guitar (jazz)" "english horn" "tinkle bell"
1882 "electric guitar (clean)" "bassoon" "agogo"
1883 "electric guitar (muted)" "clarinet" "steel drums"
1884 "overdriven guitar" "piccolo" "woodblock"
1885 "distorted guitar" "flute" "taiko drum"
1886 "guitar harmonics" "recorder" "melodic tom"
1887 "acoustic bass" "pan flute" "synth drum"
1888 "electric bass (finger)" "blown bottle" "reverse cymbal"
1889 "electric bass (pick)" "skakuhachi" "guitar fret noise"
1890 "fretless bass" "whistle" "breath noise"
1891 "slap bass 1" "ocarina" "seashore"
1892 "slap bass 2" "lead 1 (square)" "bird tweet"
1893 "synth bass 1" "lead 2 (sawtooth)" "telephone ring"
1894 "synth bass 2" "lead 3 (calliope)" "helicopter"
1895 "violin" "lead 4 (chiff)" "applause"
1896 "viola" "lead 5 (charang)" "gunshot"
1897 "cello" "lead 6 (voice)")
1901 subsect(Translators)
1904 The behavior of notation contexts is defined by the translators for
1905 those contexts. The translator for a context specifies what notations
1906 are handled by the context, it specifies what other contexts the
1907 context can contain, and it sets property values for the context.
1908 There are different translators for each type of output. The
1909 translators for paper output are defined in file(engraver.ly). The
1910 translators for MIDI output are defined in file(performer.ly).
1912 The first thing that appears inside a code(\translator) definition is
1913 the type of the context being created. This is specified with the
1914 code(\type) keyword: code(\type) var(typename)code(;). After the type
1915 of the context is specified, property assignments, the code(\name)
1916 keyword and code(\consists), code(\accepts), and code(\remove)
1917 keywords can appear in any order. The code(\name) keyword specifies
1918 the name of the context that is handled by the translator. If the
1919 name is not specified, the translator won't do anything. Each
1920 code(\accepts) keyword specifies what contexts can be contained inside
1921 this one. The code(\consists) keywords specify which notations are
1922 handled by the context. Each code(\consists) keyword specifies the
1923 name of an engraver (for paper ouput) or performer (for MIDI output)
1924 which handles a certain notation. The code(\remove) keyword can be
1925 used to remove a performer or engraver from the translator.
1927 In the code(\paper) block, it is also possible to define translator
1928 identifiers. Like other block identifiers, the identifier can only
1929 be used as the very first item of a translator. In order to define
1930 such an identifier outside of code(\score), you must do
1931 verb(\paper{ foo=\translator{ ... }
1934 \paper{ \translator{ \foo ... } }
1937 Some All of the standard translators have predefined identifiers, making
1938 it easy to redefine these contexts by adding or removing items.
1939 The predefined identifiers are: code(StaffContext),
1940 code(RhythmicStaffContext), code(VoiceContext), code(ScoreContext), code(ScoreWithNumbers)
1943 subsubsect(Paper Types and Engravers and Pre-defined Translators)
1945 Some pre-defined identifiers can simplify modification of translators.
1946 The pre-defined identifiers are:
1948 dit(code(StaffContext)) Default Staff context.
1949 dit(code(RhythmicStaffContext)) Default RhythmicStaff context.
1950 dit(code(VoiceContext)) Default Voice context.
1951 dit(code(ScoreContext)) Default Score context.
1952 dit(code(ScoreWithNumbers)) Score context with numbering at the
1954 dit(code(BarNumberingStaffContext)) Staff context with numbering at
1956 dit(code(HaraKiriStaffContext))
1957 dit(code(OrchestralPartStaffContext))
1958 dit(code(OrchestralScoreContext))
1960 Using these pre-defined values, you can remove or add items to the
1961 translator verb(\paper{ \translator{ \StaffContext
1962 \remove Some_engraver;
1963 \consists Different_engraver; }})
1967 There are four types for paper translators:
1969 dit(code(Engraver_group_engraver))
1970 dit(code(Hara_kiri_line_group_engraver))
1971 dit(code(Line_group_engraver_group))
1972 dit(code(Score_engraver))
1974 COMMENT( The names of these types seem somewhat confusing. )
1976 The engravers for paper output are:
1979 dit(code(Abbreviation_beam_engraver))
1980 dit(code(Bar_engraver)) Engraves bar lines. Normally in code(Staff) and
1981 code(RhythmicStaff).
1982 dit(code(Bar_number_engraver)) Engrave bar numbers. These numbers
1983 appear at the start of each line. Not normally in any translator. Can
1984 be added to code(Score) for Score-wide numbering or to code(Staff) for
1985 numbering on each staff.
1987 dit(code(Beam_engraver)) Handles beam requests by engraving beams. Normally
1988 appears in the code(Voice) translator. If omitted, then notes will be printed
1989 with flags instead of beams.
1991 dit(code(Beam_req_swallow_translator)) Swallows beam requests. In
1993 dit(code(Chord_name_engraver)) Engraves chord names. Normally in
1994 code(ChordNameVoice)
1995 dit(code(Clef_engraver)) Engraves the clef symbol. Normally in code(Staff).
1996 dit(code(Collision_engraver))
1997 dit(code(Dot_column_engraver)) Engraves dots on dotted notes shifted to the
1998 right of the note. Normally in code(Voice). If omitted, then dots appear on
2000 dit(code(Dynamic_engraver)) Engraves dynamics symbols. Normally in code(Voice).
2001 dit(code(Font_size_engraver))
2002 dit(code(Key_engraver)) Engraves the key signature. Normally in code(Staff).
2003 dit(code(Local_key_engraver))
2004 dit(code(Lyric_engraver)) Engraves lyrics. Normally in code(LyricVoice).
2005 dit(code(Multi_measure_rest_engraver)) Engraves multi-measure rests that are
2006 produced with code(R). Normally in code(Voice).
2007 dit(code(Piano_bar_engraver))
2008 dit(code(Pitch_squash_engraver)) Treat all pitches as middle C. Used in
2009 code(RhythmicStaff). Note that the notes move, but the locations of
2010 accidentals stay the same.
2011 dit(code(Priority_horizontal_align_engraver))
2012 dit(code(Repeat_engraver)) Handles repeats? In code(Staff) and
2013 code(RhythmicStaff).
2014 dit(code(Rest_collision_engraver)) Handles collisions of rests. In code(Staff).
2015 dit(code(Rest_engraver)) Engraves rests. Normally in code(Voice).
2016 dit(code(Rhythmic_column_engraver))
2017 dit(code(Score_priority_engraver))
2018 dit(code(Script_engraver)) Handles note ornaments generated by code(\script).
2019 Normally in code(Voice).
2020 dit(code(Separating_line_group_engraver))
2021 dit(code(Skip_req_swallow_translator))
2022 dit(code(Slur_engraver)) Engraves slurs. Normally in code(Voice).
2023 dit(code(Span_bar_engraver)) Engraves lines across multiple staffs. Normally
2024 in code(Staffgroup) and code(GrandStaff). Removing this from code(StaffGroup)
2025 gives the definition of code(ChoirStaff).
2026 dit(code(Span_score_bar_engraver))
2027 dit(code(Staff_group_bar_engraver))
2028 dit(code(Staff_margin_engraver)) Prints the name of the instrument
2029 (specified by code(Staff.instrument) and code(Staff.instr)) at the
2031 dit(code(Staff_sym_engraver))
2032 dit(code(Stem_engraver)) Engraves stems. Normally in code(Voice).
2033 dit(code(Ties_engraver)) Engraves ties. Normally in code(Voice).
2034 dit(code(Time_signature_engraver)) Engraves the time signature. Normally in
2035 code(Staff) and code(RhythmicStaff).
2036 dit(code(Timing_engraver)) Responsible for synchronizing timing information
2037 from staffs. Normally in code(Score). In order to create polyrhythmic music,
2038 this engraver should be removed from code(Score) and placed in code(Staff).
2039 dit(code(Tuplet_engraver)) Engraves tuplet brackets? In code(Staff).
2040 dit(code(Vertical_align_engraver))
2044 subsubsect(MIDI Types and Performers)
2046 The types available for MIDI translators are:
2048 dit(code(Performer_group_performer))
2049 dit(code(Score_performer))
2050 dit(code(Staff_performer))
2053 The performers for MIDI translators are:
2055 dit(code(Key_performer))
2056 dit(code(Time_signature_performer))
2057 dit(code(Note_performer))
2058 dit(code(Lyric_performer))
2059 dit(code(Swallow_performer))