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(textScriptPadding)) Determines the extra space added between
1479 super-/subscripted text and the closest staff line or note.
1481 dit(code(fontsize)) Can be used to select smaller font sizes for
1482 music. The normal font size is 0, and the two smaller sizes are -1
1485 dit(code(pletvisibility)) Determines whether tuplets of notes are
1486 labelled. Setting to 0 shows nothing; setting to 1 shows a number;
1487 setting to 2 shows a number and a bracket if there is no beam; setting
1488 to 3 shows a number, and if there is no beam it adds a bracket;
1489 setting to 4 shows both a number and a bracket unconditionally.
1491 dit(code(markScriptPadding)) Determines the extra space added between
1492 the mark and the closest staff line or note.
1494 dit(code(markDirection)) Determines if marks should be printed above
1495 or below the staff. Set to code(\up) to print marks above the staff;
1496 set to code(\down) to print marks below the staff.
1500 subsubsubsect(Staff properties)
1504 dit(code(defaultClef)) Determines the default clef. See code(\clef)
1507 dit(code(nolines)) Sets the number of lines that the staff has.
1509 dit(code(barAlways)) If set to 1 a bar line is drawn after each note.
1511 dit(code(defaultBarType)) Sets the default type of bar line. See
1514 dit(code(keyoctaviation)) If set to 1, then keys are the same in all
1515 octaves. If set to 0 then the key signature for different octaves can
1516 be different and is specified independently: code(\keysignature bes
1517 fis'). The default value is 1. Can be set to zero with
1518 code(\specialkey) or reset to 1 with code(\normalkey).
1520 dit(code(instrument) and code(instr)) If code(Staff_margin_engraver)
1521 is added to the Staff translator, then the code(instrument) property
1522 is used to label the first line of the staff and the code(instr)
1523 property is used to label subsequent lines. If the
1524 code(midi_instrument) property is not set then code(instrument) is
1525 used to determine the instrument for MIDI output.
1526 COMMENT(This prints the instrument name on top of the staff lines.)
1528 dit(code(abbrev)) Set length for tremolo to be used if no length is
1529 explicitly specified.
1531 dit(code(createKeyOnClefChange)) Set to a nonempty string if you want key
1532 signatures to be printed when the clef changes. Set to the empty string (the
1533 default) if you do not want key signatures printed.
1536 dit(code(timeSignatureStyle)) Changes the default two-digit layout
1537 for time signatures. The following values are recognized:
1539 dit(code(C)) 4/4 and 2/2 are typeset as C and struck C,
1540 respectively. All other time signatures are written with two digits.
1541 dit(code(old)) 2/2, 3/2, 3/4, 4/4, 6/4 and 9/4 are typeset with
1542 old-style mensuration marks. All other time signatures are
1543 written with two digits.
1544 dit(code(1)) All time signatures are typeset with a single
1545 digit, e.g. 3/2 is written as 3.
1546 dit(code(C2/2), code(C4/4), code(old2/2), code(old3/2),
1547 code(old3/4), code(old4/4), code(old6/4) or
1548 code(old9/4)) Tells Lilypond to use a specific symbol as time
1551 The different time signature characters are shown below with
1553 mudela(fragment,center)(
1555 \property Voice.textstyle = typewriter
1556 \property Staff.timeSignatureStyle = "C2/2"
1557 \time 2/2; a2^"C2/2" a2
1558 \property Staff.timeSignatureStyle = "C4/4"
1559 \time 2/2; a2^"C4/4" a2
1560 \property Staff.timeSignatureStyle = "old2/2"
1561 \time 2/2; a2^"old2/2" a2
1562 \property Staff.timeSignatureStyle = "old3/2"
1563 \time 2/2; a2^"old3/2" a2
1564 \property Staff.timeSignatureStyle = "old4/4"
1565 \time 2/2; a2^"old4/4" a2
1566 \property Staff.timeSignatureStyle = "old6/4"
1567 \time 2/2; a2^"old6/4" a2
1568 \property Staff.timeSignatureStyle = "old9/4"
1569 \time 2/2; a2^"old9/4" a2
1573 COMMENT(Broken!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
1580 subsubsubsect(GrandStaff properties)
1584 dit(code(maxVerticalAlign)) Set the maximum vertical distance between
1587 dit(code(minVerticalAlign)) Set the minimum vertical distance between
1592 subsubsubsect(Score properties)
1596 dit(code(SkipBars)) Set to 1 to skip the empty bars that are produced
1597 by multimeasure notes and rests. These bars will not appear on the
1598 printed output. Set to zero (the default) to expand multimeasure
1599 notes and rests into their full length, printing the appropriate
1600 number of empty bars so that synrchonization with other voices is
1601 preserved. COMMENT(meaning of "skip" here seems to be different from
1602 the meaning used for the keyword \skip.)
1604 dit(code(beamquantisation)) Set to code(\none) for no quantization.
1605 Set to code(\normal) to quantize position and slope. Set to
1606 code(\traditional) to avoid wedges. These three settings are
1607 available via code(\beamposfree), code(\beamposnormal), and
1608 code(\beampostraditional).
1610 dit(code(beamslopedamping)) Set to code(\none) for undamped beams.
1611 Set to code(\normal) for damped beams. Set to code(\infinity) for
1612 beams with zero slope. The identifiers code(\beamslopeproportional),
1613 code(\beamslopedamped), and code(\beamslopezero) each set the
1614 corresponding value.
1616 dit(code(chordInversion)) Determines whether LilyPond should look for
1617 chord inversions when translating from notes to chord names. Set to 1
1618 to find inversions. The default is 0 which does not look for inversions.
1627 bar-number-engraver.cc: "barScriptPadding" vertical space for numbers
1628 span-bar-engraver.cc: "singleStaffBracket" do single staffs get a bracket?
1631 sect(Pre-defined Identifiers)
1634 Various identifiers are defined in the initialization files to
1635 provide shorthands for some settings.
1638 dit(code(\break)) Force a line break in music by using a large
1639 argument for the keyword code(\penalty).
1640 dit(code(\center)) Used for setting textalignment property. Is set to 0.
1641 dit(code(\cr)) Start a crescendo.
1642 dit(code(\decr)) Start a decrescendo.
1643 dit(code(\down)) Used for setting direction setting properties. Is
1645 dit(code(\f)) Print forte symbol on the preceeding note.
1646 dit(code(\ff)) Print fortissimo symbol on the preceeding note.
1647 dit(code(\fff)) Print fortississimo symbol on preceeding note.
1648 dit(code(\ffff)) Print fortissississimo symbol on preceeding note.
1649 dit(code(\fffff)) Print fffff symbol on preceeding note.
1650 dit(code(\ffffff)) Print ffffff symbol on preceeding note.
1651 dit(code(\fp)) Print fortepiano symbol on preceeding note.
1652 dit(code(\free)) Used for setting direction setting properties. Is
1654 dit(code(\Gourlay)) Used for setting the paper variable
1655 code(castingalgorithm). Is equal to 1.0.
1656 dit(code(\infinity)) Used for setting the Score.beamslopedamping
1657 property. Is actually equal to 10000.
1658 dit(code(\left)) Used for setting textalignment property. Is equal to -1.
1659 dit(code(\major)) Used as the second argument of the code(\key)
1660 command to get a major key.
1661 dit(code(\minor)) Used as the second argument of the code(\key)
1662 command to get a minor key.
1663 dit(code(\mf)) Print mezzoforte symbol on preceeding note.
1664 dit(code(\mp)) Print mezzopiano symbol on preceeding note.
1665 dit(code(\nobreak)) Prevent a line break in music by using a large
1666 negative argument for the keyword code(\penalty).
1667 dit(code(\none)) Used for setting Score.beamslopedamping and
1668 Score.beamquantisation properties. Is equal to 0.
1669 dit(code(\normal)) Used for setting Score.beamslopedamping and
1670 Score.beamquantisation properties. Is equal to 1.
1671 dit(code(\normalkey)) Select normal key signatures where each octave
1672 has the same key signature. This sets the Staff.keyoctaviation property.
1673 dit(code(\p)) Print a piano symbol on preceeding note.
1674 dit(code(\pp)) Print pianissimo symbol on preceeding note.
1675 dit(code(\ppp)) Print pianississimo symbol on preceeding note.
1676 dit(code(\pppp)) Print pianissississimo symbol on preceeding note.
1677 dit(code(\ppppp)) Print ppppp symbol on preceeding note.
1678 dir(code(\pppppp)) Print pppppp symbol on preceeding note.
1679 dit(code(\rc)) Terminate a crescendo.
1680 dit(code(\rced)) Terminate a decrescendo
1681 dit(code(\rfz)) Print a rinforzato symbol on preceeding note.
1682 dit(code(\right)) Used for setting textalignment property. Is set to 1.
1683 dit(code(\sf)) Print a subito-forte symbol on preceeding note.
1684 dit(code(\sff)) Print a subito-fortissimo symbol on preceeding note.
1685 dit(code(\sfz)) Print a sforzato symbol on preceeding note.
1686 dit(code(\shiftoff)) Disable horizontal shifting of note heads that collide.
1687 Sets the Voice.hshift property.
1688 dit(code(\shifton)) Enable note heads that collide with other note heads
1689 to be shifted horiztonally. Sets the Voice.hshift property.
1690 dit(code(\slurboth)) Allow slurs to be above or below notes. This
1691 sets the Voice.slurydirection property.
1692 dit(code(\slurdown)) Force slurs to be below notes. This sets the
1693 Voice.slurydirection property.
1694 dit(code(\slurup)) Force slurs to be above notes. This sets the
1695 Voice.slurydirection property.
1696 dit(code(\sp)) Print a subito-piano symbol on preceeding note.
1697 dit(code(\spp)) Print a subito-forte symbol on preceeding note.
1698 dit(code(\specialkey)) Allow keys signatures do differ in different
1699 octaves. This sets the Staff.keyoctaviation property.
1700 dit(code(\stemboth)) Allow stems, beams, and slurs to point either
1701 direction. This sets the Voice.ydirection property.
1702 dit(code(\stemdown)) Force stems, beams, and slurs to point down.
1703 This sets the Voice.ydirection property.
1704 dit(code(\stemup)) Force stems, beams and slurs to point up. This
1705 sets the Voice.ydirection property.
1706 dit(code(\traditional)) Used for setting the
1707 Score.beamquantisation property. Is equal to 2.
1708 dit(code(\up)) Used for setting various direction properties. Is
1710 dit(code(\voiceone)) Enter Voice context called code(one) and force stems down.
1711 (See code(\stemdown).)
1712 dit(code(\voicetwo)) Enter Voice context called code(two) and force stems
1713 up. (See code(\stemup).)
1714 dit(code(\voicethree)) Enter Voice context called code(three) and force stems
1716 dit(code(\voicefour)) Enter Voice context called code(four), force stems down
1717 and turn on horizontal shifting. (See code(\stemdown) and code(\shifton).)
1718 dit(code(\Wordwrap)) Used for setting the paper variable
1719 code(castingalgorithm). Equal to 0.0.
1727 The output produced by LilyPond is controlled by the code(\paper) and
1728 code(\midi) keywords. These keywords appear in the code(\score) block
1729 to indicate that printed or musical output should be produced. If
1730 neither keyword appears in a code(\score) block, then paper output is
1731 produced but MIDI output is not produced.
1733 The contents of the code(\paper) and code(\midi) blocks can change the
1734 output in various ways. These blocks can appear at the top level of a
1735 Mudela file to set default parameters for each type of output. It is
1736 still necessary to explicitly specify the output type in the
1737 code(\score) blocks if you don't want the default behavior of
1738 producing only paper output.
1740 The code(\paper) and code(\midi) blocks
1741 may begin with an optional identifier reference. No
1742 identifier references are allowed anywhere else in the block.
1743 The code(\paper) block can contain the code(\shape) keyword; the
1744 code(\midi) block can contain the code(\tempo) keyword. Both of them
1745 can contain code(\translator) keywords. The code(\paper) block can
1746 also contain identifier assignments and parameter assignments. Unlike
1747 at the top level, these assignments must be terminated by a semicolon.
1750 subsect(Paper variables)
1752 Warning: this section is outdated and inaccurate.
1754 There are a large number of paper variables that are used to control
1755 details of the layout. Usually you will not want to change these
1756 variables; they are set by default to vaules that depend on the font
1757 size in use. The only way to find out what variables are supported is
1758 to search the source code for code(get_var). Two variables that you
1759 may want to change are code(linewidth) and code(indent).
1761 In order to change the font size used for the output, many variables
1762 need to be changed. Some identifiers and initialization files can
1763 simplify this process. The default size is 20pt. In order to select
1764 a different size, you must do two things. At the top level, do
1765 code(\include "paper)var(SZ)code(.ly") where var(SZ) is the height of
1766 the staff in points. Values presently allowed are 11, 13, 16, 20, and
1767 26. This loads some definitions, but does not cause them to take
1768 effect. In order to actually change the size, you must use one of the
1769 identifiers: code(\paper_eleven), code(\paper_thirteen),
1770 code(\paper_sixteen), code(\paper_twenty) or code(\paper_twentysix)
1771 inside a code(\paper) block.
1775 dit(var(integer)) If an integer appears on the left side of an
1776 assignment then a code(\font) keyword must appear on the right
1777 side. This defines a music font at a particular size. See Voice
1778 property code(\fontsize).
1780 dit(code(arithmetic_basicspace) and code(arithmetic_multiplier))
1781 The space taken by a note is determined by the formula
1784 )verb(arithmetic_multiplier * ( c + log2 (time) ))COMMENT(
1786 ) where code(time) is the amount of time a note occupies. The value
1787 of code(c) is chosen such that the smallest space within a measure is
1788 arithmetic_basicspace. The smallest space is the one following the
1789 shortest note in the measure. Typically arithmetic_basicspace is set
1790 to the width of a quarter note head.
1792 dit(code(barsize)) Specify height of bars. This value may need to be
1793 adjusted if you change the number of lines in the staff.
1794 dit(code(beam_dir_algorithm)) Specify algorithm for determining
1795 whether beams go up or down. It is real valued. If set to 2.0 then
1796 majority selection is used. If set to 3.0, then mean selection is
1797 used based on the mean center distance. If set to 4.0 then median
1798 selection is used, based on the median center distance.
1799 dit(code(castingalgorithm))
1800 dit(code(forced_stem_shorten)) Stems that have been forced to go the
1801 unnatural direction are shortened by this amount. Equal to
1802 dit(code(forced_stem_shorten0))
1803 dit(code(gourlay_energybound))
1804 dit(code(gourlay_maxmeasures)) Maximum number of measures per line
1805 when using Gourlay method.
1806 Decreasing this greatly reduces computation time. Default value: 10.
1807 dit(code(indent)) Sets the indentation of the first line of music.
1808 dit(code(interbeam))
1809 dit(code(interbeam4))
1810 dit(code(interline)) The distance between two staff
1811 lines, calculated from the center of the lines.
1812 dit(code(linewidth)) Sets the width of the lines. If it is set to
1813 -1.0, then a single unjustified line is produced.
1814 dit(code(notewidth)) Width of an average note head.
1815 dit(code(output)) Specifies an alternate
1816 name for the TeX() output. A file(.tex) extension will be added to
1817 the string you specify.
1818 dit(code(rulethickness)) Determines thickness of staff lines and bars.
1819 dit(code(slur_clip_angle))
1820 dit(code(slur_clip_height))
1821 dit(code(slur_clip_ratio))
1822 dit(code(slur_height_limit)) Specifies the maximum height of slurs.
1823 Normally equal to staff_height.
1824 dit(code(slur_ratio)) Specifes the ratio of slur hight to slur width
1825 to aim for. Default value is 0.3.
1826 dit(code(slur_rc_factor))
1827 dit(code(slur_slope_damping)) Allows slurs to start and end at
1828 different heights ???? Default value is 0.5.
1829 dit(code(slur_thickness)) Specify slur thickness. Equal to code(1.4 *
1830 \staffline) by default.
1831 dit(code(slur_x_gap)) Horizontal space between note and slur. Set to
1832 code(\interline / 5) by default.
1833 dit(code(slur_x_minimum))
1834 dit(code(staffheight)) The height of the staff from the center of the
1835 bottom line to the center of the top line. Equal to to code(4 * \interline).
1836 dit(code(stem_length)) Specify length of stems for notes in the staff
1837 that don't have beams.
1838 dit(code(stemthickness)) Specifies the thickness of the stem lines.
1839 dit(code(tie_slope_damping))
1840 dit(code(tie_x_minimum))
1844 subsect(MIDI Instrument Names)
1847 The MIDI instrument name is set by the code(Staff."midi_instrument")
1848 property or, if that property is not set, the code(Staff.instrument)
1849 property. The instrument name should be chosen from this list. If
1850 string does not exactly match one from this list then LilyPond uses
1853 COMMENT( acordina = accordion, tango accordian = concertina
1854 distortion guitar = distorted guitar
1855 orchestral strings = harp
1856 pan flute = wood flute? )
1858 verb("acoustic grand" "contrabass" "lead 7 (fifths)"
1859 "bright acoustic" "tremolo strings" "lead 8 (bass+lead)"
1860 "electric grand" "pizzicato strings" "pad 1 (new age)"
1861 "honky-tonk" "orchestral strings" "pad 2 (warm)"
1862 "electric piano 1" "timpani" "pad 3 (polysynth)"
1863 "electric piano 2" "string ensemble 1" "pad 4 (choir)"
1864 "harpsichord" "string ensemble 2" "pad 5 (bowed)"
1865 "clav" "synthstrings 1" "pad 6 (metallic)"
1866 "celesta" "synthstrings 2" "pad 7 (halo)"
1867 "glockenspiel" "choir aahs" "pad 8 (sweep)"
1868 "music box" "voice oohs" "fx 1 (rain)"
1869 "vibraphone" "synth voice" "fx 2 (soundtrack)"
1870 "marimba" "orchestra hit" "fx 3 (crystal)"
1871 "xylophone" "trumpet" "fx 4 (atmosphere)"
1872 "tubular bells" "trombone" "fx 5 (brightness)"
1873 "dulcimer" "tuba" "fx 6 (goblins)"
1874 "drawbar organ" "muted trumpet" "fx 7 (echoes)"
1875 "percussive organ" "french horn" "fx 8 (sci-fi)"
1876 "rock organ" "brass section" "sitar"
1877 "church organ" "synthbrass 1" "banjo"
1878 "reed organ" "synthbrass 2" "shamisen"
1879 "accordion" "soprano sax" "koto"
1880 "harmonica" "alto sax" "kalimba"
1881 "concertina" "tenor sax" "bagpipe"
1882 "acoustic guitar (nylon)" "baritone sax" "fiddle"
1883 "acoustic guitar (steel)" "oboe" "shanai"
1884 "electric guitar (jazz)" "english horn" "tinkle bell"
1885 "electric guitar (clean)" "bassoon" "agogo"
1886 "electric guitar (muted)" "clarinet" "steel drums"
1887 "overdriven guitar" "piccolo" "woodblock"
1888 "distorted guitar" "flute" "taiko drum"
1889 "guitar harmonics" "recorder" "melodic tom"
1890 "acoustic bass" "pan flute" "synth drum"
1891 "electric bass (finger)" "blown bottle" "reverse cymbal"
1892 "electric bass (pick)" "skakuhachi" "guitar fret noise"
1893 "fretless bass" "whistle" "breath noise"
1894 "slap bass 1" "ocarina" "seashore"
1895 "slap bass 2" "lead 1 (square)" "bird tweet"
1896 "synth bass 1" "lead 2 (sawtooth)" "telephone ring"
1897 "synth bass 2" "lead 3 (calliope)" "helicopter"
1898 "violin" "lead 4 (chiff)" "applause"
1899 "viola" "lead 5 (charang)" "gunshot"
1900 "cello" "lead 6 (voice)")
1904 subsect(Translators)
1907 The behavior of notation contexts is defined by the translators for
1908 those contexts. The translator for a context specifies what notations
1909 are handled by the context, it specifies what other contexts the
1910 context can contain, and it sets property values for the context.
1911 There are different translators for each type of output. The
1912 translators for paper output are defined in file(engraver.ly). The
1913 translators for MIDI output are defined in file(performer.ly).
1915 The first thing that appears inside a code(\translator) definition is
1916 the type of the context being created. This is specified with the
1917 code(\type) keyword: code(\type) var(typename)code(;). After the type
1918 of the context is specified, property assignments, the code(\name)
1919 keyword and code(\consists), code(\accepts), and code(\remove)
1920 keywords can appear in any order. The code(\name) keyword specifies
1921 the name of the context that is handled by the translator. If the
1922 name is not specified, the translator won't do anything. Each
1923 code(\accepts) keyword specifies what contexts can be contained inside
1924 this one. The code(\consists) keywords specify which notations are
1925 handled by the context. Each code(\consists) keyword specifies the
1926 name of an engraver (for paper ouput) or performer (for MIDI output)
1927 which handles a certain notation. The code(\remove) keyword can be
1928 used to remove a performer or engraver from the translator.
1930 In the code(\paper) block, it is also possible to define translator
1931 identifiers. Like other block identifiers, the identifier can only
1932 be used as the very first item of a translator. In order to define
1933 such an identifier outside of code(\score), you must do
1934 verb(\paper{ foo=\translator{ ... }
1937 \paper{ \translator{ \foo ... } }
1940 Some All of the standard translators have predefined identifiers, making
1941 it easy to redefine these contexts by adding or removing items.
1942 The predefined identifiers are: code(StaffContext),
1943 code(RhythmicStaffContext), code(VoiceContext), code(ScoreContext), code(ScoreWithNumbers)
1946 subsubsect(Paper Types and Engravers and Pre-defined Translators)
1948 Some pre-defined identifiers can simplify modification of translators.
1949 The pre-defined identifiers are:
1951 dit(code(StaffContext)) Default Staff context.
1952 dit(code(RhythmicStaffContext)) Default RhythmicStaff context.
1953 dit(code(VoiceContext)) Default Voice context.
1954 dit(code(ScoreContext)) Default Score context.
1955 dit(code(ScoreWithNumbers)) Score context with numbering at the
1957 dit(code(BarNumberingStaffContext)) Staff context with numbering at
1959 dit(code(HaraKiriStaffContext))
1960 dit(code(OrchestralPartStaffContext))
1961 dit(code(OrchestralScoreContext))
1963 Using these pre-defined values, you can remove or add items to the
1964 translator verb(\paper{ \translator{ \StaffContext
1965 \remove Some_engraver;
1966 \consists Different_engraver; }})
1970 There are four types for paper translators:
1972 dit(code(Engraver_group_engraver))
1973 dit(code(Hara_kiri_line_group_engraver))
1974 dit(code(Line_group_engraver_group))
1975 dit(code(Score_engraver))
1977 COMMENT( The names of these types seem somewhat confusing. )
1979 The engravers for paper output are:
1982 dit(code(Abbreviation_beam_engraver))
1983 dit(code(Bar_engraver)) Engraves bar lines. Normally in code(Staff) and
1984 code(RhythmicStaff).
1985 dit(code(Bar_number_engraver)) Engrave bar numbers. These numbers
1986 appear at the start of each line. Not normally in any translator. Can
1987 be added to code(Score) for Score-wide numbering or to code(Staff) for
1988 numbering on each staff.
1990 dit(code(Beam_engraver)) Handles beam requests by engraving beams. Normally
1991 appears in the code(Voice) translator. If omitted, then notes will be printed
1992 with flags instead of beams.
1994 dit(code(Beam_req_swallow_translator)) Swallows beam requests. In
1996 dit(code(Chord_name_engraver)) Engraves chord names. Normally in
1997 code(ChordNameVoice)
1998 dit(code(Clef_engraver)) Engraves the clef symbol. Normally in code(Staff).
1999 dit(code(Collision_engraver))
2000 dit(code(Dot_column_engraver)) Engraves dots on dotted notes shifted to the
2001 right of the note. Normally in code(Voice). If omitted, then dots appear on
2003 dit(code(Dynamic_engraver)) Engraves dynamics symbols. Normally in code(Voice).
2004 dit(code(Font_size_engraver))
2005 dit(code(Key_engraver)) Engraves the key signature. Normally in code(Staff).
2006 dit(code(Local_key_engraver))
2007 dit(code(Lyric_engraver)) Engraves lyrics. Normally in code(LyricVoice).
2008 dit(code(Multi_measure_rest_engraver)) Engraves multi-measure rests that are
2009 produced with code(R). Normally in code(Voice).
2010 dit(code(Piano_bar_engraver))
2011 dit(code(Pitch_squash_engraver)) Treat all pitches as middle C. Used in
2012 code(RhythmicStaff). Note that the notes move, but the locations of
2013 accidentals stay the same.
2014 dit(code(Priority_horizontal_align_engraver))
2015 dit(code(Repeat_engraver)) Handles repeats? In code(Staff) and
2016 code(RhythmicStaff).
2017 dit(code(Rest_collision_engraver)) Handles collisions of rests. In code(Staff).
2018 dit(code(Rest_engraver)) Engraves rests. Normally in code(Voice).
2019 dit(code(Rhythmic_column_engraver))
2020 dit(code(Score_priority_engraver))
2021 dit(code(Script_engraver)) Handles note ornaments generated by code(\script).
2022 Normally in code(Voice).
2023 dit(code(Separating_line_group_engraver))
2024 dit(code(Skip_req_swallow_translator))
2025 dit(code(Slur_engraver)) Engraves slurs. Normally in code(Voice).
2026 dit(code(Span_bar_engraver)) Engraves lines across multiple staffs. Normally
2027 in code(Staffgroup) and code(GrandStaff). Removing this from code(StaffGroup)
2028 gives the definition of code(ChoirStaff).
2029 dit(code(Span_score_bar_engraver))
2030 dit(code(Staff_group_bar_engraver))
2031 dit(code(Staff_margin_engraver)) Prints the name of the instrument
2032 (specified by code(Staff.instrument) and code(Staff.instr)) at the
2034 dit(code(Staff_sym_engraver))
2035 dit(code(Stem_engraver)) Engraves stems. Normally in code(Voice).
2036 dit(code(Ties_engraver)) Engraves ties. Normally in code(Voice).
2037 dit(code(Time_signature_engraver)) Engraves the time signature. Normally in
2038 code(Staff) and code(RhythmicStaff).
2039 dit(code(Timing_engraver)) Responsible for synchronizing timing information
2040 from staffs. Normally in code(Score). In order to create polyrhythmic music,
2041 this engraver should be removed from code(Score) and placed in code(Staff).
2042 dit(code(Tuplet_engraver)) Engraves tuplet brackets? In code(Staff).
2043 dit(code(Vertical_align_engraver))
2047 subsubsect(MIDI Types and Performers)
2049 The types available for MIDI translators are:
2051 dit(code(Performer_group_performer))
2052 dit(code(Score_performer))
2053 dit(code(Staff_performer))
2056 The performers for MIDI translators are:
2058 dit(code(Key_performer))
2059 dit(code(Time_signature_performer))
2060 dit(code(Note_performer))
2061 dit(code(Lyric_performer))
2062 dit(code(Swallow_performer))