1 mailto(gnu-music-discuss@gnu.org)
4 redef(var)(1)(whenlatex(latexcommand({\normalfont\scshape )ARG1+latexcommand(}))\
8 redef(code)(1)(tt(ARG1))
14 long lyrics don't get any space at the end
15 lyrics and scripts collide
16 \key b; \time 4/4; looks bad---no space between key sig and clef
17 \portato still DOES NOT WORK!
18 \cadenza vs. barNonAuto ?
19 not enough space for \key b;
20 I noticed that ledger lines in the previewer looked like they had
21 a double line (of different lengths). On printed output, I think
22 I can see a slight thickening of the ledger lines in the middle.
23 Is this supposed to happen?
24 restStyle=mensural doesn't seem to work (lots of characters not found
26 what happened to the Staff.textalignment and Lyrics.textalignment
34 the explanation of how lyrics mode parses words seems ridiculous.
35 Is there a simple way to explain this, or is the behavior
36 too complicated for a reasonable explanation?
38 interstaff beams (beam-interstaff.ly)
39 interstaff slurs (see preludes-1.ly)
41 Current list of undocumented properties:
43 "alignmentReference" to do with minVerticalAlign, etc?
46 "beamAutoBegin" + type_str
48 "beamAutoEnd" + type_str
49 "createInitdefaultClef"
55 time_str + "beamAutoBegin"
56 time_str + "beamAutoBegin" + type_str
57 time_str + "beamAutoEnd"
58 time_str + "beamAutoEnd" + type_str
61 type_ + "ScriptPadding"
66 This document contains Mudela fragments. You need at least
67 Yodl-1.30.18 to convert this to tex or html.
70 htmlbodyopt(bgcolor)(white)
71 htmlcommand(<font color=black>)
74 \setlength{\topmargin}{-0.25in}
75 \setlength{\textheight}{9in}
76 \setlength{\textwidth}{5.875in}
77 \setlength{\oddsidemargin}{0.25in}
78 \setlength{\evensidemargin}{0.25in}
82 whentexinfo(notableofcontents())
84 article(Mudela 1.0.14 / LilyPond 1.1.40 Reference Manual)
85 (Adrian Mariano, Han-Wen Nienhuys and Jan Nieuwenhuizen)
86 (nop()PIPETHROUGH(date "+%B %d, %Y")()()nop())
92 * paragraphs have too much space.
97 latexcommand(\def\interexample{})
98 latexcommand(\def\preexample{\par})
99 latexcommand(\def\postexample{\par\medskip})
100 latexcommand(\def\file#1{{code(#1)}})
102 latexcommand(\def\texttt#1{\tt #1})
103 latexcommand(\def\textbf#1{\bf #1})
106 COMMENT(urg, texinfo include breaks)
108 includefile(html-disclaimer.yo-urg)
111 bf(This document is not up to date). All rendered examples of course
112 are current, but the rest probably isn't. Adjusting the tutorial was
113 considered more important than writing the reference manual. We
114 apologize for the inconvenience. For a complete and up-to-date
115 definition, see file(lily/parser.yy), file(lily/lexer.ll), and the
118 This document describes the the GNU LilyPond input format, which is an
119 effective language for defining music. We call this language (rather
120 arrogantly) The Musical Definition Language or Mudela, for
121 short.footnote(If anybody comes up with a better name, we'd gladly
122 take this. Gourlay already uses Musical Description Language,
123 G-Sharp Score Definition Language. ISO standard 10743 defines a
124 Standard Music Description Language. We're not being original here.)
126 The first aim of Mudela is to define a piece of music, being complete
127 from both from a musical typesetting, as from a musical performing
130 The Musical Definition Language (Mudela), has a logical structure,
131 making use of identifiers, that allows for flexible input, and
132 definition reuse. See the documentation file file(MANIFESTO), included
133 with the LilyPond sources for reasons and design considerations.
136 sect(Running LilyPond)
138 When invoked with a filename that has no extension, LilyPond will try adding
139 a file(.fly) extension first, and a file(.ly) extension second.
140 If the filename ends with
141 file(.fly), LilyPond processes the file as music using
142 file(init.fly). In this case, LilyPond does something
146 \input "yourfile.fly"
151 If you invoke LilyPond with a file file(foo.)var(ext) that doesn't
152 have the file(.ly) extension then LilyPond will look for a file called
153 file(init.)var(ext) and process this file. The file
154 file(init.)var(ext) must contain the code(\maininput) keyword or LilyPond
155 will not read the user specified file.
157 When LilyPond processes file(filename.ly) it will produce file(filename.tex) as
158 output. If file(filename.ly) contains a second code(\paper) keyword, then
159 LilyPond will produce file(filename-1.tex) as well. Subsequent code(\paper)
160 keywords will produces sequentially numbered file names. Several files can be
161 specified; they will each be processed independently.
165 subsect(Basic Mudela)
167 A Mudela file consists of keywords with arguments and identifier
168 assignments separated by spaces, tabs or newlines. Semicolons are
169 used by some keywords and are inconsistantly required in other
170 circumstances. A one line comment is introduced by a code(%)
171 character. Block comments are started by code(%{) and ended by
172 code(%}). They cannot be nested.
174 Mudela supports several types:
179 Formed from an optional minus sign followed by digits. Arithmetic
180 operations cannot be done with integers, and integers cannot be mixed
184 Formed from an optional minus sign and a sequence of digits followed
185 by a emph(required) decimal point and an optional exponent such as
186 code(-1.2e3). Reals can be built up using the usual operations:
187 code(+), code(-), code(*), and code(/), with parentheses for grouping.
190 Begins and ends with the code(") character. To include a code(")
191 character in a string write code(\"). Various other backslash
192 sequences have special interpretations as in the C language. A string
193 that contains no spaces can be written without the quotes. See
194 Section ref(modes) for details on unquoted strings; their
195 interpretation varies depending on the situation. On the right side
196 of identifier assignments and within the code(\header) keyword,
197 strings can be concatenated using the code(+) character.
199 dit(dimension) Consists of a real followed by one of the dimension
200 keywords: code(\mm), code(\pt), code(\in), or code(\cm). Dimensions
201 are converted immediately to a real which gives the dimension in
202 points, so they can be mixed with reals, but the result is no longer
203 of type dimension. The keywords that require a dimension
207 A pitch is a string which is the name of a pitch. Example: code(a).
208 The pitch names can be redefined with the code(\notenames) keyword.
209 See Section(notelang) for pitch names in different languages. Pitches
210 can only be specified inside note mode which is specified with
211 code(\notes). Therefore, keywords which require pitch arguments must
212 appear inside code(\notes).
215 Music is a compound type: arbitrarily complicated expressions with a
216 hierarchical structure can be formed from simple building blocks. The
217 simplest expression of type music is a single note. A note is formed
218 from a pitch and an optional duration and must be specified within
219 code(\notes). See Section ref(notedesc) for details. More
220 complicated expressions of type music are formed by surrounding a
221 sequence of expressions of type music with braces code({) and code(})
222 or with angle brackets code(<) and code(>). Items appearing in braces
223 will be treated as serial. Items in angle brackets will be
224 simultaneous. So for example code({ c e g }) represents an arpeggio
225 and code(< c e g >) represents a chord. These items can be nested any
226 way you like. This simple example shows how three chords can be
227 expressed in two different ways:
228 mudela(fragment,verbatim,center)(
229 \notes<{a b c'}{c' d' e'}{e' f' g'}>
230 \notes{<a c' e'><b d' f'><c' e' g'>}
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
245 file. Note that semicolons are forbidden after assignments appearing
246 at the top level but they are obligatory after assignments appearing
249 An identifier can be created with any string for its name, but you
250 will only be able to refer to identifiers whose names begin with a
251 letter and are entirely alphanumeric. It is also impossible to refer
252 to an identifier whose name is the same as the name of a keyword. The
253 following words are keywords:
254 verb(absdynamic duration mark property skip
255 accepts font midi pt spandynamic
256 alternative grouping mm relative tempo
257 bar header musicalpitch remove time
258 cadenza in name repeat times
259 chordmodifiers include notenames scm translator
260 chords key notes scmfile transpose
261 clef keysignature paper score type
262 cm lyrics partial script version
263 consists maininput penalty shape)
265 The right hand side of an identifier assignment is parsed completely
266 when the assignment is made. It therefore must have any context
267 specified in the definition. For example, you must write
268 code(foo=\notes{a8 b c}) rather than code(foo={a8 b c}). Even though
269 the context is specified in the definition, you must refer to the
270 identifier inside the correct context:
271 verb(foo = \paper{ linewidth = 6.0\in; }
276 If code(\foo) is used here without the surrounding code(\paper) then
277 an error will result. Note however that the following is acceptible
278 verb(foo = \notes { ... }
280 It is not necessary to specify code(\notes).
282 Identifiers can be set equal to integers, reals, strings, music,
283 durations (specified with code(\duration)), note ornaments (specified
284 with code(\script), dynamics commands, or code(:)), note name tables
285 (specified with code(\notenames), translator definitions, the
286 code(\paper) block, the code(\midi) block or the code(\score) block.
287 When identifiers are used for translators, the code(\paper),
288 code(\midi), and code(\score) blocks, they may only be referred to as
289 the first item in a block. So code(\paper{\one \two}) is illegal
290 because the identifier code(\two) is not the first thing in the block.
291 Unlike other identifier definitions, translator identifier definitions
292 can only appear within code(\midi) or code(\paper) blocks. See
293 Section ref(translators) for more information.
300 To simplify different aspects of music definition (entering the notes
301 and manipulating them) Mudela has three different input modes which
302 affect how unquoted strings are interpreted.
303 In each mode, words are identified on the input. If code("word") is
304 encountered, it is treated as a string. If code(\word) is
305 encountered it is treated as a keyword or as an identifier. The
306 behavior of the modes differs in two ways: different modes treat
307 unquoted words different, and different modes have different rules for
308 deciding what is a word.
313 At the start of parsing, Mudela is in normal mode.
314 In normal mode, a word is an alphabetic character followed by
315 alphanumeric characters. If code(word) is encountered on the input it
316 is treated as a string.
318 dit(Note mode) Note mode is introduced by the keyword
319 code(\notes). In Note mode, words can only contain alphabetic
320 characters. If code(word) is encountered, LilyPond first checks for a
321 notename of code(word). If no notename is found, then code(word) is
322 treated as a string. If you mistype a notename, the parser will most
323 likely complain that you should be in code(\lyrics) mode to do lyrics.
325 dit(Chord mode) Chord mode is instroduced by the keyword code(\chords).
326 Very similar to Note mode.
327 COMMENT(I'm not sure how it differs)
329 dit(Lyric mode) Lyrics mode is introduced by the keyword
330 code(\lyrics). This mode is has rules that make it easy to include
331 punctuation and diacritical marks in words. A word in Lyrics mode
332 begins with: an alphabetic character, code(_),
333 code(?), code(!), code(:), code('),
334 the control characters code(^A) through code(^F), code(^Q) through
335 code(^W), code(^Y), code(^^), any 8-bit character with ASCII code over
336 127, or a two character combination of a backslash followed by one
337 of code(`), code('), code(") or code(^).
338 Subsequent characters of a word can be any character that is not a
339 digit and not white space. One important consequence of this is that
340 a word can end with code(}), which may be confusing if you thought the
341 code(}) was going to terminate lyrics mode. Any code(_) characters
342 which appear in an unquoted word are converted to spaces, providing a
343 mechanism for introducing spaces into words without using quotes.
344 Quoted words can also be used in lyrics mode to specify words that
345 cannot be specified with the above rules. Here are some examples.
346 Not all of these words are printable by TeX().
347 verb(a&@&@&TSI|{[ % a word
349 1THtrhortho % not a word because it starts with a digit
350 ``Hello'' % not a word because it starts with `
351 Leise DOEXPAND(Fl\)DOEXPAND("u\)ss{}teren meine Sapfe % 4 words
352 _ _ _ _ % 4 words, each one a space
355 It is possible to create words that break the rules by prefixing them with the
356 dollar sign code($). Regardless of the context, a word beginning with code($)
357 extends until the next white space character. Such words can contain numbers
358 (even in Note mode), or other forbidden characters. The dollar sign can be
359 used to create and access identifiers that could not otherwise be used.
362 These modes are of a lexical nature. Normal and Note mode largely
363 resemble each other, save the possibility of entering Reals,
364 meaning of code(_) and the resolution of words
366 What's this about reals? When can you enter them or not enter them?)
369 sect(Note Description)
372 subsect(Basic Note Specification)
374 A note specification has the form
375 var(pitch)[var(octavespec)][code(!)][code(?)][var(duration)].
376 The pitch of the note is specified by the note's name.
378 LilyPond has predefined note names for various languages. The default
379 names are the Dutch note names. The notes are specified by the
380 letters code(c) through code(b), where code(c) is an octave below
381 middle C and the letters span the ocatave above that C.
382 In Dutch, a sharp is formed by adding
383 code(-is) to the end of a pitch name. A flat is formed by adding code(-es).
384 Double sharps and double flats are obtained by adding code(-isis) or
386 Lily has predefined sets of notenames
387 for various nop(languages). See Section ref(notelang) for details.
388 Rests are specified with the note name code(r) or code(R).
389 There is also a note name code(s) which produces a nonprinting note of the
392 The optional octave specification takes the form of a series of single
394 code(') characters or a series of comma code(,) characters. Each
395 code(') raises the pitch by one octave; each code(,) lowers the pitch
398 mudela(fragment,verbatim,center)(
399 c' d' e' f' g' a' b' c''
402 mudela(fragment,verbatim,center)(
403 cis' dis' eis' fis' gis' ais' bis'
406 mudela(fragment,verbatim,center)(
407 ces' des' es' fes' ges' as' bes'
410 mudela(fragment,verbatim,center)(
411 cisis' eisis' gisis' aisis' beses'
414 mudela(fragment,verbatim,center)(
415 ceses' eses' geses' ases' beses'
418 Whenever a C-sharp is desired, you must specify a C-sharp. LilyPond
419 will determine what accidentals to typeset depending on the key and
421 A reminder accidental can be forced by
422 using the optional exclamation mark `code(!)'
424 A cautionary accidental, i.e., an accidental within paranthesis
425 can be obtained using the optional question mark `code(?)' on the pitch.
426 mudela(fragment,verbatim,center)(
427 cis' d' e' cis' c'? d' e' c'!
431 Durations are entered as their reciprocal values
432 mudela(fragment,verbatim,center)(
433 a'1 a'2 a'4 a a'8 a a'16 a'32 a'64
435 mudela(fragment,verbatim,center)(
439 If the duration is omitted then it is set equal to the previous
440 duration. If there is no previous duration, then a quarter note is
442 The duration can be followed by a dot code(.) to obtain dotted note
444 mudela(fragment,verbatim,center)(
448 Extra long notes can be obtained using the code(\breve) and
449 code(longa) durations:
450 mudela(fragment,verbatim,center)(
454 In order to get triplets and other tuplets, you must use the
455 code(\times) keyword which multiplies the duration by a fraction. The
456 syntax is code(\times) var(fraction) var(music). The length of all of
457 the specified music will be multiplied by the fraction and the
458 fraction's denominator will be printed over the notes. The most
459 common tuplet is the triplet in which 3 notes have the length of 2, so
460 the notes are 2/3 their written length:
461 mudela(fragment,verbatim,center)( b'4 \times 2/3 {c'4 c' c'} d'4 d'4 )
462 If you try to use code(\times) as the first thing in your music, you
463 may encounter the warning ``No one to print a tuplet start bracket''.
464 This happens because the Tuplet-engraver is in Voice and no Voice has
465 been created yet. You must explicitly specify the Voice context in
467 mudela(fragment,verbatim,center)(
468 \context Voice { \times 2/3 {c'4 d' e'}}
471 A shorthand for code(\times) is to write code(*)var(fraction) after a
472 duration. This shorthand will not label triplets correctly, but
473 it is convenient for long rests.
474 For long rests with durations equal to an integer number of whole notes,
475 LilyPond produces output that indicates the duration of the rest. If you use
476 code(r) then one rest symbol will be printed and several measures left blank.
477 If you use code(R) then all of the measure will be filled with whole rests.
478 mudela(fragment,verbatim,center)(
481 If you set the code(Score.skipBars) property, then only one measure will be
482 printed; with code(R), a number indicating the length of the rest will be
484 mudela(fragment,verbatim,center)(
485 \property Score.skipBars=1
488 Even though the code(\times) command is not explicit, it is still
489 necessary to specify a code(Voice) context if the music begins with
490 rests lengthened using code(*).
491 Otherwise, the following will result:
492 mudela(fragment,verbatim,center)(
496 subsect(Note Spanners: Beams, Slurs and Ties)
498 A beam is specified by surrounding the beamed notes with brackets
500 mudela(fragment,verbatim,center)(
501 [a'8 a'] [a'16 a' a' a']
503 Some more elaborate constructions:
504 mudela(fragment,verbatim,center)(
505 [a'16 <a' c''> c'' <a' c''>]
506 \times 2/3 { [e'8 f' g'] }
509 Another type of spanner is the slur. Slurs connects chords and try to
510 avoid crossing stems. A slur is started with code(CHAR(40)) and stopped with
511 code(CHAR(41)). The starting code(CHAR(40)) appears to the right of the first note
512 in the slur. The terminal code(CHAR(41)) apppears to the left of the first
513 note in the slur. This makes it possible to put a note in slurs from
515 mudela(fragment,verbatim,center)(
516 f'()g'()a' [a'8 b'(] a'4 g' )f'
519 A tie connects two adjacent note heads of the same pitch.
520 When used with chords, it
521 connects all of the note heads whose pitches match.
522 Ties are indicated using the tilde symbol
523 code(~) by analogy with TeX()'s tie which connects words.
524 Note that if you try to tie together chords which have no common
525 pitches, then a warning message will appear and no tie will be created.
526 (Note that ties between different pitches can be enabled using the
527 property Voice.oldTieBehavior.)
529 mudela(fragment,verbatim,center)(
530 e' ~ e' <c' e' g'> ~ <c' e' g'>
533 It is possible to create beams and slurs that cross staffs by switching the
535 mudela(fragment,verbatim,center)(
537 \context Staff=one \notes\relative c'{
539 [c8 c \translator Staff=two \stemup c c]
540 \translator Staff=one
541 d4( \translator Staff=two )a4
543 \context Staff=two \notes{ \clef bass;}
548 subsect(Note Ornaments)
550 A variety of symbols can appear above and below notes to indicate
551 different characteristics of the performance. These symbols can be
552 added to a note with `var(note)code(-\)var(name)'. Numerous symbols
553 are defined in file(script.ly) and file(script.scm). Symbols can be
554 forced to appear above the note by writing
555 `var(note)code(^\)var(name)', and they can be forced to appear below
556 by writing `var(note)code(_\)var(name)'. Here is a chart showing
557 symbols above notes, with the name of the corresponding symbol
558 appearing underneath.
562 < \notes{ c''-\accent c''-\marcato c''-\staccatissimo f'-\fermata
563 c''-\stopped c''-\staccato c''-\tenuto c''-\upbow c''-\downbow
564 c''-\lheel c''-\rheel c''-\ltoe c''-\rtoe c''-\turn
565 c''-\open c''-\flageolet c''-\reverseturn
567 c''-\prall c''-\mordent c''-\prallprall c''-\prallmordent
568 c''-\upprall c''-\downprall c''-\thumb }
569 \context Lyrics \lyrics{
570 accent__ marcato__ staccatissimo__ fermata stopped__
571 staccato__ tenuto__ upbow downbow__ lheel__ rheel__ ltoe
572 rtoe__ turn__ open__ flageolet reverseturn__ trill__ prall__
573 mordent prallprall__ prallmordent__ uprall__ downprall thumb }
575 \paper{ linewidth = 5.875\in;
580 In addition, it is possible to place arbitrary strings of text or
581 TeX() above or below notes by using a string instead of an identifier:
582 `code(c^"text")'. Fingerings can be placed by simply using digits.
583 All of these note ornaments appear in the printed output but have no
584 effect on the MIDI rendering of the music.
586 To save typing, a few common symbols can be abbreviated with
590 \property Voice.textStyle = typewriter
596 c''4-^_"c-\\^{ }" s4 }
597 \paper { linewidth = 12.\cm; }})
599 Dynamic marks are specified by using an identifier after a note
600 without a dash: code(c4 \ff). Note that this syntax is inconsistent
601 with the syntax for other types of ornaments. The available dynamic
602 marks are: code(\pppppp), code(\ppppp), code (\pppp), code(\ppp), code(\pp),
603 code(\p), code(\mp), code(\mf), code(\f), code(\ff), code(\fff),
604 code(\ffff), code(\fffff), code(\ffffff),
605 code(\fp), code(sf), code(\sff), code(\sp), code(\spp), (\sfz) and code (\rfz).
607 A crescendo mark is started with code(\cr) and terminated with
608 code(\rc). A decrescendo mark is started with code(\decr) and
609 terminated with code(\rced). There are also shorthands for these
610 marks. A crescendo can be started with code(\<) and a decrescendo can
611 be started with code(\>). Either one can be terminated with code(\!).
612 Note that code(\!) must go before the last note of the dynamic mark whereas
613 code(\rc) and code(\rced) go after the last note. Because these marks are
614 bound to notes, if you want to get several marks during one note, you must use
616 mudela(fragment,verbatim,center)(
617 c'' \< \! c'' d'' \decr e'' \rced
618 < f''1 {s4 \< \! s4 \> \! s2 } >)
621 COMMENT(Broken!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
623 Tremolo marks can be printed by a note by adding code(:)[var(length)]
624 after the note. The length must be at least 8. A var(length) value
625 of 8 gives one line across the note stem.
626 If the length is omitted,
627 then the last value is used, or the value of the code(Abbrev)
628 property if there was no last value. To place tremolo marks in
629 between two notes, begin with code([:)var(length) and end with code(]).
630 The tremolo marks will appear instead of beams. Putting more than two
631 notes in such a construction will produce odd effects.
633 [TREMOLO BEAMS TEMPORARILY OUT OF ORDER]
635 COMMENT(mudela (fragment,verbatim,center)(
636 c'2:8 c':32 [:16 e'1 g'] [:8 e'4 f']
640 Is the last paragraph correct? Is it called "tremolo"? Why is
641 "abbreviation" used? (What is the unabreviated form?)
644 mudela (fragment,verbatim,center)(
651 sect(Other Ways to Enter Pitches)
653 subsect(Pitch Names in Other Languages)
656 The pitch names can be easily redefined using the code(\notenames) command.
657 Note name definitions have been provided in various languages.
658 Simply include the language specific init file. For example:
659 code(\include "english.ly"). The available language files and the names
662 verb( Note Names sharp flat
663 nederlands.ly c d e f g a bes b -is -es
664 english.ly c d e f g a bf b -s/-sharp -f/-flat
665 deutsch.ly c d e f g a b h -is -es
666 norsk.ly c d e f g a b h -iss/-is -ess/-es
667 svenska.ly c d e f g a b h -iss -ess
668 italiano.ly do re mi fa sol la sid si -d -b
669 catalan.ly do re mi fa sol la sid si -d/-s -b)
671 subsect(Relative Pitch Specification)
674 One very common error when entering music is to place notes in the wrong
675 octave. One way to avoid being confused by large numbers of octave changing
677 the code(\relative) keyword.
678 Music which appears within code(\relative) is
679 interpreted differently. The octave of a note is determined by making it as
680 close to the previous note as possible. The octave changing marks code(') and
681 code(,) can then be added to raise or lower this note by octaves. You have to
682 specify a starting pitch because the first note of a list has no predecessor.
684 mudela(fragment,verbatim,center)(
685 \relative c'' { c d b c, d b c' d
689 When the preceeding item is a chord, the first note of the chord is used to
690 determine the first note of the next chord. But other notes within the second
691 chord are determined by looking at the immediately preceeding note.
693 mudela(fragment,verbatim,center)(
694 \relative c' { <c e g>
698 The code(\relative) keyword can only appear in music, so there must be a
699 surrounding code(\notes) keyword which does not appear in the fragments shown
700 above. Also note that if the music passed to a code(\relative) keyword
701 contains a code(\transpose) keyword, the tranposed music will not be
702 processed in relative mode. An additional code(\relative) must be placed
703 inside the code(\transpose). If code(\relative) will be used several
704 times, or if it will be used in the same music with code(\transpose),
705 then you may get bizarre effects. This can be fixed by using an
706 explicit code(Staff) context.
709 subsect(Tranposition of Pitches)
712 Another way to modify the meaning of the note names is to use the
713 code(\transpose) keyword. This keyword allows you to transpose music.
714 To use transposition, specify the pitch that middle C should be tranposed to.
715 It is important to distinguish between enharmonic pitches as they can produce
716 different transpositions. To transpose up half a step, for example, either
717 code(\transpose cis') or code(\transpose des') will work. But the first
718 version will print sharps and the second version will print flats.
719 In this example, a scale in the key of E is transposed to F, or to E-sharp
721 mudela(fragment,verbatim,center)(
722 \relative c' { \key e;
723 e fis gis a b cis dis e }
725 mudela(fragment,verbatim,center)(
726 \transpose des' \relative c' { \key e;
727 e fis gis a b cis dis e }
729 mudela(fragment,verbatim,center)(
730 \transpose cis' \relative c' { \key e;
731 e fis gis a b cis dis e }
733 If you want to use both code(\transpose) and code(\relative), then you must use
734 code(\transpose) first. Any code(\relative) keywords that are outside the
735 code(\transpose) have no effect on notes that appear inside the
736 code(\transpose). As with code(\relative), using code(\transpose)
737 repeatedly can cause bizarre effects. An explicit code(Staff) context
738 will eliminate the problems.
742 Chords can be entered either by name or by listing the notes in angle brackets.
743 Chords can be displayed either as notes or by name. To enter chords by name,
744 either place them inside the code(\chords) keyword, or use
745 code(\notes) and surround them with
747 Chord names have the form
748 var(tonic)[var(duration)][code(-)var(modifier)][code(^)var(subtractions)][code(/)var(inversion)]
749 The var(tonic) should be the tonic note of the chord, and the var(duration) is
750 the chord duration in the usual notation. There are two kinds of modifiers.
751 One type is chord additions, which are obtained by listing intervals separated
752 by dots. An interval is written by its number with an optional code(+) or
753 code(-) to indicate raising or lowering by half a step. A chord additions has
754 two effects: it adds the specified interval and all lower odd numbered
755 intervals to the chord, and it may lower or raise the specified interval.
756 Intervals can be separated by a dot (code(.)) if you need to list
757 several unmodified intervals.
758 Repeating a code(-) character will remove a half step from the preceeding
760 mudela(fragment,verbatim,center)(
764 c-9-5+7+ c-3-5- c-4.6.8
766 The second type of modifier that may appear after the code(-) is
768 Named modifiers are listed in the file file(chord-modifiers.ly). The
769 available modifiers are code(m) and code(min) which lower
770 the 3rd half a step, code(aug) which raises the 5th, code(dim) which lowers
771 the 5th, code(maj) which adds a raised 7th, and code(sus) which replaces the
773 mudela(fragment,verbatim,center)(
776 c1-m c-min c-maj c-aug c-dim c-sus
779 Chord subtractions are used to eliminate notes from a chord. The notes to be
780 subtracted are listed after a code(^) character, separated by dots.
781 mudela(fragment,verbatim,center)(
787 Chord inversions can be specified by appending code(/) and the name of a
788 single note to a chord. This has the effect of lowering the specified note by
789 an octave so it becomes the lowest note in the chord. If the
790 specified note is not in the chord then a warning will be printed.
791 mudela(fragment,verbatim,center)(
793 @c1@ @c/e@ @c/g@ @c-7/e@
795 Throughout these examples, chords have been shifted around the staff
796 using code(\transpose). The code(\relative) keyword has odd effects
797 when combined with named chords.
799 For displaying printed chord names, use the code(ChordNames) context.
800 The chords may be entered either using the notation described above,
801 or directly using angle brackets.
802 mudela(fragment,verbatim)(
804 \context ChordNames { \chords{ a b c} \notes{ < d f g > < e g b > } }
805 \context Staff \notes{ a b c' d' e' }
808 Lilypond examines chords specified as lists of notes to determine a
809 name to give the chord. By default, LilyPond will not try to identify
811 mudela(fragment,verbatim,center)(
813 \context ChordNames {
814 \notes{ < e' g' c'' > } }
815 \context Staff \notes{ c' }
817 If you want inversions to be recognized, you must set the property
818 code(Score.chordInversion):
819 mudela(fragment,verbatim,center)(
821 \property Score.chordInversion = 1
822 \context ChordNames {
823 \notes{ < e' g' c'' > } }
824 \context Staff \notes{ c' }
831 Lyrics are entered like notes, with pitches replaced
832 by text. For example code(Twin-4 kle4 twin-4 kle4) enters four
833 syllables, each with quarter note duration. Note that the hyphen has
834 no special meaning for lyrics, and does not introduce special symbols.
835 See Section ref(modes) for a description of what is interpreted as a lyric.
837 In order to instruct LilyPond to write lyrics underneath the
838 staff, you must enter the lyrics context with code(\context Lyrics).
839 Lyrics should be entered in lyrics mode which is entered with code(\lyrics).
841 Spaces can be introduced into a lyric either by using quotes (code("))
842 or by using an underscore without quotes: code(He_could4 not4). All
843 unquoted underscores are converted to spaces. Here is a full example:
844 mudela(verbatim)(\score{
845 < \notes \transpose c'' {c d e c | c d e c | e f g'2 |
846 e'4 f g'2 \bar "|."; }
847 \context Lyrics \lyrics {
848 DOEXPAND(Fr\)`e-4 re Ja- que DOEXPAND(Fr\)`e- re Ja- que
849 Dor- mez vous?2 Dor-4 mez vous?2 }
857 Why does this warrant an URG?
860 When one word is attached to many notes, you may
861 want a continuous line after the lyric to show this. To achieve
862 this effect, add a code(__) lyric as a separate word
863 after the lyric to be extended.
865 an extender, a line that extends over the entire duration of
866 the lyric. This line will run all the way to the start of the next
867 lyric, so you may want to shorten it by using a blank lyric.
868 mudela(verbatim)(\score{
869 < \notes \relative c''{
870 a4()b()c()d c()d()b()a c()d()b()a }
871 \context Lyrics \lyrics {
872 foo1 __ bar2. __ _4 baz1 __ }
879 LilyPond aligns all musical objects according to the amount of time
880 they occupy. All musical objects have a duration. When music is
881 written sequentially using braces the duration is the sum of the
882 durations of the elements. When music is stacked into simultaneous music
884 brackets, the duration is the maximum of the durations of the
887 Because LilyPond knows the durations of all musical elements, the time
888 signature enables LilyPond to draw bar lines automatically. The time
889 signature is specified with the code(\time) keyword: code(\time 3/4).
890 If no time signature is given, LilyPond assumes 4/4. The automatic
891 generation of bar lines can toggled with the code(\cadenza) keyword,
892 and an incomplete measure at the start of the music can be created
893 using the code(\partial) keyword: code(\partial 8*2;) creates a
894 starting measure lasting two eighth notes.
896 In order to help with error checking, you can insert bar markers in
897 your music by typing code(|). Whenever LilyPond encounters a code(|)
898 that doesn't fall at a measure boundary, she prints a warning message.
900 Rhythmic grouping is a concept closely associated with this.
901 A default grouping is selected for the chosen time signature.
902 The default consists of combinations of 2 and 3 beats with as many
903 groups of 3 as possible, and the groups of 3 coming first. For
904 example, 4/4 is divided into 2+2 and 8/8 is divided into 3+3+2. This
905 default grouping can be changed using the \grouping keyword which
906 takes a list of durations to specify the grouping.
910 sect(Composition: forming bigger structures)
913 The computer savy user may be interested in a more formal
914 specification. We can capture what have learned about forming
915 sentences in Mudela in a context-free grammar.
917 latexcommand(\smallskip)
920 row(cell(em(Music))cell(: em(Note)))
921 row(cell()cell(code(|) em(Rest)))
922 row(cell()cell(code(|) code({) em(MusicList) code(})))
923 row(cell()cell(code(|) code(<) em(MusicList) code(>)))
924 row(cell()cell(code(|) em(Command)))
925 row(cell()cell(code(|) code(\context) em(string) code(=) em(string) em(Music)))
927 row(cell(em(MusicList))cell(: em(empty)))
928 row(cell()cell(code(|) em(MusicList) em(Music)))
932 latexcommand(\smallskip)
934 In mathematics you can form expressions by combining expressions,
935 which are ultimately some kind of atom or terminal symbol. The same
936 goes for Mudela: there are some basic building blocks, and by
937 combining those you create complex music.
939 You can combine music in three ways:
941 it()If you enclose a sequence of music-elements in braces ( code({)
942 and code(}) ), then you form another kind of music called
945 The duration of sequential composition is the sum of the durations of its elements
947 { c c g g a a g2 } % twinkle twinkle
948 { { c c g g} { a a g2 } }
950 it()You can stack music by enclosing a sequence of music elements
951 with code(<) and code(>). This is called simultaneous music.
952 The duration of a simultaneous composition is the maximum of the durations
953 of its elements Example:
955 <a4 {cis8 cis8} e'4> % a-major chord
957 it()You can form music by transposing music:
960 d % from c to the d that's almost one octave down
961 { e4 f4 } % the horizontal music
965 it()verb(\translator)
969 Of course you can also combine these three mechanisms.
971 { c <c e> <c e g> <c e g \transpose d' dis > } % 4 increasing chords
979 In order to specify repeats, use the code(\repeat) keyword. By
980 default, repeats are printed with repeat symbols.
981 mudela(fragment,verbatim,center)(
983 \repeat 2 { c'4 d' e' f' }
984 \repeat 2 { f' e' d' c' })
985 In order to specify alternate endings, use the code(\alternative)
987 mudela(fragment,verbatim,center)(
989 \repeat 2 {c'4 d' e' f'}
990 \alternative { {d'2 d'} {f' f} })
991 When the repeats involve partial measures, it will be necessary to use
992 code(\partial) keywords in a somewhat unexpected way
993 to indicate some measure lengths.
994 mudela(fragment,verbatim)(
995 \context Staff { \relative c'{
996 \repeat 2 { \partial 4; e | c2 d2 | e2 f2 | }
997 \alternative { { g4 g g } {\partial 1; a a a a | b1 } }
999 Repeats can be unfolded by setting the property Staff.unfoldRepeats.
1000 Note also that if your music begins with code(\repeat), you must place
1001 it in an explicit code(Staff) context or you will get bizarre results.
1003 If you don't give enough alternatives for all of the repeats, then the
1004 first alternative is assumed to be repeated enough to equal to
1005 specified number of repeats.
1006 mudela(fragment,verbatim)(
1007 \context Staff { \relative c'{
1008 \repeat 3 { \partial 4; e | c2 d2 | e2 f2 | }
1009 \alternative { { g4 g g } {\partial 1; e4 e e }
1010 {\partial 1; a a a a | b1 } }
1016 Keywords sometimes appear alone, but usually they require arguments.
1017 A keyword may have a single argument, a sequence of arguments in
1018 braces, or a sequence of arguments separated by spaces and terminated
1019 by a semicolon. The precise syntax of each keyword is shown below.
1020 Keywords must appear in the right context. If you use a keyword in
1021 the wrong place, even if the usage is syntactically correct, you will
1022 get the message ``parse error'' from LilyPond.
1027 dit(code(\absdynamic) code({) var(code) code(})) Internal keyword for
1028 printing dynamic marks such as $f$ under music. The parameter
1029 var(code) is unsigned and specifies the dynamic mark to print.
1030 Normally you should use the more user friendly abbreviations defined
1031 in the init file file(dynamic.ly).
1033 FIXME: Changed to code(\textscript) var(text) var(style). Defines
1036 dit(code(\accepts) var(string)code(;)) This keyword can appear only within a
1037 code(\translator) block. It specifies what contexts are allowed with the
1038 context that is being defined. See Section ref(translators).
1040 dit(code(\alternative) code({) var(music1) var(music2) ... code(}))
1041 Specifies alternative endings. Must come after a code(\repeat) keyword.
1043 dit(code(\bar) var(bartype)code(;)) Prints a special bar symbol, or at
1044 measure boundaries, replaces the regular bar symbol with a special
1045 symbol. The argument var(bartype) is a string which specifies the
1046 kind of bar to print. Options are code(":|"), code("|:"),
1047 code(":|:"), code("||"), code("|."), code(".|"), or code(".|.").
1048 These produce respectively a right repeat, a left repeat, a double
1049 repeat, a double bar, a start bar, an end bar, or a thick double bar.
1050 If var(bartype) is set to code("empty") then nothing is printed, but a
1051 line break is allowed at that spot. Note that the printing of special bars
1052 has no effect on the MIDI output.
1054 dit(code(\cadenza) var(togglevalue)code(;)) Toggles the automatic generation
1055 of bar lines. If var(togglevalue) is 0 then bar line generation is
1056 turne off. If var(togglevalue) is 1 then a bar is immediately
1057 printed and bar generation is turned on.
1059 dit(code(\clef) var(clefname)code(;)) Allowed only in music.
1060 Sets the current clef. The argument is
1061 a string which specifies the name of the clef. Several clef names are
1062 supported. If code(_8) or code(^8) is added to the end of a clef
1063 name then the clef lowered or raised an octave will be generated.
1064 Here are the supported clef names with middle C shown in each clef:
1068 %\property Voice.textStyle = typewriter
1069 \clef subbass; c'4-"\kern-10mm subbass"
1070 \clef bass; c'4^"\kern -8mm bass"
1071 \clef baritone; c'4_"\kern -10mm baritone"
1072 \clef varbaritone; c'4^"\kern -10mm varbaritone"
1073 \clef tenor; c'4_"\kern -10mm tenor"
1074 \clef "G_8"; c'4^"\kern -6mm G\_8"
1076 \paper{ linewidth= 4.5 \in; }
1081 \notes{\cadenza 1; \clef alto; c'4_"\kern -10mm alto"
1082 % \clef scarlatti; c'4_"\kern -4mm scarlatti"
1083 \clef mezzosoprano; c'4^"\kern -10mm mezzosoprano"
1084 \clef soprano; c'4_"\kern -10mm soprano"
1085 \clef treble; c'4^"\kern -6mm treble"
1086 \clef french; c'4_"\kern -10mm french" }
1087 \paper{ linewidth= 4.5 \in; }
1090 The treble clef can also be obtained using the names code(G) or
1091 code(violin). The bass clef is also available by code(\clef F).
1093 dit(code(\chord) var(chordlist)) Parse var(chordlist) in chords mode.
1095 dit(code(\chordmodifiers) var(modifierlist)) Specify the text chord
1096 modifiers that may appear after chord names. These are specified in
1097 the file file(chord-modifiers.ly).
1099 dit(code(\cm)) Specify a dimension in centimeters.
1101 dit(code(\consists) var(string)code(;)) This keyword can appear only within a
1102 code(\translator) block. It specifies that an engraver or performer named
1103 var(string) should be added to the translator. See Section
1106 dit(code(\duration) code({) var(length) var(dotcount) code(})) Specify note
1107 duration. The parameter var(length) is the negative logarithm (base
1108 2) of duration: 1 is a half note, 2 is a quarter note, 3 is an eighth
1109 note, etc. The number of dots after the note is given by
1112 dit(code(\font) var(string)) Internal keyword. Used within
1113 code(\paper) to specify the font.
1115 dit(code(\grouping) var(durationseq)code(;)) Sets the metric structure of
1116 the measure. Each argument specifies the duration of one metric unit.
1117 For example, code(\duration 16*5;) specifies a grouping of five beats
1118 together in 5/16 time. The default grouping is to have as many groups
1119 of 3 as possible followed by groups of two.
1121 dit(code(\header) code({) var(key1) = var(val1); var(key2) = var(val2); ... code(}))
1122 Specifies information about the music. A header should appear at the
1123 top of the file describing the file's contents. If a file has
1124 multiple code(\score) blocks, then a header should appear in
1125 each score block describing its contents. Tools like code(ly2dvi) can
1126 use this information for generating titles. Key values that are used
1127 by ly2dvi are: title, subtitle, composer, opus, poet, instrument,
1128 metre, arranger, piece and tagline.
1130 dit(code(\in)) Specify a dimension in inches.
1132 dit(code(\include) var(file)) Include the specified file. The
1133 argument var(file) is a string. The full filename including the
1134 file(.ly) extension must be given, and the filename must be quoted.
1135 (An unquoted string will not work here.)
1137 dit(code(\key) var(pitch) var(type) code(;)) Change the key signature.
1138 var(type) should be code(\major) or code(\minor) to get
1139 var(pitch)-major or var(pitch)-minor, respectively. The second
1140 argument is optional, the default is major keys.
1141 The var(\context) argument can also be given as an integer, which tells
1142 the number of semitones that should be added to the pitch given in the
1143 subsequent code(\key) commands to get the corresponding major key,
1144 e.g. code(\minor) is defined as 3. The standard mode names
1145 code(\ionian), code(\locrian), code(\aeolian), code(\mixolydian),
1146 code(\lydian), code(\phrygian), and code(\dorian) are also defined.
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. Use also to specify
1199 the duration of the first measure of the argument to
1202 dit(code(\penalty) code(=) var(int)code(;)) Allowed only in music.
1203 Discourage or encourage line breaks. See identifiers code(\break) and
1204 code(\nobreak) in Section ref(ident).
1206 dit(code(\property) var(contextname)code(.)var(propname) code(=) var(value))
1207 Sets the var(propname) property of the context var(contextname) to the
1208 specified var(value). All three arguments are strings. Depending on
1209 the context it may be necessary to quote the strings or to leave space
1210 on both sides of the dot.
1212 dit(code(\pt)) Specify a dimension in points.
1214 dit(code(\relative) var(pitch) var(music)) Processes the specified
1215 var(music) in relative pitch
1216 mode. In this mode, the octave of a pitch is chosen so that the
1217 pitch is closest to the preceeding pitch.
1218 The argument var(pitch) is
1219 the starting pitch for this comparision. In the case of chords, the
1220 first note of a chord is used as the base for the first pitches in the next
1221 chord. See Section ref(relative).
1223 dit(code(\remove) var(string)code(;)) Can appear only in a
1224 code(\translator) block. Specifies that a performer or engraver named
1225 var(string) should be removed. See Section ref(translators).
1227 dit(code(\repeat) var(count) code({) var(music) code(}))
1228 Repeats the specified
1229 music var(count) times. Alternative endings can be specified by adding a
1230 code(\alternative) keyword after the code(\repeat).
1232 dit(code(\scm) var(scheme)code(;)) Embeds specified Scheme code.
1234 dit(code(\scmfile) var(filename)code(;)) Reads Scheme code from the specified
1237 dit(code(\score) var(statementlist)) Create a Score context. This
1238 is the top level notation context.
1239 COMMENT(this still needs work)
1241 dit(code(\script) var(alias)) Prints a symbol above or below a note.
1242 The argument is a string which points into the script-alias table
1243 defined in file(script.scm). The scheme definitions specify whether
1244 the symbol follows notes into the staff, dependence of symbol
1245 placement on staff direction, and a priority for placing several
1246 symbols over one note. Usually the code(\script) keyword is not used
1247 directly. Various helpful identifier definitions appear in
1250 dit(code(\shape) code(=) var(indent1) var(width1) var(indent2)
1251 var(width2) ... code(;)) Allowed only within code(\paper). Each pair
1252 of var(indent) and var(width) values is a dimension specifying how far
1253 to indent and how wide to make the line. The indentation and width of
1254 successive lines are specified by the successive pairs of dimensions.
1255 The last pair of dimensions will define the characeristics of all
1256 lines beyond those explicitly specified.
1258 COMMENT(First pair of dimensions seems to be skipped. At least it is
1259 in the example file denneboom.ly.)
1261 dit(code(\skip) var(duration)code(;)) Skips the amount of time specified by
1262 var(duration). A gap will be left for the skipped time with no notes
1263 printed. It works in Note Mode or Lyrics Mode (but generates a
1264 mysterious error in lyrics).
1268 dit(code(\spandynamic) code({) var(kind) var(toggle) code(})) Internal
1269 keyword for crescendo and decrescendo symbols. The first parameter
1270 var(kind) is set to 1 for a crescendo and -1 for a decrescendo. The
1271 second parameter is set to 1 to start the mark and 2 to stop it.
1272 Users should use the abbreviations which are defined in the
1273 initialization file file(dynamic.ly).
1277 code(\spanrequest) var(startstop) var(type). Define a
1278 spanning request var(startstop) is either -1 (start) or 1
1279 (stop). var(type) is a string that describes what should be started.
1280 Supported types are "crescendo", "decrescendo", "beam", "slur".
1282 dit(code(\tempo) var(duration) = var(perminute)code(;)) Used within
1283 code(\midi) or within music to specify the tempo. For example,
1284 `code(\midi { \tempo 4 = 76;})' requests output with 76 quarter notes
1285 per minute. Note that if the music contains several tempo commands,
1286 only the last one is used to set the tempo for the entire MIDI output.
1287 COMMENT(Is this true?)
1289 dit(code(\time) var(numerator)code(/)var(denominator)code(;)) Change the time
1290 signature. The default time signature is 4/4.
1292 dit(code(\times) var(numerator)code(/)var(denominator) var(music))
1293 Multiply the duration of var(music) by the specified fraction.
1295 dit(code(\translator) var(statements) or code(\translator)
1296 var(context) = var(name)) The first variant appears only within
1297 code(\paper) and specifies a translator for
1298 converting music to notation. The translator is specified with a
1299 single code(\context) statement and a series of code(\accepts), and
1300 code(\consists) statements. See Section ref(translators).
1301 The second variant appears in
1302 music. It specifies that the current the contexts
1303 contained within the specified context should be shifted to the
1304 context with the specified name.
1306 COMMENT( \translator seems like a strange name for the second
1307 operation, and is the overloading desireable? )
1309 dit(code(\transpose) var(pitch) var(music)) Transposes the specified
1310 music. Middle C is tranposed to var(pitch). This is allowed in music only,
1311 and if it appears inside code(\relative), then any notes specified for
1312 transposition should be specified inside another code(\relative). See Section
1315 dit(code(\context) var(contexttype) [code(=) var(contextname)]
1316 var(music) or code(\context) var(translatortype)code(;)) The first
1317 variant is used only within music to create an instance of a
1318 context. The new context can optionally be given a name. The
1319 specified var(music) is processed in the new context. The second
1320 variant appears within a code(\translator) block and specifies the
1321 type of translator being created.
1323 dit(code(\version) var(string)) Specify the version of Mudela that a
1324 file was written for. The argument is the version number, for example
1325 code("1.0.1"). Note that the Mudela version is different from the
1331 sect(Notation Contexts)
1333 Notation contexts provide information that appears in printed music
1334 but not in the music itself. A new musical context is created using
1335 the code(\context) keyword: `code(\context) var(contexttype) [code(=)
1336 var(contextname)] var(music)'. The following context types are
1341 dit(code(LyricVoice)) Corresponds to a voice with lyrics. Handles the printing
1342 of a single line of lyrics.
1344 dit(code(Voice)) Corresponds to a voice on a staff.
1345 This context handles the conversion of noteheads,
1346 dynamic signs, stems, beams, super- and subscripts, slurs, ties and rests.
1348 dit(code(ChordNamesVoice)) A voice with chord names. Handles printing
1349 of a line of chord names.
1351 dit(code(ChordNames)) Typesets chord names. Can contain
1352 code(ChordNamesVoice) contexts.
1354 dit(code(Lyrics)) Typesets lyrics. It can contain code(LyricVoice) contexts.
1356 dit(code(Staff)) Handles clefs, bar lines, keys,
1357 accidentals. It can contain code(Voice) contexts.
1359 dit(code(RhythmicStaff)) A context like code(Staff) but for printing
1360 rhythms. Pitches are ignored; the notes are printed on one line.
1361 It can contain code(Voice) contexts.
1363 dit(code(GrandStaff)) Contains code(Staff) or code(RhythmicStaff)
1364 contexts. It adds a brace on the left side grouping the staffs
1365 together. The bar lines of the contained staffs are connected vertically.
1366 It can contain code(Staff) contexts.
1368 dit(code(PianoStaff)) Just like code(GrandStaff) but with
1369 code(minVerticalAlign) set equal to code(maxVerticalAlign) so that
1370 interstaff beaming and slurring can be used.
1372 dit(code(StaffGroup)) Contains code(Staff) or code(RhythmicStaff)
1373 contexsts. Adds a bracket on the left side, grouping the staffs
1374 together. The bar lines of the contained staffs are connected vertically.
1375 It can contain code(Staff), code(RhythmicStaff), code(GrandStaff) or code(Lyrics) contexts.
1377 dit(code(ChoirStaff)) Identical to code(StaffGroup) except that the
1378 contained staffs are not connected vertically.
1380 dit(code(Score)) This is the top level notation context. It is specified with
1381 the code(\score) keyword rather than the code(\context) command. No
1382 other context can contain a code(Score) context. This context handles
1383 the administration of time signatures. It also makes sure that items
1384 such as clefs, time signatures, and key-signatures are aligned across
1385 staffs. It can contain code(Lyrics), code(Staff),
1386 code(RhythmicStaff), code(GrandStaff), code(StaffGroup), and
1387 code(ChoirStaff) contexts.
1391 The various contexts have properties associated with them. These
1392 properties can be changed using the code(\property) command:
1393 `code(\property) var(context)code(.)var(propname) code(=) var(value)'.
1394 Properties can also be set within the code(\translator) block
1395 corresponding to the appropriate context. In this case, they are
1396 assigned by `var(propname) code(=) var(value)'. The settings made with
1397 code(\property) are processed after settings made in the code(\translator)
1398 block, so the code(\property) settings will override code(\translator)
1401 The code(\property) keyword will create any property you specify.
1402 There is no guarantee that a property will actually be used. If you
1403 spell a property name wrong, there will be no error message. In order to find
1404 out what properties are used, you must search the source code
1405 for code(get_property).
1406 Properties that are set in one context are inherited by all of the
1407 contained contexts. This means that a property valid for the Voice
1408 context can be set in the Score context (for example) and thus take
1409 effect in all Voice contexts.
1411 subsubsubsect(Lyrics properties)
1415 dit(code(textStyle)) Set the font for lyrics. The available font
1416 choices are code(roman), code(italic), code(bold), code(large),
1417 code(Large), code(typewriter), and code(finger). The code(finger)
1418 font can only display numbers. Note also that you must be careful
1419 when using code(\property) in Lyrics mode. Because of the way strings
1420 are parsed, either put quotes around the arguments to code(\property)
1421 or be sure to leave a space on both sides of the dot.
1423 GONE dit(code(textalignment)) Controls alignment of lyrics. Set to code(\left)
1424 to align the left end of the lyric with the note; set to code(\right) to
1425 align the right end of the lyric with the note. Set to code(\center) to
1426 align the center of the lyric with the note.
1430 subsubsubsect(Voice properties)
1434 dit(code(textEmptyDimension)) If set to 1 then text placed above or
1435 below the staff is assumed to have zero width.
1437 dit(code(noteheadStyle)) Selects type of note head. Choices are
1438 code(cross), code(diamond), code(harmonic), code(transparent), and
1439 code(""). They are shown in that order below.
1443 \property Staff.barNonAuto = 1
1444 \property Voice.noteHeadStyle = cross
1446 \property Voice.noteHeadStyle = diamond
1448 \property Voice.noteHeadStyle = harmonic
1450 \property Voice.noteHeadStyle = transparent
1452 \property Voice.noteHeadStyle = ""
1455 \paper{ linewidth = -1.;}
1460 dit(code(restStyle)) Change the layout of rests shorter than quarter notes.
1461 Currently, the standard layout code(restStyle="") and mensural notation
1462 code(restStyle="mensural") are available.
1464 dit(code("midiInstrument")) Sets the instrument for MIDI output. This
1465 property name must be quoted because of the embedded underscore. If
1466 this property is not set then LilyPond will use the code(instrument)
1467 property. This must be set to one of the strings on the list of MIDI
1468 instruments that appears in Section ref(midilist). If you use a
1469 string which is not listed, LilyPond will silently substitute piano.
1471 dit(code(transposing)) Tranpose the MIDI output. Set this property to
1472 the number of half-steps to transpose by.
1474 dit(code(oldTieBehavior)) Set to 1 in order to get old tie behavior
1475 where ties would connect unequal pitches.
1477 dit(code(ydirection)) Determines the direction of stems, subscripts,
1478 beams, slurs, and ties. Set to code(\down) to force them down,
1479 code(\up) to force them up, or code(\free) to let LilyPond decide.
1480 This can be used to distinguish between voices on the same staff. The
1481 code(\stemdown), code(\stemup), and code(\stemboth) identifiers set
1482 this property. See also the identifiers code(\voiceone),
1483 code(\voicetwo), code(\voicethree) and code(\voicefour).
1485 dit(code(slurydirection)) Set to code(\free) for free choice of slur
1486 direction, set to code(\up) to force slurs up, set to code(\down) to
1487 force slurs down. The shorthands code(\slurup), code(\slurdown), and
1488 code(\slurboth) are available.
1490 dit(code(tieydirection)) Set to code(\free) for free choice of tie
1491 direction, set to code(\up) to force ties up, set to code(\down) to
1494 dit(code(slurdash)) Set to 0 for normal slurs, 1 for dotted slurs, and
1495 a larger value for dashed slurs. Identifiers code(\slurnormal) and
1496 code(\slurdotted) are predefined to set the first two settings.
1498 dit(code(hshift)) Set to 1 to enable LilyPond to shift notes
1499 horizontally if they collide with other notes. This is useful when
1500 typesetting many voices on one staff. The identifier code(\shift) is
1501 defined to enable this.
1503 dit(code(dynamicDir)) Determines location of dynamic marks. Set to
1504 code(\up) to print marks above the staff; set to code(\down) to print
1505 marks below the staff.
1507 GONE dit(code(textalignment)) Controls alignment of superscripted and
1508 subscripted text. Set to \left to align the left end of the text with
1509 the note; set to \right to align the right end of the text with the
1510 note. Set to \center to align the center of the text with the note.
1512 dit(code(textStyle)) Set the text style for superscripts and
1513 subscripts. See above for list of text styles.
1515 dit(code(textScriptPadding)) Determines the extra space added between
1516 super-/subscripted text and the closest staff line or note.
1518 dit(code(fontSize)) Can be used to select smaller font sizes for
1519 music. The normal font size is 0, and the two smaller sizes are -1
1522 dit(code(abbrev)) Set length for tremolo to be used if no length is
1523 explicitly specified.
1525 GONE dit(code(markScriptPadding)) Determines the extra space added between
1526 the mark and the closest staff line or note.
1528 GONE dit(code(markDirection)) Determines if marks should be printed above
1529 or below the staff. Set to code(\up) to print marks above the staff;
1530 set to code(\down) to print marks below the staff.
1534 subsubsubsect(Staff properties)
1538 dit(code(barAtLineStart)) Set to 1 to produce a bar line after the
1539 clef at the start of each line (but not at the beginning of the
1542 dit(code(voltaVisibility)) Set to 0 to suppress the printing
1543 of brackets over alternate endings specified by code(\alternative).
1545 dit(code(voltaSpannerDuration)) Set to an integer to control the size
1546 of the brackets printed by code(\alternative). The integer specifies
1547 the number of whole notes duration to use for the brackets. It seems
1548 to be rounded to the nearest measure. This can be used to shrink the
1549 length of brackets in the situation where one alternative is very
1550 large. It may have odd effects if the specified duration is longer
1551 than the music given in an code(\alternative).
1553 dit(code(barNonAuto)) If set to 1 then bar lines will not be printed
1554 automatically; they must be explicitly created with code(\bar) keywords.
1556 dit(code(unfoldRepeats)) If set to 1 then repeats will be unfolded.
1557 Otherwise, they will be printed using repeat symbols.
1559 dit(code(defaultClef)) Determines the default clef. See code(\clef)
1562 dit(code(nuberOfStaffLines)) Sets the number of lines that the staff has.
1564 dit(code(barAlways)) If set to 1 a bar line is drawn after each note.
1566 dit(code(defaultBarType)) Sets the default type of bar line. See
1569 dit(code(keyoctaviation)) If set to 1, then keys are the same in all
1570 octaves. If set to 0 then the key signature for different octaves can
1571 be different and is specified independently: code(\keysignature bes
1572 fis'). The default value is 1. Can be set to zero with
1573 code(\specialkey) or reset to 1 with code(\normalkey).
1575 dit(code(instrument) and code(instr)) If code(Staff_margin_engraver)
1576 is added to the Staff translator, then the code(instrument) property
1577 is used to label the first line of the staff and the code(instr)
1578 property is used to label subsequent lines. If the
1579 code(midiInstrument) property is not set then code(instrument) is
1580 used to determine the instrument for MIDI output.
1581 COMMENT(This prints the instrument name on top of the staff lines.)
1583 dit(code(createKeyOnClefChange)) Set to a nonempty string if you want key
1584 signatures to be printed when the clef changes. Set to the empty string (the
1585 default) if you do not want key signatures printed.
1588 dit(code(timeSignatureStyle)) Changes the default two-digit layout
1589 for time signatures. The following values are recognized:
1591 dit(code(C)) 4/4 and 2/2 are typeset as C and struck C,
1592 respectively. All other time signatures are written with two digits.
1593 dit(code(old)) 2/2, 3/2, 3/4, 4/4, 6/4, 9/4, 6/8 and 9/8 are typeset
1594 with old-style mensuration marks. All other time signatures are
1595 written with two digits.
1596 dit(code(1)) All time signatures are typeset with a single
1597 digit, e.g. 3/2 is written as 3.
1598 dit(code(C2/2), code(C4/4), code(old2/2), code(old3/2),
1599 code(old3/4), code(old4/4), code(old6/4), code(old9/4),
1600 code(old6/8) or code(old9/8))Tells Lilypond to use a
1601 specific symbol as time signature.
1603 The different time signature characters are shown below with
1607 \notes\relative c'' {
1608 \property Voice.textStyle = typewriter
1609 \property Staff.timeSignatureStyle = "C2/2"
1610 \time 2/2; a2^"C2/2" a2
1611 \property Staff.timeSignatureStyle = "C4/4"
1612 \time 2/2; a2^"C4/4" a2
1613 \property Staff.timeSignatureStyle = "old2/2"
1614 \time 2/2; a2^"old2/2" a2
1615 \property Staff.timeSignatureStyle = "old3/2"
1616 \time 2/2; a2^"old3/2" a2
1617 \property Staff.timeSignatureStyle = "old4/4"
1618 \time 2/2; a2^"old4/4" a2
1619 \property Staff.timeSignatureStyle = "old6/4"
1620 \time 2/2; a2^"old6/4" a2
1621 \property Staff.timeSignatureStyle = "old9/4"
1622 \time 2/2; a2^"old9/4" a2
1623 \property Staff.timeSignatureStyle = "old6/8"
1624 \time 2/2; a2^"old6/8" a2
1625 \property Staff.timeSignatureStyle = "old9/8"
1626 \time 2/2; a2^"old9/8" a2
1628 \paper{ linewidth= 4.5 \in; }
1632 dit(code(clefStyle)) Determines how clefs are typeset. When set to
1633 code(transparent), the clefs are not printed at all, when set to
1634 code(fullSizeChanges), clef changes in the middle of a line are
1635 typeset with a full size clef. By default, clef changes are typeset in
1640 subsubsubsect(GrandStaff properties)
1644 dit(code(maxVerticalAlign)) Set the maximum vertical distance between
1647 dit(code(minVerticalAlign)) Set the minimum vertical distance between
1652 subsubsubsect(Score properties)
1656 dit(code(skipBars)) Set to 1 to skip the empty bars that are produced
1657 by multimeasure notes and rests. These bars will not appear on the
1658 printed output. Set to zero (the default) to expand multimeasure
1659 notes and rests into their full length, printing the appropriate
1660 number of empty bars so that synrchonization with other voices is
1661 preserved. COMMENT(meaning of "skip" here seems to be different from
1662 the meaning used for the keyword \skip.)
1664 dit(code(beamquantisation)) Set to code(\none) for no quantization.
1665 Set to code(\normal) to quantize position and slope. Set to
1666 code(\traditional) to avoid wedges. These three settings are
1667 available via code(\beamposfree), code(\beamposnormal), and
1668 code(\beampostraditional).
1670 dit(code(beamslopedamping)) Set to code(\none) for undamped beams.
1671 Set to code(\normal) for damped beams. Set to code(\infinity) for
1672 beams with zero slope. The identifiers code(\beamslopeproportional),
1673 code(\beamslopedamped), and code(\beamslopezero) each set the
1674 corresponding value.
1676 dit(code(chordInversion)) Determines whether LilyPond should look for
1677 chord inversions when translating from notes to chord names. Set to 1
1678 to find inversions. The default is 0 which does not look for inversions.
1684 sect(Pre-defined Identifiers)
1687 Various identifiers are defined in the initialization files to
1688 provide shorthands for some settings.
1691 dit(code(\aeolian)) Used as the second argument of the code(\key)
1692 keyword to get an aeolian mode.
1693 dit(code(\break)) Force a line break in music by using a large
1694 argument for the keyword code(\penalty).
1695 dit(code(\center)) Used for setting textalignment property. Is set to 0.
1696 dit(code(\cr)) Start a crescendo.
1697 dit(code(\decr)) Start a decrescendo.
1698 dit(code(\dorian)) Used as the second argument of the code(\key)
1699 keyword to get a dorian mode.
1700 dit(code(\down)) Used for setting direction setting properties. Is
1702 dit(code(\f)) Print forte symbol on the preceeding note.
1703 dit(code(\ff)) Print fortissimo symbol on the preceeding note.
1704 dit(code(\fff)) Print fortississimo symbol on preceeding note.
1705 dit(code(\ffff)) Print fortissississimo symbol on preceeding note.
1706 dit(code(\fffff)) Print fffff symbol on preceeding note.
1707 dit(code(\ffffff)) Print ffffff symbol on preceeding note.
1708 dit(code(\fp)) Print fortepiano symbol on preceeding note.
1709 dit(code(\free)) Used for setting direction setting properties. Is
1711 dit(code(\Gourlay)) Used for setting the paper variable
1712 code(castingalgorithm). Is equal to 1.0.
1713 dit(code(\infinity)) Used for setting the Score.beamslopedamping
1714 property. Is actually equal to 10000.
1715 dit(code(\ionian)) Used as the second argument of the code(\key)
1716 keyword to get an ionian mode.
1717 dit(code(\left)) Used for setting textalignment property. Is equal to -1.
1718 dit(code(\locrian)) Used as the second argument of the code(\key)
1719 keyword to get a locrian mode.
1720 dit(code(\lydian)) Used as the second argument of the code(\key)
1721 keyword to get a lydian mode.
1722 dit(code(\major)) Used as the second argument of the code(\key)
1723 keyword to get a major key.
1724 dit(code(\minor)) Used as the second argument of the code(\key)
1725 keyword to get a minor key.
1726 dit(code(\mixolydian)) Used as the second argument of the code(\key)
1727 keyword to get a mixolydian mode.
1728 dit(code(\mf)) Print mezzoforte symbol on preceeding note.
1729 dit(code(\mp)) Print mezzopiano symbol on preceeding note.
1730 dit(code(\nobreak)) Prevent a line break in music by using a large
1731 negative argument for the keyword code(\penalty).
1732 dit(code(\none)) Used for setting Score.beamslopedamping and
1733 Score.beamquantisation properties. Is equal to 0.
1734 dit(code(\normal)) Used for setting Score.beamslopedamping and
1735 Score.beamquantisation properties. Is equal to 1.
1736 dit(code(\normalkey)) Select normal key signatures where each octave
1737 has the same key signature. This sets the Staff.keyoctaviation property.
1738 dit(code(\p)) Print a piano symbol on preceeding note.
1739 dit(code(\phrygian)) Used as the second argument of the code(\key)
1740 keyword to get a phrygian mode.
1741 dit(code(\pp)) Print pianissimo symbol on preceeding note.
1742 dit(code(\ppp)) Print pianississimo symbol on preceeding note.
1743 dit(code(\pppp)) Print pianissississimo symbol on preceeding note.
1744 dit(code(\ppppp)) Print ppppp symbol on preceeding note.
1745 dir(code(\pppppp)) Print pppppp symbol on preceeding note.
1746 dit(code(\rc)) Terminate a crescendo.
1747 dit(code(\rced)) Terminate a decrescendo
1748 dit(code(\rfz)) Print a rinforzato symbol on preceeding note.
1749 dit(code(\right)) Used for setting textalignment property. Is set to 1.
1750 dit(code(\sf)) Print a subito-forte symbol on preceeding note.
1751 dit(code(\sff)) Print a subito-fortissimo symbol on preceeding note.
1752 dit(code(\sfz)) Print a sforzato symbol on preceeding note.
1753 dit(code(\shiftoff)) Disable horizontal shifting of note heads that collide.
1754 Sets the Voice.hshift property.
1755 dit(code(\shifton)) Enable note heads that collide with other note heads
1756 to be shifted horiztonally. Sets the Voice.hshift property.
1757 dit(code(\slurboth)) Allow slurs to be above or below notes. This
1758 sets the Voice.slurydirection property.
1759 dit(code(\slurdown)) Force slurs to be below notes. This sets the
1760 Voice.slurydirection property.
1761 dit(code(\slurup)) Force slurs to be above notes. This sets the
1762 Voice.slurydirection property.
1763 dit(code(\sp)) Print a subito-piano symbol on preceeding note.
1764 dit(code(\spp)) Print a subito-forte symbol on preceeding note.
1765 dit(code(\specialkey)) Allow keys signatures do differ in different
1766 octaves. This sets the Staff.keyoctaviation property.
1767 dit(code(\stemboth)) Allow stems, beams, and slurs to point either
1768 direction. This sets the Voice.ydirection property.
1769 dit(code(\stemdown)) Force stems, beams, and slurs to point down.
1770 This sets the Voice.ydirection property.
1771 dit(code(\stemup)) Force stems, beams and slurs to point up. This
1772 sets the Voice.ydirection property.
1773 dit(code(\traditional)) Used for setting the
1774 Score.beamquantisation property. Is equal to 2.
1775 dit(code(\up)) Used for setting various direction properties. Is
1777 dit(code(\voiceone)) Enter Voice context called code(one) and force stems down.
1778 (See code(\stemdown).)
1779 dit(code(\voicetwo)) Enter Voice context called code(two) and force stems
1780 up. (See code(\stemup).)
1781 dit(code(\voicethree)) Enter Voice context called code(three) and force stems
1783 dit(code(\voicefour)) Enter Voice context called code(four), force stems down
1784 and turn on horizontal shifting. (See code(\stemdown) and code(\shifton).)
1785 dit(code(\Wordwrap)) Used for setting the paper variable
1786 code(castingalgorithm). Equal to 0.0.
1794 The output produced by LilyPond is controlled by the code(\paper) and
1795 code(\midi) keywords. These keywords appear in the code(\score) block
1796 to indicate that printed or musical output should be produced. If
1797 neither keyword appears in a code(\score) block, then paper output is
1798 produced but MIDI output is not produced.
1800 The contents of the code(\paper) and code(\midi) blocks can change the
1801 output in various ways. These blocks can appear at the top level of a
1802 Mudela file to set default parameters for each type of output. It is
1803 still necessary to explicitly specify the output type in the
1804 code(\score) blocks if you don't want the default behavior of
1805 producing only paper output.
1807 The code(\paper) and code(\midi) blocks
1808 may begin with an optional identifier reference. No
1809 identifier references are allowed anywhere else in the block.
1810 The code(\paper) block can contain the code(\shape) keyword; the
1811 code(\midi) block can contain the code(\tempo) keyword. Both of them
1812 can contain code(\translator) keywords. The code(\paper) block can
1813 also contain identifier assignments and parameter assignments. Unlike
1814 at the top level, these assignments must be terminated by a semicolon.
1817 subsect(Paper variables)
1819 Warning: this section is outdated and inaccurate.
1821 There are a large number of paper variables that are used to control
1822 details of the layout. Usually you will not want to change these
1823 variables; they are set by default to vaules that depend on the font
1824 size in use. The only way to find out what variables are supported is
1825 to search the source code for code(get_var). Two variables that you
1826 may want to change are code(linewidth) and code(indent).
1828 In order to change the font size used for the output, many variables
1829 need to be changed. Some identifiers and initialization files can
1830 simplify this process. The default size is 20pt. In order to select
1831 a different size, you must do two things. At the top level, do
1832 code(\include "paper)var(SZ)code(.ly") where var(SZ) is the height of
1833 the staff in points. Values presently allowed are 11, 13, 16, 20, and
1834 26. This loads some definitions, but does not cause them to take
1835 effect. In order to actually change the size, you must use one of the
1836 identifiers: code(\paper_eleven), code(\paper_thirteen),
1837 code(\paper_sixteen), code(\paper_twenty) or code(\paper_twentysix)
1838 inside a code(\paper) block.
1842 dit(var(integer)) If an integer appears on the left side of an
1843 assignment then a code(\font) keyword must appear on the right
1844 side. This defines a music font at a particular size. See Voice
1845 property code(fontSize).
1847 dit(code(arithmetic_basicspace) and code(arithmetic_multiplier))
1848 The space taken by a note is determined by the formula
1851 )verb(arithmetic_multiplier * ( c + log2 (time) ))COMMENT(
1853 ) where code(time) is the amount of time a note occupies. The value
1854 of code(c) is chosen such that the smallest space within a measure is
1855 arithmetic_basicspace. The smallest space is the one following the
1856 shortest note in the measure. Typically arithmetic_basicspace is set
1857 to the width of a quarter note head.
1859 dit(code(barsize)) Specify height of bars. This value may need to be
1860 adjusted if you change the number of lines in the staff.
1861 dit(code(beam_dir_algorithm)) Specify algorithm for determining
1862 whether beams go up or down. It is real valued. If set to 2.0 then
1863 majority selection is used. If set to 3.0, then mean selection is
1864 used based on the mean center distance. If set to 4.0 then median
1865 selection is used, based on the median center distance.
1866 dit(code(castingalgorithm))
1867 dit(code(forced_stem_shorten)) Stems that have been forced to go the
1868 unnatural direction are shortened by this amount. Equal to
1869 dit(code(forced_stem_shorten0))
1870 dit(code(gourlay_energybound))
1871 dit(code(gourlay_maxmeasures)) Maximum number of measures per line
1872 when using Gourlay method.
1873 Decreasing this greatly reduces computation time. Default value: 10.
1874 dit(code(indent)) Sets the indentation of the first line of music.
1875 dit(code(interbeam))
1876 dit(code(interbeam4))
1877 dit(code(interline)) The distance between two staff
1878 lines, calculated from the center of the lines.
1879 dit(code(linewidth)) Sets the width of the lines. If it is set to
1880 -1.0, then a single unjustified line is produced.
1881 dit(code(notewidth)) Width of an average note head.
1882 dit(code(output)) Specifies an alternate
1883 name for the TeX() output. A file(.tex) extension will be added to
1884 the string you specify.
1885 dit(code(rulethickness)) Determines thickness of staff lines and bars.
1886 dit(code(slur_clip_angle))
1887 dit(code(slur_clip_height))
1888 dit(code(slur_clip_ratio))
1889 dit(code(slur_height_limit)) Specifies the maximum height of slurs.
1890 Normally equal to staff_height.
1891 dit(code(slur_ratio)) Specifes the ratio of slur hight to slur width
1892 to aim for. Default value is 0.3.
1893 dit(code(slur_rc_factor))
1894 dit(code(slur_slope_damping)) Allows slurs to start and end at
1895 different heights ???? Default value is 0.5.
1896 dit(code(slur_thickness)) Specify slur thickness. Equal to code(1.4 *
1897 \staffline) by default.
1898 dit(code(slur_x_gap)) Horizontal space between note and slur. Set to
1899 code(\interline / 5) by default.
1900 dit(code(slur_x_minimum))
1901 dit(code(staffheight)) The height of the staff from the center of the
1902 bottom line to the center of the top line. Equal to to code(4 * \interline).
1903 dit(code(stem_length)) Specify length of stems for notes in the staff
1904 that don't have beams.
1905 dit(code(stemthickness)) Specifies the thickness of the stem lines.
1906 dit(code(tie_slope_damping))
1907 dit(code(tie_x_minimum))
1911 subsect(MIDI Instrument Names)
1914 The MIDI instrument name is set by the code(Staff."midiInstrument")
1915 property or, if that property is not set, the code(Staff.instrument)
1916 property. The instrument name should be chosen from this list. If
1917 string does not exactly match one from this list then LilyPond uses
1920 COMMENT( acordina = accordion, tango accordian = concertina
1921 distortion guitar = distorted guitar
1922 orchestral strings = harp
1923 pan flute = wood flute? )
1925 verb("acoustic grand" "contrabass" "lead 7 (fifths)"
1926 "bright acoustic" "tremolo strings" "lead 8 (bass+lead)"
1927 "electric grand" "pizzicato strings" "pad 1 (new age)"
1928 "honky-tonk" "orchestral strings" "pad 2 (warm)"
1929 "electric piano 1" "timpani" "pad 3 (polysynth)"
1930 "electric piano 2" "string ensemble 1" "pad 4 (choir)"
1931 "harpsichord" "string ensemble 2" "pad 5 (bowed)"
1932 "clav" "synthstrings 1" "pad 6 (metallic)"
1933 "celesta" "synthstrings 2" "pad 7 (halo)"
1934 "glockenspiel" "choir aahs" "pad 8 (sweep)"
1935 "music box" "voice oohs" "fx 1 (rain)"
1936 "vibraphone" "synth voice" "fx 2 (soundtrack)"
1937 "marimba" "orchestra hit" "fx 3 (crystal)"
1938 "xylophone" "trumpet" "fx 4 (atmosphere)"
1939 "tubular bells" "trombone" "fx 5 (brightness)"
1940 "dulcimer" "tuba" "fx 6 (goblins)"
1941 "drawbar organ" "muted trumpet" "fx 7 (echoes)"
1942 "percussive organ" "french horn" "fx 8 (sci-fi)"
1943 "rock organ" "brass section" "sitar"
1944 "church organ" "synthbrass 1" "banjo"
1945 "reed organ" "synthbrass 2" "shamisen"
1946 "accordion" "soprano sax" "koto"
1947 "harmonica" "alto sax" "kalimba"
1948 "concertina" "tenor sax" "bagpipe"
1949 "acoustic guitar (nylon)" "baritone sax" "fiddle"
1950 "acoustic guitar (steel)" "oboe" "shanai"
1951 "electric guitar (jazz)" "english horn" "tinkle bell"
1952 "electric guitar (clean)" "bassoon" "agogo"
1953 "electric guitar (muted)" "clarinet" "steel drums"
1954 "overdriven guitar" "piccolo" "woodblock"
1955 "distorted guitar" "flute" "taiko drum"
1956 "guitar harmonics" "recorder" "melodic tom"
1957 "acoustic bass" "pan flute" "synth drum"
1958 "electric bass (finger)" "blown bottle" "reverse cymbal"
1959 "electric bass (pick)" "skakuhachi" "guitar fret noise"
1960 "fretless bass" "whistle" "breath noise"
1961 "slap bass 1" "ocarina" "seashore"
1962 "slap bass 2" "lead 1 (square)" "bird tweet"
1963 "synth bass 1" "lead 2 (sawtooth)" "telephone ring"
1964 "synth bass 2" "lead 3 (calliope)" "helicopter"
1965 "violin" "lead 4 (chiff)" "applause"
1966 "viola" "lead 5 (charang)" "gunshot"
1967 "cello" "lead 6 (voice)")
1971 subsect(Translators)
1974 The behavior of notation contexts is defined by the translators for
1975 those contexts. The translator for a context specifies what notations
1976 are handled by the context, it specifies what other contexts the
1977 context can contain, and it sets property values for the context.
1978 There are different translators for each type of output. The
1979 translators for paper output are defined in file(engraver.ly). The
1980 translators for MIDI output are defined in file(performer.ly).
1982 The first thing that appears inside a code(\translator) definition is
1983 the type of the context being created. This is specified with the
1984 code(\type) keyword: code(\type) var(typename)code(;). After the type
1985 of the context is specified, property assignments, the code(\name)
1986 keyword and code(\consists), code(\accepts), and code(\remove)
1987 keywords can appear in any order. The code(\name) keyword specifies
1988 the name of the context that is handled by the translator. If the
1989 name is not specified, the translator won't do anything. Each
1990 code(\accepts) keyword specifies what contexts can be contained inside
1991 this one. The code(\consists) keywords specify which notations are
1992 handled by the context. Each code(\consists) keyword specifies the
1993 name of an engraver (for paper ouput) or performer (for MIDI output)
1994 which handles a certain notation. The code(\remove) keyword can be
1995 used to remove a performer or engraver from the translator.
1997 In the code(\paper) block, it is also possible to define translator
1998 identifiers. Like other block identifiers, the identifier can only
1999 be used as the very first item of a translator. In order to define
2000 such an identifier outside of code(\score), you must do
2001 verb(\paper{ foo=\translator{ ... }
2004 \paper{ \translator{ \foo ... } }
2007 Some All of the standard translators have predefined identifiers, making
2008 it easy to redefine these contexts by adding or removing items.
2009 The predefined identifiers are: code(StaffContext),
2010 code(RhythmicStaffContext), code(VoiceContext), code(ScoreContext), code(ScoreWithNumbers)
2013 subsubsect(Paper Types and Engravers and Pre-defined Translators)
2015 Some pre-defined identifiers can simplify modification of translators.
2016 The pre-defined identifiers are:
2018 dit(code(StaffContext)) Default Staff context.
2019 dit(code(RhythmicStaffContext)) Default RhythmicStaff context.
2020 dit(code(VoiceContext)) Default Voice context.
2021 dit(code(ScoreContext)) Default Score context.
2022 dit(code(ScoreWithNumbers)) Score context with numbering at the
2024 dit(code(BarNumberingStaffContext)) Staff context with numbering at
2026 dit(code(HaraKiriStaffContext))
2027 dit(code(OrchestralPartStaffContext))
2028 dit(code(OrchestralScoreContext))
2030 Using these pre-defined values, you can remove or add items to the
2031 translator verb(\paper{ \translator{ \StaffContext
2032 \remove Some_engraver;
2033 \consists Different_engraver; }})
2037 There are four types for paper translators:
2039 dit(code(Engraver_group_engraver))
2040 dit(code(Hara_kiri_line_group_engraver))
2041 dit(code(Line_group_engraver_group))
2042 dit(code(Score_engraver))
2044 COMMENT( The names of these types seem somewhat confusing. )
2046 The engravers for paper output are:
2049 dit(code(Abbreviation_beam_engraver))
2050 dit(code(Bar_engraver)) Engraves bar lines. Normally in code(Staff) and
2051 code(RhythmicStaff).
2052 dit(code(Bar_number_engraver)) Engrave bar numbers. These numbers
2053 appear at the start of each line. Not normally in any translator. Can
2054 be added to code(Score) for Score-wide numbering or to code(Staff) for
2055 numbering on each staff.
2057 dit(code(Beam_engraver)) Handles beam requests by engraving beams. Normally
2058 appears in the code(Voice) translator. If omitted, then notes will be printed
2059 with flags instead of beams.
2061 dit(code(Beam_req_swallow_translator)) Swallows beam requests. In
2063 dit(code(Chord_name_engraver)) Engraves chord names. Normally in
2064 code(ChordNameVoice)
2065 dit(code(Clef_engraver)) Engraves the clef symbol. Normally in code(Staff).
2066 dit(code(Collision_engraver))
2067 dit(code(Dot_column_engraver)) Engraves dots on dotted notes shifted to the
2068 right of the note. Normally in code(Voice). If omitted, then dots appear on
2070 dit(code(Dynamic_engraver)) Engraves dynamics symbols. Normally in code(Voice).
2071 dit(code(Font_size_engraver))
2072 dit(code(Key_engraver)) Engraves the key signature. Normally in code(Staff).
2073 dit(code(Local_key_engraver))
2074 dit(code(Lyric_engraver)) Engraves lyrics. Normally in code(LyricVoice).
2075 dit(code(Multi_measure_rest_engraver)) Engraves multi-measure rests that are
2076 produced with code(R). Normally in code(Voice).
2077 dit(code(Piano_bar_engraver))
2078 dit(code(Pitch_squash_engraver)) Treat all pitches as middle C. Used in
2079 code(RhythmicStaff). Note that the notes move, but the locations of
2080 accidentals stay the same.
2081 dit(code(Priority_horizontal_align_engraver))
2082 dit(code(Repeat_engraver)) Handles repeats? In code(Staff) and
2083 code(RhythmicStaff).
2084 dit(code(Rest_collision_engraver)) Handles collisions of rests. In code(Staff).
2085 dit(code(Rest_engraver)) Engraves rests. Normally in code(Voice).
2086 dit(code(Rhythmic_column_engraver))
2087 dit(code(Score_priority_engraver))
2088 dit(code(Script_engraver)) Handles note ornaments generated by code(\script).
2089 Normally in code(Voice).
2090 dit(code(Separating_line_group_engraver))
2091 dit(code(Skip_req_swallow_translator))
2092 dit(code(Slur_engraver)) Engraves slurs. Normally in code(Voice).
2093 dit(code(Span_bar_engraver)) Engraves lines across multiple staffs. Normally
2094 in code(Staffgroup) and code(GrandStaff). Removing this from code(StaffGroup)
2095 gives the definition of code(ChoirStaff).
2096 dit(code(Span_score_bar_engraver))
2097 dit(code(Staff_group_bar_engraver))
2098 dit(code(Staff_margin_engraver)) Prints the name of the instrument
2099 (specified by code(Staff.instrument) and code(Staff.instr)) at the
2101 dit(code(Staff_sym_engraver))
2102 dit(code(Stem_engraver)) Engraves stems. Normally in code(Voice).
2103 dit(code(Ties_engraver)) Engraves ties. Normally in code(Voice).
2104 dit(code(Time_signature_engraver)) Engraves the time signature. Normally in
2105 code(Staff) and code(RhythmicStaff).
2106 dit(code(Timing_engraver)) Responsible for synchronizing timing information
2107 from staffs. Normally in code(Score). In order to create polyrhythmic music,
2108 this engraver should be removed from code(Score) and placed in code(Staff).
2109 dit(code(Tuplet_engraver)) Engraves tuplet brackets? In code(Staff).
2110 dit(code(Vertical_align_engraver))
2114 subsubsect(MIDI Types and Performers)
2116 The types available for MIDI translators are:
2118 dit(code(Performer_group_performer))
2119 dit(code(Score_performer))
2120 dit(code(Staff_performer))
2123 The performers for MIDI translators are:
2125 dit(code(Key_performer))
2126 dit(code(Time_signature_performer))
2127 dit(code(Note_performer))
2128 dit(code(Lyric_performer))
2129 dit(code(Swallow_performer))