]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/tex/refman.yo
release: 1.1.47
[lilypond.git] / Documentation / tex / refman.yo
1 mailto(gnu-music-discuss@gnu.org)
2 COMMENT(-*-text-*-)
3
4 redef(var)(1)(whenlatex(latexcommand({\normalfont\scshape )ARG1+latexcommand(}))\
5     whenhtml(sc(ARG1)))
6
7
8 redef(code)(1)(tt(ARG1))
9
10
11 COMMENT(
12
13 questions:
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
25      for rests.fly)
26    what happened to the Staff.textalignment and Lyrics.textalignment 
27      properties? 
28
29
30 TODO:
31    autobeamer
32    paper size?
33    paper variables
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?
37    accordion symbols
38    interstaff beams (beam-interstaff.ly)
39    interstaff slurs (see preludes-1.ly)
40
41    Current list of undocumented properties:
42
43          "alignmentReference"  to do with minVerticalAlign, etc?
44          "beamAuto"
45          "beamAutoBegin"
46          "beamAutoBegin" + type_str
47          "beamAutoEnd"
48          "beamAutoEnd" + type_str
49          "createInitdefaultClef"
50          "dynamicStyle"
51          "postBreakPadding"
52          "staffLineLeading"
53          "stemLeftBeamCount"
54          "stemRightBeamCount"
55          time_str + "beamAutoBegin"
56          time_str + "beamAutoBegin" + type_str
57          time_str + "beamAutoEnd"
58          time_str + "beamAutoEnd" + type_str
59          type_ + "Direction"
60          type_ + "HangOnClef"
61          type_ + "ScriptPadding"
62 )
63
64
65 COMMENT( 
66 This document contains Mudela fragments.  You need at least
67 Yodl-1.30.18 to convert this to tex or html.
68 )
69
70 htmlbodyopt(bgcolor)(white)
71 htmlcommand(<font color=black>)
72
73 latexlayoutcmds(
74 \setlength{\topmargin}{-0.25in}
75 \setlength{\textheight}{9in}
76 \setlength{\textwidth}{5.875in} 
77 \setlength{\oddsidemargin}{0.25in}   
78 \setlength{\evensidemargin}{0.25in}
79 \input mudela-book
80 )
81
82 whentexinfo(notableofcontents())
83
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())
87
88 COMMENT(
89
90 * The [ ] look weird
91
92 * paragraphs have too much space.
93
94 )
95
96
97 latexcommand(\def\interexample{})
98 latexcommand(\def\preexample{\par})
99 latexcommand(\def\postexample{\par\medskip})
100 latexcommand(\def\file#1{{code(#1)}})
101 COMMENT(
102 latexcommand(\def\texttt#1{\tt #1})
103 latexcommand(\def\textbf#1{\bf #1})
104 )
105
106 COMMENT(urg, texinfo include breaks)
107 whenhtml(
108 includefile(html-disclaimer.yo-urg)
109 )
110
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
116 init files.
117
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.)
125
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
128 point of view.
129
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.
134
135
136 sect(Running LilyPond)
137
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
143 like:
144 verb(\score {
145   \notes\relative c {
146     \input "yourfile.fly"
147   }
148   \paper{}
149   \midi{}
150 })
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.
156
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.
162
163 sect(Syntax)
164
165 subsect(Basic Mudela)
166
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.
173
174 Mudela supports several types:
175
176 description(
177
178 dit(integer) 
179 Formed from an optional minus sign followed by digits.  Arithmetic
180 operations cannot be done with integers, and integers cannot be mixed
181 with reals.
182
183 dit(real) 
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.
188
189 dit(string) 
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.
198
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
204 (code(\shape)).
205
206 dit(pitch) 
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).  
213
214 dit(music) 
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'>}
231 )
232
233 )
234
235
236
237 subsect(Identifiers)
238
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
247 elsewhere.  
248
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)
264
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; }
272 \score{
273   \notes{ ... }
274   \paper{ \foo }
275 })
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 { ... }
279 \score{ \foo })  
280 It is not necessary to specify code(\notes).
281
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.
294
295
296
297 subsect(Modes)
298 label(modes)
299
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.  
309
310 description(
311
312 dit(Normal mode)
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. 
317
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. 
324
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)
328
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
348 \'afoo}         % 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
353 ))
354
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.  
360
361 COMMENT(
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
365
366 What's this about reals?  When can you enter them or not enter them?)
367
368
369 sect(Note Description)
370 label(notedesc)
371
372 subsect(Basic Note Specification)
373
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.  
377
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
385 code(-eses).  
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
390 specified duration.
391
392 The optional octave specification takes the form of a series of single
393 quote 
394 code(') characters or a series of comma code(,) characters.  Each
395 code(') raises the pitch by one octave; each code(,) lowers the pitch
396 by an octave.  
397
398 mudela(fragment,verbatim,center)(
399 c' d' e' f' g' a' b' c''
400 )
401
402 mudela(fragment,verbatim,center)(
403 cis' dis' eis' fis' gis' ais' bis'
404 )
405
406 mudela(fragment,verbatim,center)(
407 ces' des' es' fes' ges' as' bes'
408 )
409
410 mudela(fragment,verbatim,center)(
411 cisis' eisis' gisis' aisis' beses'
412 )
413
414 mudela(fragment,verbatim,center)(
415 ceses' eses' geses' ases' beses'
416 )
417
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
420 context.   
421 A reminder accidental can be forced by
422 using the  optional exclamation mark `code(!)'
423 on the pitch.
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'!  
428 )
429
430
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
434 )
435 mudela(fragment,verbatim,center)(
436 r1 r2 r4 r8 r16 r32
437 )
438
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
441 assumed.  
442 The duration can be followed by a dot code(.) to obtain dotted note
443 lengths.  
444 mudela(fragment,verbatim,center)(
445 a'4. b'4.
446 )
447
448 Extra long notes can be obtained using the code(\breve) and
449 code(longa) durations:
450 mudela(fragment,verbatim,center)(
451 c'\breve gis'\longa
452 )
453
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
466 this situation 
467 mudela(fragment,verbatim,center)( 
468 \context Voice { \times 2/3 {c'4 d' e'}} 
469 )
470
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)(
479 r1 r1*3 R1*3
480 )
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
483 displayed.  
484 mudela(fragment,verbatim,center)(
485 \property Score.skipBars=1
486 r1 r1*3 R1*3
487 )
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)(
493 R1*3 c'1 d'
494 )
495
496 subsect(Note Spanners: Beams, Slurs and Ties)
497
498 A beam is specified by surrounding the beamed notes with brackets
499 code([) and code(]).  
500 mudela(fragment,verbatim,center)(
501 [a'8 a'] [a'16 a' a' a'] 
502 )
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'] }
507 )
508
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
514 both sides:
515 mudela(fragment,verbatim,center)(
516 f'()g'()a' [a'8 b'(] a'4 g' )f'
517 )
518
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.)
528
529 mudela(fragment,verbatim,center)(
530 e' ~ e' <c' e' g'> ~ <c' e' g'>
531 )
532
533 It is possible to create beams and slurs that cross staffs by switching the
534 context:
535 mudela(fragment,verbatim,center)(
536 <
537 \context Staff=one \notes\relative c'{
538   \stemup
539   [c8 c \translator Staff=two \stemup c c]
540   \translator Staff=one
541   d4( \translator Staff=two )a4
542   }
543 \context Staff=two \notes{ \clef bass;}
544 >
545 )
546
547
548 subsect(Note Ornaments)
549
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.
559
560 mudela()(
561 \score{
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 
566           c''-\trill
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 }
574   >
575   \paper{ linewidth = 5.875\in;          
576           indent = 0.0;        }
577  }
578 )
579
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.
585
586 To save typing,  a few common symbols  can  be  abbreviated  with
587 single characters:
588 mudela()(
589 \score{ \notes {
590         \property Voice.textStyle = typewriter
591         c''4-._"c-." s4
592         c''4--_"c-{}-"  s4
593         c''4-+_"c-+" s4
594         c''4-|_"c-|" s4
595         c''4->_"c->"  s4
596         c''4-^_"c-\\^{ }"  s4 }
597         \paper { linewidth = 12.\cm; }})
598
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).
606
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
615 spacer notes. 
616 mudela(fragment,verbatim,center)(
617 c'' \< \! c''   d'' \decr e'' \rced 
618 < f''1 {s4 \< \! s4 \> \! s2 } >)
619
620
621 COMMENT(Broken!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
622
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. 
632
633 [TREMOLO BEAMS TEMPORARILY OUT OF ORDER]
634
635 COMMENT(mudela (fragment,verbatim,center)(
636 c'2:8 c':32 [:16 e'1 g'] [:8 e'4 f']
637 ))
638
639 COMMENT(
640 Is the last paragraph correct?  Is it called "tremolo"?  Why is
641 "abbreviation" used?  (What is the unabreviated form?)
642
643 COMMENT(
644 mudela (fragment,verbatim,center)(
645 c'4:32 [:16 c'8 d'8]
646 ))
647
648 )
649
650
651 sect(Other Ways to Enter Pitches)
652
653 subsect(Pitch Names in Other Languages)
654 label(notelang)
655
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
660 they define are:
661
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)
670
671 subsect(Relative Pitch Specification)
672 label(relative)
673
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
676 marks is to use
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.  
683
684 mudela(fragment,verbatim,center)(
685 \relative c'' { c d b c, d b c' d 
686                 b c,, d b }
687 )
688
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.  
692
693 mudela(fragment,verbatim,center)(
694 \relative c' { <c e g> 
695     <c' e g> <c, e' g> }
696
697
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.   
707
708
709 subsect(Tranposition of Pitches)
710 label(transpose)
711
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 
720 with odd results.
721 mudela(fragment,verbatim,center)(
722 \relative c' { \key e; 
723   e fis gis a b cis dis e }
724 )
725 mudela(fragment,verbatim,center)(
726 \transpose des' \relative c' { \key e; 
727    e fis gis a b cis dis e }
728 )
729 mudela(fragment,verbatim,center)(
730 \transpose cis' \relative c' { \key e; 
731     e fis gis a b cis dis e }
732 )
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.  
739
740 sect(Chords)
741
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
746 code(@) characters. 
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
759 interval.  
760 mudela(fragment,verbatim,center)(
761 \transpose c''{ 
762 \chords{
763   c1 c-3- c-7 c-8 c-9  
764   c-9-5+7+ c-3-5- c-4.6.8
765 }}) 
766 The second type of modifier that may appear after the code(-) is 
767 a named modifier. 
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
772 5th with a 4th.  
773 mudela(fragment,verbatim,center)(
774 \transpose c''{ 
775 \chords{
776   c1-m c-min c-maj c-aug c-dim c-sus
777 }}) 
778
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)(
782 \transpose c''{ 
783 \chords{
784   c1^3 c-7^5.3 c-8^7
785 }}) 
786
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)(
792 \transpose c'''{ 
793  @c1@ @c/e@ @c/g@ @c-7/e@
794 }) 
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.  
798
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)(
803 <
804   \context ChordNames { \chords{ a b c} \notes{ < d f g >  < e g b > } }
805   \context Staff \notes{ a b c' d' e' }
806 >
807 )
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
810 chord inversions:
811 mudela(fragment,verbatim,center)(
812 <
813   \context ChordNames { 
814      \notes{ < e' g' c'' > } }
815   \context Staff \notes{ c' } 
816 >)
817 If you want inversions to be recognized, you must set the property
818 code(Score.chordInversion): 
819 mudela(fragment,verbatim,center)(
820 <
821   \property Score.chordInversion = 1
822   \context ChordNames { 
823        \notes{ < e' g' c'' > } }
824   \context Staff \notes{ c' } 
825 >)
826
827
828
829 sect(Lyrics)
830
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.
836
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).
840
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  }
850   >
851 })
852
853 COMMENT(
854 URG
855                         Fr\`e-4 re Ja- que
856                         Fr\`e- re Ja- que
857 Why does this warrant an URG?
858 )
859
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.  
864 This will create
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 __ }
873 > })
874      
875
876
877 sect(Time)  
878
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 
883 using angle
884 brackets, the duration is the maximum of the durations of the
885 elements.  
886
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.
895
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.
899
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. 
907
908
909 COMMENT(
910 sect(Composition: forming bigger structures)
911 label(sec:grammar)
912
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.
916
917 latexcommand(\smallskip)
918
919 table(2)(lll)(
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)))
926         row(cell()cell(;))
927         row(cell(em(MusicList))cell(: em(empty)))
928         row(cell()cell(code(|)  em(MusicList)  em(Music)))
929         row(cell()cell(;))
930 )
931
932 latexcommand(\smallskip)
933
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.
938
939 You can combine music in three ways:
940 itemize(
941 it()If you enclose a sequence of music-elements in braces ( code({)
942     and code(}) ), then you form another kind of music called
943 sequential music
944     with those pieces.
945   The duration of sequential composition is the sum of the durations of its elements
946   verb(
947       { c c g g a a g2 }      % twinkle twinkle
948       { { c c g g} { a a g2 } }
949   )
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:
954     verb(
955         <a4 {cis8 cis8} e'4>      % a-major chord
956     )
957 it()You can form music by transposing music:
958     verb(
959     \transpose  
960         d       % from c to the d that's almost one octave down
961                 { e4 f4 }       % the horizontal music
962 )
963 it()verb(\context)
964 it()verb(\property)
965 it()verb(\translator)
966 it()verb(\relative)
967 )
968
969 Of course you can also combine these three mechanisms.
970 verb(
971 { c <c e> <c e g> <c e g \transpose d' dis > }  % 4 increasing chords
972 )
973
974 END OF COMMENT  )
975
976
977 sect(Repeats)
978
979
980 OUTDATED. FIXME
981
982 In order to specify repeats, use the code(\repeat) keyword.  By
983 default, repeats are printed with repeat symbols.  
984 mudela(fragment,verbatim,center)(
985 c'1
986 \repeat 2 { c'4 d' e' f' }
987 \repeat 2 { f' e' d' c' })
988 In order to specify alternate endings, use the code(\alternative)
989 keyword.  
990 mudela(fragment,verbatim,center)(
991 c'1
992 \repeat 2 {c'4 d' e' f'} 
993 \alternative { {d'2 d'} {f' f} })
994 When the repeats involve partial measures, it will be necessary to use
995 code(\partial) keywords in a somewhat unexpected way 
996 to indicate some measure lengths.
997 mudela(fragment,verbatim)(
998 \context Staff { \relative c'{
999   \repeat 2 { \partial 4; e | c2 d2 | e2 f2 | }
1000   \alternative { { g4 g g } {\partial 1; a a a a | b1 } }
1001 }})
1002 Repeats can be unfolded by setting the property Staff.unfoldRepeats.
1003 Note also that if your music begins with code(\repeat), you must place
1004 it in an explicit code(Staff) context or you will get bizarre results. 
1005
1006 If you don't give enough alternatives for all of the repeats, then the
1007 first alternative is assumed to be repeated enough to equal to
1008 specified number of repeats.  
1009 mudela(fragment,verbatim)(
1010 \context Staff { \relative c'{
1011   \repeat 3 { \partial 4; e | c2 d2 | e2 f2 | }
1012   \alternative { { g4 g g } {\partial 1; e4 e e } 
1013                  {\partial 1; a a a a | b1 } }
1014 }})
1015
1016
1017 sect(Keywords)
1018
1019 Keywords sometimes appear alone, but usually they require arguments.
1020 A keyword may have a single argument, a sequence of arguments in
1021 braces, or a sequence of arguments separated by spaces and terminated
1022 by a semicolon.  The precise syntax of each keyword is shown below.
1023 Keywords must appear in the right context.  If you use a keyword in
1024 the wrong place, even if the usage is syntactically correct, you will
1025 get the message ``parse error'' from LilyPond.
1026
1027
1028 description(
1029
1030 dit(code(\absdynamic) code({) var(code) code(})) Internal keyword for
1031 printing dynamic marks such as $f$ under music.  The parameter
1032 var(code) is unsigned and specifies the dynamic mark to print.
1033 Normally you should use the more user friendly abbreviations defined
1034 in the init file file(dynamic.ly).
1035
1036 FIXME: Changed to code(\textscript) var(text) var(style).  Defines
1037 a text-request.
1038
1039 dit(code(\accepts) var(string)code(;)) This keyword can appear only within a
1040 code(\translator) block.  It specifies what contexts are allowed with the
1041 context that is being defined.  See Section ref(translators).  
1042
1043 dit(code(\alternative) code({) var(music1) var(music2) ... code(}))
1044 Specifies alternative endings.  Must come after a code(\repeat) keyword.  
1045
1046 dit(code(\bar) var(bartype)code(;)) Prints a special bar symbol, or at
1047 measure boundaries, replaces the regular bar symbol with a special
1048 symbol.  The argument var(bartype) is a string which specifies the
1049 kind of bar to print.  Options are code(":|"), code("|:"),
1050 code(":|:"), code("||"), code("|."), code(".|"), or code(".|.").
1051 These produce respectively a right repeat, a left repeat, a double
1052 repeat, a double bar, a start bar, an end bar, or a thick double bar.
1053 If var(bartype) is set to code("empty") then nothing is printed, but a
1054 line break is allowed at that spot.  Note that the printing of special bars
1055 has no effect on the MIDI output.
1056
1057 dit(code(\cadenza) var(togglevalue)code(;)) Toggles the automatic generation
1058 of bar lines.  If var(togglevalue) is 0 then bar line generation is
1059 turne off.   If var(togglevalue) is  1  then a bar is  immediately
1060 printed and bar generation is turned  on.
1061
1062 dit(code(\clef) var(clefname)code(;)) Allowed only in music.  
1063 Sets the current clef.  The argument is
1064 a string which specifies the name of the clef.  Several clef names are
1065 supported.  If code(_8) or code(^8) is added to the end of a clef
1066 name then the clef lowered or raised an octave will be generated.  
1067 Here are the supported clef names with middle C shown in each clef:
1068 mudela(center)(
1069 \score{
1070   \notes{ \cadenza 1;
1071    %\property Voice.textStyle = typewriter
1072    \clef subbass; c'4-"\kern-10mm subbass" 
1073            \clef bass;    c'4^"\kern -8mm bass"
1074            \clef baritone; c'4_"\kern -10mm baritone"
1075            \clef varbaritone; c'4^"\kern -10mm varbaritone"
1076            \clef tenor;     c'4_"\kern -10mm tenor"
1077            \clef "G_8";   c'4^"\kern -6mm G\_8" 
1078    }  
1079    \paper{ linewidth= 4.5 \in; }
1080 }
1081 )
1082 mudela(center)(
1083 \score{
1084   \notes{\cadenza 1; \clef alto;    c'4_"\kern -10mm alto"
1085       %     \clef scarlatti;    c'4_"\kern -4mm scarlatti"
1086            \clef mezzosoprano; c'4^"\kern -10mm mezzosoprano"
1087            \clef soprano;  c'4_"\kern -10mm soprano"
1088            \clef treble;  c'4^"\kern -6mm treble"
1089            \clef french;  c'4_"\kern -10mm french" }  
1090   \paper{ linewidth= 4.5 \in; }
1091 }
1092 )
1093 The treble  clef  can also  be obtained using  the  names code(G) or
1094 code(violin).  The bass clef is also available by code(\clef  F). 
1095
1096 dit(code(\chord) var(chordlist)) Parse var(chordlist) in chords mode.
1097
1098 dit(code(\chordmodifiers) var(modifierlist)) Specify the text chord
1099 modifiers that may appear after chord names.  These are specified in
1100 the file file(chord-modifiers.ly).  
1101
1102 dit(code(\cm)) Specify a dimension in centimeters. 
1103
1104 dit(code(\consists) var(string)code(;)) This keyword can appear only within a
1105 code(\translator) block.  It specifies that an engraver or performer named
1106 var(string) should be added to the translator.  See Section
1107 ref(translators).
1108
1109 dit(code(\duration) code({) var(length) var(dotcount) code(})) Specify note
1110 duration.  The parameter var(length) is the negative logarithm (base
1111 2) of duration: 1 is a half note, 2 is a quarter note, 3 is an eighth
1112 note, etc.  The number of dots  after  the  note is given by
1113 var(dotcount). 
1114
1115 dit(code(\font) var(string)) Internal keyword.  Used within
1116 code(\paper) to specify the font.
1117
1118 dit(code(\grouping) var(durationseq)code(;))  Sets  the  metric structure of
1119 the measure.  Each argument specifies the duration of one metric unit.
1120 For example, code(\duration 16*5;) specifies a grouping of five beats
1121 together in 5/16 time.  The default grouping is to have as many groups
1122 of 3 as possible followed by groups of two.  
1123
1124 dit(code(\header) code({) var(key1) = var(val1); var(key2) = var(val2); ... code(}))
1125 Specifies information about the music.  A header should appear at the
1126 top of the file describing the file's contents.  If a file has
1127 multiple code(\score) blocks, then a header should appear in
1128 each score block describing its contents.  Tools like code(ly2dvi) can
1129 use this information for generating titles.   Key values that are used
1130 by ly2dvi are: title, subtitle, composer, opus, poet, instrument,
1131 metre, arranger, piece and tagline.  
1132
1133 dit(code(\in)) Specify a dimension in inches.  
1134
1135 dit(code(\include) var(file)) Include the specified file.  The
1136 argument var(file) is a string.  The full filename including the
1137 file(.ly) extension must be given, and the filename must be quoted.
1138 (An unquoted string will not work here.)
1139
1140 dit(code(\key) var(pitch) var(type) code(;)) Change the key signature. 
1141 var(type) should be code(\major) or code(\minor) to get
1142 var(pitch)-major or var(pitch)-minor, respectively. The second
1143 argument is optional, the default is major keys. 
1144 The var(\context) argument can also be given as an integer, which tells
1145 the number of semitones that should be added to the pitch given in the
1146 subsequent code(\key) commands to get the corresponding major key,
1147 e.g. code(\minor) is defined as 3.  The standard mode names 
1148 code(\ionian), code(\locrian), code(\aeolian), code(\mixolydian),
1149 code(\lydian), code(\phrygian), and code(\dorian) are also defined. 
1150
1151 dit(code(\keysignature) var(pitchseq)code(;))
1152 Specify an arbitrary key signature.  The pitches from var(pitch) will
1153 be printed in the key signature in the order that they appear on the list.
1154
1155 dit(code(\lyrics) var(lyriclist)) Parse var(lyriclist) in lyrics mode.
1156
1157 dit(code(\maininput)) Internal command.  This command is used for creating init
1158 files like file(init.fly) that read the user file into the middle of another
1159 file.  It is illegal to use this command in a user file.  
1160         
1161 dit(code(\mark) var(unsigned)code(;) or code(\mark) var(string)code(;)) 
1162 Allowed in music only.  Prints a mark over or under (depending on the
1163 code(markDirection) property) the staff.
1164 You must add code(Mark_engraver) to the Score context.
1165
1166 dit(code(\midi) var(statementlist)) Appears in a score block to
1167 indicate that musical output should be produced and to set output
1168 parameters.  Can also appear at the top level to set default output
1169 parameters.  See code(\tempo).
1170
1171 dit(code(\mm)) Specify a dimension in millimeters. 
1172
1173 dit(code(\musicalpitch) code({) var(octave) var(note) var(shift) code(})) 
1174 Specify note pitch.  The octave is specified by an integer,
1175 zero for the octave containing middle C.  The note is a number from 0
1176 to 7, with 0 corresponding to C and 7 corresponding to B.  The shift
1177 is zero for a natural, negative to add flats, or positive to add
1178 sharps.
1179
1180 dit(code(\name) var(context)code(;)) Appears within code(\translator) to
1181 specify the name of the context that the translator handles. See Section
1182 ref(translators).   
1183
1184 dit(code(\notenames) var(assignmentlist)) Define new note names.  This
1185 keyword can appear only at the top level. 
1186 The argument is a list of definitions of  the form
1187 var(name) = var(pitch),  where var(pitch) is specified with the
1188 code(\musicalpitch) keyword.  
1189
1190 dit(code(\notes) var(music)) Enter note mode and process the
1191 specified music. 
1192
1193 dit(code(\paper) var(statmentlist)) 
1194 Appears in a score block to indicate that the music should be printed
1195 or to set output parameters.  Can also appear at the top level to set
1196 default output parameters for all of the score blocks.  
1197 The var(statmentlist) contains statements that change features of the
1198 output.  See Section ref(paper).  
1199
1200 dit(code(\partial) var(duration)code(;)) Specify that the first measure of
1201 the music lasts only for the specified duration.  Use also to specify
1202 the duration of the first measure of the argument to
1203 code(\alternative).  
1204
1205 dit(code(\penalty) code(=) var(int)code(;)) Allowed only in music.
1206 Discourage or encourage line breaks.  See identifiers code(\break) and
1207 code(\nobreak) in Section ref(ident). 
1208
1209 dit(code(\property) var(contextname)code(.)var(propname) code(=) var(value))
1210 Sets the var(propname) property of the context var(contextname) to the
1211 specified var(value).  All three arguments are strings.  Depending on
1212 the context it may be necessary to quote the strings or to leave space
1213 on both sides of the dot. 
1214
1215 dit(code(\pt)) Specify a dimension in points. 
1216
1217 dit(code(\relative) var(pitch) var(music)) Processes the specified
1218 var(music) in relative pitch
1219 mode.  In this mode, the octave of a pitch is chosen so that the
1220 pitch is closest to the preceeding pitch.  
1221 The argument var(pitch) is
1222 the starting pitch for this comparision.  In the case of chords, the
1223 first note of a chord is used as the base for the first pitches in the next
1224 chord.  See Section ref(relative).
1225
1226 dit(code(\remove) var(string)code(;)) Can appear only in a
1227 code(\translator) block.  Specifies that a performer or engraver named
1228 var(string) should be removed.  See Section ref(translators).  
1229
1230 dit(code(\repeat) var(count) code({) var(music) code(}))
1231 Repeats the specified
1232 music var(count) times.  Alternative endings can be specified by adding a
1233 code(\alternative) keyword after the code(\repeat).  
1234
1235 dit(code(\scm) var(scheme)code(;)) Embeds specified Scheme code.  
1236
1237 dit(code(\scmfile) var(filename)code(;)) Reads Scheme code from the specified
1238 file.  
1239
1240 dit(code(\score) var(statementlist)) Create a Score context.  This
1241 is the top level notation context.  
1242 COMMENT(this still needs work)
1243
1244 dit(code(\script) var(alias)) Prints a symbol above or below a note.
1245 The argument is a string which points into the script-alias table
1246 defined in file(script.scm).  The scheme definitions specify whether
1247 the symbol follows notes into the staff, dependence of symbol
1248 placement on staff direction, and a priority for placing several
1249 symbols over one note.  Usually the code(\script) keyword is not used
1250 directly.  Various helpful identifier definitions appear in
1251 file(script.ly).
1252
1253 dit(code(\shape) code(=) var(indent1) var(width1) var(indent2)
1254 var(width2) ... code(;)) Allowed only within code(\paper).  Each pair
1255 of var(indent) and var(width) values is a dimension specifying how far
1256 to indent and how wide to make the line.  The indentation and width of
1257 successive lines are specified by the successive pairs of dimensions.
1258 The last pair of dimensions will define the characeristics of all
1259 lines beyond those explicitly specified.
1260
1261 COMMENT(First pair of dimensions seems to be skipped.  At least it is
1262 in the example file denneboom.ly.)
1263
1264 dit(code(\skip) var(duration)code(;)) Skips the amount of time specified by
1265 var(duration).  A gap will be left for the skipped time with no notes
1266 printed.  It works in Note Mode or Lyrics Mode (but generates a
1267 mysterious error in lyrics).
1268
1269 OBSOLETE
1270
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).
1277
1278 FIXME:
1279
1280 code(\spanrequest) var(startstop) var(type).  Define a
1281 spanning request var(startstop) is either -1 (start) or 1
1282 (stop). var(type) is a string that describes what should be started.
1283 Supported types are "crescendo", "decrescendo", "beam", "slur".
1284
1285 dit(code(\tempo) var(duration) = var(perminute)code(;)) Used within
1286 code(\midi) or within music to specify the tempo.  For example, 
1287 `code(\midi { \tempo 4 = 76;})' requests output with 76 quarter notes
1288 per minute.  Note that if the music contains several tempo commands,
1289 only the last one is used to set the tempo for the entire MIDI output. 
1290 COMMENT(Is this true?)
1291
1292 dit(code(\time) var(numerator)code(/)var(denominator)code(;)) Change the time
1293 signature.  The default time signature is 4/4.  
1294
1295 dit(code(\times) var(numerator)code(/)var(denominator) var(music))
1296 Multiply the duration of var(music) by the specified fraction.
1297
1298 dit(code(\translator) var(statements) or code(\translator)
1299 var(context) = var(name)) The first variant appears only within
1300 code(\paper) and specifies a translator for
1301 converting music to notation.  The translator is specified with a
1302 single code(\context) statement and a series of code(\accepts), and
1303 code(\consists) statements.  See Section ref(translators). 
1304 The second variant appears in 
1305 music.  It specifies that the current the contexts
1306 contained within the specified context should be shifted to the
1307 context with the specified name.  
1308
1309 COMMENT( \translator seems like a strange name for the second
1310 operation, and is the overloading desireable? )
1311
1312 dit(code(\transpose) var(pitch) var(music)) Transposes the specified
1313 music.  Middle C is tranposed to var(pitch).  This is allowed in music only,
1314 and if it appears inside code(\relative), then any notes specified for
1315 transposition should be specified inside another code(\relative).  See Section
1316 ref(transpose).  
1317
1318 dit(code(\context) var(contexttype) [code(=) var(contextname)]
1319 var(music) or code(\context) var(translatortype)code(;)) The first
1320 variant is used only within music to create an instance of a
1321 context.  The new context can optionally be given a name.  The
1322 specified var(music) is processed in the new context. The second
1323 variant appears within a code(\translator) block and specifies the
1324 type of translator being created.
1325
1326 dit(code(\version) var(string)) Specify the version of Mudela that a
1327 file was written for.  The argument is the version number, for example
1328 code("1.0.1").  Note that the Mudela version is different from the
1329 LilyPond version.
1330
1331 )  
1332
1333
1334 sect(Notation Contexts)
1335
1336 Notation contexts provide information that appears in printed music
1337 but not in the music itself.  A new musical context is created using
1338 the code(\context) keyword: `code(\context) var(contexttype) [code(=)
1339 var(contextname)] var(music)'.  The following context types are
1340 allowed.
1341
1342 description(
1343
1344 dit(code(LyricVoice)) Corresponds to a voice with lyrics.  Handles the printing
1345 of a single line of lyrics.  
1346
1347 dit(code(Voice)) Corresponds to a voice on a staff.
1348   This context handles the conversion of noteheads,
1349   dynamic signs, stems, beams, super- and subscripts, slurs, ties and rests.
1350
1351 dit(code(ChordNamesVoice)) A voice with chord names.  Handles printing
1352 of a line of chord names.  
1353
1354 dit(code(ChordNames))  Typesets chord names.  Can contain
1355 code(ChordNamesVoice) contexts.  
1356
1357 dit(code(Lyrics)) Typesets lyrics.  It can contain code(LyricVoice) contexts.
1358
1359 dit(code(Staff)) Handles clefs, bar lines, keys,
1360   accidentals.  It can contain code(Voice) contexts.
1361
1362 dit(code(RhythmicStaff)) A context like code(Staff) but for printing
1363 rhythms.  Pitches are ignored; the notes are printed on one line.  
1364 It can contain code(Voice) contexts. 
1365
1366 dit(code(GrandStaff)) Contains code(Staff) or code(RhythmicStaff)
1367 contexts.  It adds a brace on the left side grouping the staffs
1368 together. The bar lines of the contained staffs are connected vertically.
1369 It can contain code(Staff) contexts.
1370
1371 dit(code(PianoStaff)) Just like code(GrandStaff) but with
1372 code(minVerticalAlign) set equal to code(maxVerticalAlign) so that
1373 interstaff beaming and slurring can be used.  
1374
1375 dit(code(StaffGroup)) Contains code(Staff) or code(RhythmicStaff)
1376 contexsts.  Adds a bracket on the left side, grouping the staffs
1377 together.  The bar lines of the contained staffs are connected vertically.
1378 It can contain code(Staff), code(RhythmicStaff), code(GrandStaff) or code(Lyrics) contexts.  
1379
1380 dit(code(ChoirStaff)) Identical to code(StaffGroup) except that the
1381 contained staffs are not connected vertically.  
1382
1383 dit(code(Score)) This is the top level notation context.  It is specified with
1384 the code(\score) keyword rather than the code(\context) command.  No
1385 other context can contain a code(Score) context.  This context handles
1386 the administration of time signatures.  It also makes sure that items
1387 such as clefs, time signatures, and key-signatures are aligned across
1388 staffs.  It can contain code(Lyrics), code(Staff),
1389 code(RhythmicStaff), code(GrandStaff), code(StaffGroup), and
1390 code(ChoirStaff) contexts.
1391
1392 )
1393
1394 The various contexts have properties associated with them.  These
1395 properties can be changed using the code(\property) command:
1396 `code(\property) var(context)code(.)var(propname) code(=) var(value)'.
1397 Properties can also be set within the code(\translator) block
1398 corresponding to the appropriate context.  In this case, they are
1399 assigned by `var(propname) code(=) var(value)'.  The settings made with
1400 code(\property) are processed after settings made in the code(\translator)
1401 block, so the code(\property) settings will override code(\translator)
1402 settings.  
1403
1404 The code(\property) keyword will create any property you specify.
1405 There is no guarantee that a property will actually be used.  If you
1406 spell a property name wrong, there will be no error message.  In order to find
1407 out what properties are used, you must search the source code 
1408 for code(get_property).  
1409 Properties that are set in one context are inherited by all of the
1410 contained contexts.  This means that a property valid for the Voice
1411 context can be set in the Score context (for example) and thus take
1412 effect in all Voice contexts.  
1413
1414 subsubsubsect(Lyrics properties)
1415
1416 description(
1417
1418 dit(code(textStyle)) Set the font for lyrics.  The available font
1419 choices are code(roman), code(italic), code(bold), code(large),
1420 code(Large), code(typewriter), and code(finger).  The code(finger)
1421 font can only display numbers.  Note also that you must be careful
1422 when using code(\property) in Lyrics mode.  Because of the way strings
1423 are parsed, either put quotes around the arguments to code(\property)
1424 or be sure to leave a space on both sides of the dot.
1425
1426 GONE dit(code(textalignment)) Controls alignment of lyrics.  Set to code(\left)
1427 to align the left end of the lyric with the note; set to code(\right) to
1428 align the right end of the lyric with the note.  Set to code(\center) to
1429 align the center of the lyric with the note.  
1430
1431 )
1432
1433 subsubsubsect(Voice properties)
1434
1435 description(  
1436
1437 dit(code(textEmptyDimension)) If set to 1 then text placed above or
1438 below the staff is assumed to have zero width.  
1439
1440 dit(code(noteheadStyle)) Selects type of note head.  Choices are
1441 code(cross), code(diamond), code(harmonic), code(transparent), and
1442 code("").  They are shown in that order below.  
1443 mudela(center)(
1444 \score{
1445   \notes{ 
1446      \property Staff.barNonAuto = 1
1447      \property Voice.noteHeadStyle = cross 
1448      a'
1449      \property Voice.noteHeadStyle = diamond
1450      a'
1451      \property Voice.noteHeadStyle = harmonic
1452      a'
1453      \property Voice.noteHeadStyle = transparent
1454      a' 
1455      \property Voice.noteHeadStyle = ""
1456      a'
1457   }
1458  \paper{ linewidth = -1.;}
1459 }
1460 )
1461
1462
1463 dit(code(restStyle)) Change the layout of rests shorter than quarter notes. 
1464 Currently, the standard layout code(restStyle="") and mensural notation
1465 code(restStyle="mensural") are available.
1466
1467 dit(code("midiInstrument")) Sets the instrument for MIDI output.  This
1468 property name must be quoted because of the embedded underscore.  If
1469 this property is not set then LilyPond will use the code(instrument)
1470 property.  This must be set to one of the strings on the list of MIDI
1471 instruments that appears in Section ref(midilist).  If you use a
1472 string which is not listed, LilyPond will silently substitute piano. 
1473
1474 dit(code(transposing)) Tranpose the MIDI output.  Set this property to
1475 the number of half-steps to transpose by.
1476
1477 dit(code(oldTieBehavior)) Set to 1 in order to get old tie behavior
1478 where ties would connect unequal pitches.  
1479
1480 dit(code(ydirection)) Determines the direction of stems, subscripts,
1481 beams, slurs, and ties.  Set to code(\down) to force them down,
1482 code(\up) to force them up, or code(\free) to let LilyPond decide.
1483 This can be used to distinguish between voices on the same staff.  The
1484 code(\stemdown), code(\stemup), and code(\stemboth) identifiers set
1485 this property.  See also the identifiers code(\voiceone),
1486 code(\voicetwo), code(\voicethree) and code(\voicefour).
1487
1488 dit(code(slurydirection)) Set to code(\free) for free choice of slur
1489 direction, set to code(\up) to force slurs up, set to code(\down) to
1490 force slurs down.  The shorthands code(\slurup), code(\slurdown), and
1491 code(\slurboth) are available.
1492
1493 dit(code(tieydirection)) Set to code(\free) for free choice of tie
1494 direction, set to code(\up) to force ties up, set to code(\down) to
1495 force ties down.  
1496
1497 dit(code(slurdash)) Set to 0 for normal slurs, 1 for dotted slurs, and
1498 a larger value for dashed slurs.  Identifiers code(\slurnormal) and
1499 code(\slurdotted) are predefined to set the first two settings.
1500
1501 dit(code(hshift)) Set to 1 to enable LilyPond to shift notes
1502 horizontally if they collide with other notes.  This is useful when
1503 typesetting many voices on one staff.  The identifier code(\shift) is
1504 defined to enable this.
1505
1506 dit(code(dynamicDir)) Determines location of dynamic marks.  Set to
1507 code(\up) to print marks above the staff; set to code(\down) to print
1508 marks below the staff.
1509
1510 GONE dit(code(textalignment)) Controls alignment of superscripted and
1511 subscripted text.  Set to \left to align the left end of the text with
1512 the note; set to \right to align the right end of the text with the
1513 note.  Set to \center to align the center of the text with the note.
1514
1515 dit(code(textStyle)) Set the text style for superscripts and
1516 subscripts.  See above for list of text styles.
1517
1518 dit(code(textScriptPadding)) Determines the extra space added between
1519 super-/subscripted text and the closest staff line or note.
1520
1521 dit(code(fontSize)) Can be used to select smaller font sizes for
1522 music.  The normal font size is 0, and the two smaller sizes are -1
1523 and -2.
1524
1525 dit(code(abbrev)) Set length for tremolo to be used if no length is
1526 explicitly specified.
1527
1528 dit(code(tupletDirection)) Determines the direction of triplets and 
1529 other tuplets.  Set to code(\down) to force them below the staff,
1530 code(\up) to force them above, or code(\free) to let LilyPond decide.
1531
1532 dit(code(tupletVisibility)) Determines whether tuplets of notes are
1533 labelled.  Setting to 0 shows nothing; setting to 1 shows a number;
1534 setting to 2 shows a number and a bracket if there is no beam; setting
1535 to 3 shows a number, and if there is no beam it adds a bracket;
1536 setting to 4 shows both a number and a bracket unconditionally. The 
1537 code(pletoff) and code(pleton) identifiers set the property to 0 and 3, 
1538 respectively. 
1539
1540 dit(code(markScriptPadding)) Determines the extra space added between
1541 the mark and the closest staff line or note.
1542
1543 dit(code(markDirection)) Determines if marks should be printed above
1544 or below the staff. Set to code(\up) to print marks above the staff;
1545 set to code(\down) to print marks below the staff.
1546
1547 dit(code(articulationScriptPadding)) Determines the extra space added 
1548 between articulation marks, such as staccato, tenuto, trill, up/down 
1549 bow or fermata, and the closest staff line or note.
1550 )
1551
1552 subsubsubsect(Staff properties)
1553
1554 description(
1555
1556 dit(code(barAtLineStart)) Set to 1 to produce a bar line after the
1557 clef at the start of each line (but not at the beginning of the
1558 music).  
1559
1560 dit(code(voltaVisibility)) Set to 0 to suppress the printing
1561 of brackets over alternate endings specified by code(\alternative).
1562
1563 dit(code(voltaSpannerDuration)) Set to an integer to control the size
1564 of the brackets printed by code(\alternative).  The integer specifies
1565 the number of whole notes duration to use for the brackets.  It seems
1566 to be rounded to the nearest measure.  This can be used to shrink the
1567 length of brackets in the situation where one alternative is very
1568 large.  It may have odd effects if the specified duration is longer
1569 than the music given in an code(\alternative).  
1570
1571 dit(code(barNonAuto)) If set to 1 then bar lines will not be printed
1572 automatically; they must be explicitly created with code(\bar) keywords.
1573
1574 dit(code(defaultClef)) Determines the default clef.  See code(\clef)
1575 keyword.
1576
1577 dit(code(nuberOfStaffLines)) Sets the number of lines that the staff has.
1578  
1579 dit(code(barAlways)) If set to 1 a bar line is drawn after each note.
1580
1581 dit(code(defaultBarType)) Sets the default type of bar line.  See
1582 code(\bar) keyword.
1583
1584 dit(code(keyoctaviation)) If set to 1, then keys are the same in all
1585 octaves.  If set to 0 then the key signature for different octaves can
1586 be different and is specified independently: code(\keysignature bes
1587 fis').  The default value is 1.  Can be set to zero with
1588 code(\specialkey) or reset to 1 with code(\normalkey).
1589
1590 dit(code(instrument) and code(instr)) If code(Staff_margin_engraver)
1591 is added to the Staff translator, then the code(instrument) property
1592 is used to label the first line of the staff and the code(instr)
1593 property is used to label subsequent lines.  If the
1594 code(midiInstrument) property is not set then code(instrument) is
1595 used to determine the instrument for MIDI output.
1596 COMMENT(This prints the instrument name on top of the staff lines.)
1597
1598 dit(code(createKeyOnClefChange)) Set to a nonempty string if you want key
1599 signatures to be printed when the clef changes.  Set to the empty string (the
1600 default) if you do not want key signatures printed.
1601
1602
1603 dit(code(timeSignatureStyle)) Changes the default two-digit layout
1604    for time signatures. The following values are recognized:
1605    description(
1606       dit(code(C)) 4/4 and 2/2 are typeset as C and struck C,
1607       respectively. All other time signatures are written with two digits.
1608       dit(code(old)) 2/2, 3/2, 3/4, 4/4, 6/4, 9/4, 6/8 and 9/8 are typeset 
1609       with old-style mensuration marks. All other time signatures are 
1610       written with two digits.
1611       dit(code(1)) All time signatures are typeset with a single
1612       digit, e.g. 3/2 is written as 3.
1613       dit(code(C2/2), code(C4/4), code(old2/2), code(old3/2),
1614       code(old3/4), code(old4/4), code(old6/4), code(old9/4), 
1615       code(old6/8) or code(old9/8))Tells Lilypond to use a 
1616       specific symbol as time signature.
1617    )
1618 The different time signature characters are shown below with
1619 their names:
1620 mudela(center)(
1621 \score{
1622   \notes\relative c'' {
1623 \property Voice.textStyle = typewriter
1624 \property Staff.timeSignatureStyle = "C2/2"
1625 \time 2/2; a2^"C2/2" a2 
1626 \property Staff.timeSignatureStyle = "C4/4"
1627 \time 2/2; a2^"C4/4" a2 
1628 \property Staff.timeSignatureStyle = "old2/2"
1629 \time 2/2; a2^"old2/2" a2 
1630 \property Staff.timeSignatureStyle = "old3/2"
1631 \time 2/2; a2^"old3/2" a2 
1632 \property Staff.timeSignatureStyle = "old4/4"
1633 \time 2/2; a2^"old4/4" a2 
1634 \property Staff.timeSignatureStyle = "old6/4"
1635 \time 2/2; a2^"old6/4" a2 
1636 \property Staff.timeSignatureStyle = "old9/4"
1637 \time 2/2; a2^"old9/4" a2 
1638 \property Staff.timeSignatureStyle = "old6/8"
1639 \time 2/2; a2^"old6/8" a2 
1640 \property Staff.timeSignatureStyle = "old9/8"
1641 \time 2/2; a2^"old9/8" a2 
1642 }
1643    \paper{ linewidth= 4.5 \in; }
1644 }
1645 )
1646
1647 dit(code(clefStyle)) Determines how clefs are typeset. When set to
1648 code(transparent), the clefs are not printed at all, when set to
1649 code(fullSizeChanges), clef changes in the middle of a line are
1650 typeset with a full size clef. By default, clef changes are typeset in
1651 smaller size.
1652
1653 )
1654    
1655 subsubsubsect(GrandStaff properties)
1656
1657 description( 
1658
1659 dit(code(maxVerticalAlign)) Set the maximum vertical distance between
1660 staffs.
1661
1662 dit(code(minVerticalAlign)) Set the minimum vertical distance between
1663 staffs.  
1664
1665 )
1666
1667 subsubsubsect(Score properties)
1668
1669 description(
1670
1671 dit(code(skipBars)) Set to 1 to skip the empty bars that are produced
1672 by multimeasure notes and rests.  These bars will not appear on the
1673 printed output.  Set to zero (the default) to expand multimeasure
1674 notes and rests into their full length, printing the appropriate
1675 number of empty bars so that synrchonization with other voices is
1676 preserved.  COMMENT(meaning of "skip" here seems to be different from
1677 the meaning used for the keyword \skip.)
1678
1679 dit(code(beamquantisation)) Set to code(\none) for no quantization.
1680 Set to code(\normal) to quantize position and slope.  Set to
1681 code(\traditional) to avoid wedges.  These three settings are
1682 available via code(\beamposfree), code(\beamposnormal), and
1683 code(\beampostraditional).
1684
1685 dit(code(beamslopedamping)) Set to code(\none) for undamped beams.
1686 Set to code(\normal) for damped beams.  Set to code(\infinity) for
1687 beams with zero slope.  The identifiers code(\beamslopeproportional),
1688 code(\beamslopedamped), and code(\beamslopezero) each set the
1689 corresponding value.
1690
1691 dit(code(chordInversion)) Determines whether LilyPond should look for
1692 chord inversions when translating from notes to chord names.  Set to 1
1693 to find inversions.  The default is 0 which does not look for inversions.
1694
1695 )
1696
1697
1698
1699 sect(Pre-defined Identifiers)
1700 label(ident)
1701
1702 Various identifiers are defined in the initialization files to
1703 provide shorthands for some settings.  
1704
1705 description(
1706 dit(code(\aeolian)) Used as the second argument of the code(\key)
1707 keyword to get an aeolian mode. 
1708 dit(code(\break)) Force a line break in music by using a large
1709 argument for the keyword code(\penalty). 
1710 dit(code(\center)) Used for setting textalignment property.  Is set to 0.
1711 dit(code(\cr)) Start a crescendo.
1712 dit(code(\decr)) Start a decrescendo.
1713 dit(code(\dorian)) Used as the second argument of the code(\key)
1714 keyword to get a dorian mode.
1715 dit(code(\down)) Used for setting direction setting properties.  Is
1716 equal to -1.  
1717 dit(code(\f)) Print forte symbol on the preceeding note.
1718 dit(code(\ff)) Print fortissimo symbol on the preceeding note. 
1719 dit(code(\fff)) Print fortississimo symbol on preceeding note. 
1720 dit(code(\ffff)) Print fortissississimo symbol on preceeding note.
1721 dit(code(\fffff)) Print fffff symbol on preceeding note.
1722 dit(code(\ffffff)) Print ffffff symbol on preceeding note.
1723 dit(code(\fp)) Print fortepiano symbol on preceeding note. 
1724 dit(code(\free)) Used for setting direction setting properties.  Is
1725 equal to 0.  
1726 dit(code(\Gourlay)) Used for setting the paper variable
1727 code(castingalgorithm).  Is equal to 1.0.  
1728 dit(code(\infinity)) Used for setting the Score.beamslopedamping
1729 property.  Is actually equal to 10000.  
1730 dit(code(\ionian)) Used as the second argument of the code(\key)
1731 keyword to get an ionian mode. 
1732 dit(code(\left)) Used for setting textalignment property.  Is equal to -1.
1733 dit(code(\locrian)) Used as the second argument of the code(\key)
1734 keyword to get a locrian mode. 
1735 dit(code(\lydian)) Used as the second argument of the code(\key)
1736 keyword to get a lydian mode. 
1737 dit(code(\major)) Used as the second argument of the code(\key)
1738 keyword to get a major key.
1739 dit(code(\minor)) Used as the second argument of the code(\key)
1740 keyword to get a minor key.
1741 dit(code(\mixolydian)) Used as the second argument of the code(\key)
1742 keyword to get a mixolydian mode.
1743 dit(code(\mf)) Print mezzoforte symbol on preceeding note. 
1744 dit(code(\mp)) Print mezzopiano symbol on preceeding note. 
1745 dit(code(\nobreak)) Prevent a line break in music by using a large
1746 negative argument for the keyword code(\penalty). 
1747 dit(code(\none)) Used for setting Score.beamslopedamping and
1748 Score.beamquantisation properties.  Is equal to 0.
1749 dit(code(\normal)) Used for setting Score.beamslopedamping and
1750 Score.beamquantisation properties.  Is equal to 1.
1751 dit(code(\normalkey)) Select normal key signatures where each octave
1752 has the same key signature.  This sets the Staff.keyoctaviation property.
1753 dit(code(\p)) Print a piano symbol on preceeding note. 
1754 dit(code(\phrygian)) Used as the second argument of the code(\key)
1755 keyword to get a phrygian mode.
1756 dit(code(\pp)) Print pianissimo symbol on preceeding note. 
1757 dit(code(\ppp)) Print pianississimo symbol on preceeding note. 
1758 dit(code(\pppp)) Print pianissississimo symbol on preceeding note.
1759 dit(code(\ppppp)) Print ppppp symbol on preceeding note.
1760 dir(code(\pppppp)) Print pppppp symbol on preceeding note.
1761 dit(code(\rc)) Terminate a crescendo. 
1762 dit(code(\rced)) Terminate a decrescendo
1763 dit(code(\rfz)) Print a rinforzato symbol on preceeding note.
1764 dit(code(\right)) Used for setting textalignment property.  Is set to 1.
1765 dit(code(\sf)) Print a subito-forte symbol on preceeding note. 
1766 dit(code(\sff)) Print a subito-fortissimo symbol on preceeding note.
1767 dit(code(\sfz)) Print a sforzato symbol on preceeding note. 
1768 dit(code(\shiftoff)) Disable horizontal shifting of note heads that collide.  
1769 Sets the Voice.hshift property.
1770 dit(code(\shifton)) Enable note heads that collide with other note heads
1771 to be shifted horiztonally.  Sets the Voice.hshift property.
1772 dit(code(\slurboth)) Allow slurs to be above or below notes.  This
1773 sets the Voice.slurydirection property. 
1774 dit(code(\slurdown)) Force slurs to be below notes. This sets the
1775 Voice.slurydirection property. 
1776 dit(code(\slurup)) Force slurs to be above notes.  This sets the
1777 Voice.slurydirection property.  
1778 dit(code(\sp)) Print a subito-piano symbol on preceeding note.
1779 dit(code(\spp)) Print a subito-forte symbol on preceeding note.
1780 dit(code(\specialkey)) Allow keys signatures do differ in different
1781 octaves.  This sets the Staff.keyoctaviation property.  
1782 dit(code(\stemboth)) Allow stems, beams, and slurs to point either
1783 direction.  This sets the Voice.ydirection property. 
1784 dit(code(\stemdown)) Force stems, beams, and slurs to point down.
1785 This sets the Voice.ydirection property. 
1786 dit(code(\stemup)) Force stems, beams and slurs to point up.  This
1787 sets the Voice.ydirection property. 
1788 dit(code(\traditional)) Used for setting the 
1789 Score.beamquantisation property.  Is equal to 2.  
1790 dit(code(\up)) Used for setting various direction properties.  Is
1791 equal to 1. 
1792 dit(code(\voiceone)) Enter Voice context called code(one) and force stems down.
1793 (See code(\stemdown).)
1794 dit(code(\voicetwo)) Enter Voice context called code(two) and force stems
1795 up. (See code(\stemup).)
1796 dit(code(\voicethree)) Enter Voice context called code(three) and force stems
1797 up.  
1798 dit(code(\voicefour)) Enter Voice context called code(four), force stems down
1799 and turn on horizontal shifting.  (See code(\stemdown) and code(\shifton).)
1800 dit(code(\Wordwrap)) Used for setting the paper variable
1801 code(castingalgorithm).  Equal to 0.0.  
1802 )
1803
1804
1805 sect(Output)
1806 label(output)
1807 label(paper)
1808
1809 The output produced by LilyPond is controlled by the code(\paper) and
1810 code(\midi) keywords.  These keywords appear in the code(\score) block
1811 to indicate that printed or musical output should be produced.  If
1812 neither keyword appears in a code(\score) block, then paper output is
1813 produced but MIDI output is not produced.  
1814
1815 The contents of the code(\paper) and code(\midi) blocks can change the
1816 output in various ways.  These blocks can appear at the top level of a
1817 Mudela file to set default parameters for each type of output.  It is
1818 still necessary to explicitly specify the output type in the
1819 code(\score) blocks if you don't want the default behavior of
1820 producing only paper output.  
1821
1822 The code(\paper) and code(\midi) blocks 
1823 may begin with an optional identifier reference.  No
1824 identifier references are allowed anywhere else in the block.  
1825 The code(\paper) block can contain the code(\shape) keyword; the
1826 code(\midi) block can contain the code(\tempo) keyword.  Both of them
1827 can contain code(\translator) keywords.  The code(\paper) block can
1828 also contain identifier assignments and parameter assignments.  Unlike
1829 at the top level, these assignments must be terminated by a semicolon.
1830
1831
1832 subsect(Paper variables)
1833
1834 Warning: this section is outdated and inaccurate.  
1835
1836 There are a large number of paper variables that are used to control
1837 details of the layout.  Usually you will not want to change these
1838 variables; they are set by default to vaules that depend on the font
1839 size in use.  The only way to find out what variables are supported is
1840 to search the source code for code(get_var).  Two variables that you
1841 may want to change are code(linewidth) and code(indent).
1842
1843 In order to change the font size used for the output, many variables
1844 need to be changed.  Some identifiers and initialization files can
1845 simplify this process.  The default size is 20pt.  In order to select
1846 a different size, you must do two things.  At the top level, do
1847 code(\include "paper)var(SZ)code(.ly") where var(SZ) is the height of
1848 the staff in points.  Values presently allowed are 11, 13, 16, 20, and
1849 26.  This loads some definitions, but does not cause them to take
1850 effect.  In order to actually change the size, you must use one of the
1851 identifiers: code(\paper_eleven), code(\paper_thirteen),
1852 code(\paper_sixteen), code(\paper_twenty) or code(\paper_twentysix)
1853 inside a code(\paper) block.
1854
1855
1856 description(
1857   dit(var(integer)) If an integer appears on the left side of an
1858 assignment then a code(\font) keyword must appear on the right
1859 side.  This defines a music font at a particular size.  See Voice
1860 property code(fontSize).
1861
1862 dit(code(arithmetic_basicspace) and code(arithmetic_multiplier))
1863 The space taken by a note is determined by the formula 
1864 COMMENT(
1865
1866 )verb(arithmetic_multiplier * ( c + log2 (time) ))COMMENT(
1867
1868 ) where code(time) is the amount of time a note occupies.  The value
1869 of code(c) is chosen such that the smallest space within a measure is
1870 arithmetic_basicspace.  The smallest space is the one following the
1871 shortest note in the measure.  Typically arithmetic_basicspace is set
1872 to the width of a quarter note head.
1873
1874 dit(code(barsize)) Specify height of bars.  This value may need to be
1875 adjusted if you change the number of lines in the staff.
1876 dit(code(beam_dir_algorithm)) Specify algorithm for determining
1877 whether beams go up or down.  It is real valued.  If set to 2.0 then
1878 majority selection is used.  If set to 3.0, then mean selection is
1879 used based on the mean center distance.  If set to 4.0 then median
1880 selection is used, based on the median center distance.  
1881 dit(code(castingalgorithm)) 
1882 dit(code(forced_stem_shorten)) Stems that have been forced to go the
1883 unnatural direction are shortened by this amount.  Equal to
1884 dit(code(forced_stem_shorten0))
1885 dit(code(gourlay_energybound))
1886 dit(code(gourlay_maxmeasures)) Maximum number of measures per line
1887 when using Gourlay method.
1888 Decreasing this greatly reduces computation time.  Default value: 10.  
1889 dit(code(indent)) Sets the indentation of the first line of music.  
1890 dit(code(interbeam))
1891 dit(code(interbeam4))
1892 dit(code(interline))  The distance between two staff
1893 lines, calculated from the center of the lines.  
1894 dit(code(linewidth))  Sets the width of the lines.  If it is set to
1895 -1.0, then a single unjustified line is produced.  
1896 dit(code(notewidth)) Width of an average note head.  
1897 dit(code(output)) Specifies an alternate
1898 name for the TeX() output.  A file(.tex) extension will be added to
1899 the string you specify.
1900 dit(code(rulethickness)) Determines thickness of staff lines and bars. 
1901 dit(code(slur_clip_angle))
1902 dit(code(slur_clip_height))
1903 dit(code(slur_clip_ratio))
1904 dit(code(slur_height_limit)) Specifies the maximum height of slurs.
1905 Normally equal to staff_height.
1906 dit(code(slur_ratio)) Specifes the ratio of slur hight to slur width
1907 to aim for.  Default value is 0.3.  
1908 dit(code(slur_rc_factor))
1909 dit(code(slur_slope_damping)) Allows slurs to start and end at
1910 different heights ????  Default value is 0.5.
1911 dit(code(slur_thickness)) Specify slur thickness.  Equal to code(1.4 *
1912 \staffline) by default.  
1913 dit(code(slur_x_gap)) Horizontal space between note and slur.  Set to
1914 code(\interline / 5) by default.  
1915 dit(code(slur_x_minimum))
1916 dit(code(staffheight)) The height of the staff from the center of the
1917 bottom line to the center of the top line.  Equal to to code(4 * \interline).
1918 dit(code(stem_length)) Specify length of stems for notes in the staff
1919 that don't have beams.  
1920 dit(code(stemthickness)) Specifies the thickness of the stem lines.  
1921 dit(code(tie_slope_damping))
1922 dit(code(tie_x_minimum))
1923 )
1924
1925
1926 subsect(MIDI Instrument Names)
1927 label(midilist)
1928
1929 The MIDI instrument name is set by the code(Staff."midiInstrument")
1930 property or, if that property is not set, the code(Staff.instrument)
1931 property.  The instrument name should be chosen from this list.  If
1932 string does not exactly match one from this list then LilyPond uses
1933 the default piano.
1934
1935 COMMENT( acordina = accordion, tango accordian = concertina
1936          distortion guitar = distorted guitar
1937          orchestral strings = harp 
1938          pan flute = wood flute? )
1939
1940 verb("acoustic grand"               "contrabass"             "lead 7 (fifths)"
1941 "bright acoustic"              "tremolo strings"        "lead 8 (bass+lead)"
1942 "electric grand"               "pizzicato strings"      "pad 1 (new age)"
1943 "honky-tonk"                   "orchestral strings"     "pad 2 (warm)"
1944 "electric piano 1"             "timpani"                "pad 3 (polysynth)"
1945 "electric piano 2"             "string ensemble 1"      "pad 4 (choir)"
1946 "harpsichord"                  "string ensemble 2"      "pad 5 (bowed)"
1947 "clav"                         "synthstrings 1"         "pad 6 (metallic)"
1948 "celesta"                      "synthstrings 2"         "pad 7 (halo)"
1949 "glockenspiel"                 "choir aahs"             "pad 8 (sweep)"
1950 "music box"                    "voice oohs"             "fx 1 (rain)"
1951 "vibraphone"                   "synth voice"            "fx 2 (soundtrack)"
1952 "marimba"                      "orchestra hit"          "fx 3 (crystal)"
1953 "xylophone"                    "trumpet"                "fx 4 (atmosphere)"
1954 "tubular bells"                "trombone"               "fx 5 (brightness)"
1955 "dulcimer"                     "tuba"                   "fx 6 (goblins)"
1956 "drawbar organ"                "muted trumpet"          "fx 7 (echoes)"
1957 "percussive organ"             "french horn"            "fx 8 (sci-fi)"
1958 "rock organ"                   "brass section"          "sitar"
1959 "church organ"                 "synthbrass 1"           "banjo"
1960 "reed organ"                   "synthbrass 2"           "shamisen"
1961 "accordion"                    "soprano sax"            "koto"
1962 "harmonica"                    "alto sax"               "kalimba"
1963 "concertina"                   "tenor sax"              "bagpipe"
1964 "acoustic guitar (nylon)"      "baritone sax"           "fiddle"
1965 "acoustic guitar (steel)"      "oboe"                   "shanai"
1966 "electric guitar (jazz)"       "english horn"           "tinkle bell"
1967 "electric guitar (clean)"      "bassoon"                "agogo"
1968 "electric guitar (muted)"      "clarinet"               "steel drums"
1969 "overdriven guitar"            "piccolo"                "woodblock"
1970 "distorted guitar"             "flute"                  "taiko drum"
1971 "guitar harmonics"             "recorder"               "melodic tom"
1972 "acoustic bass"                "pan flute"              "synth drum"
1973 "electric bass (finger)"       "blown bottle"           "reverse cymbal"
1974 "electric bass (pick)"         "skakuhachi"             "guitar fret noise"
1975 "fretless bass"                "whistle"                "breath noise"
1976 "slap bass 1"                  "ocarina"                "seashore"
1977 "slap bass 2"                  "lead 1 (square)"        "bird tweet"
1978 "synth bass 1"                 "lead 2 (sawtooth)"      "telephone ring"
1979 "synth bass 2"                 "lead 3 (calliope)"      "helicopter"
1980 "violin"                       "lead 4 (chiff)"         "applause"
1981 "viola"                        "lead 5 (charang)"       "gunshot"
1982 "cello"                        "lead 6 (voice)")
1983
1984
1985
1986 subsect(Translators)
1987 label(translators)
1988
1989 The behavior of notation contexts is defined by the translators for
1990 those contexts.  The translator for a context specifies what notations
1991 are handled by the context, it specifies what other contexts the
1992 context can contain, and it sets property values for the context.  
1993 There are different translators for each type of output.  The
1994 translators for paper output are defined in file(engraver.ly).  The
1995 translators for MIDI output are defined in file(performer.ly).  
1996
1997 The first thing that appears inside a code(\translator) definition is
1998 the type of the context being created.  This is specified with the
1999 code(\type) keyword: code(\type) var(typename)code(;).  After the type
2000 of the context is specified, property assignments, the code(\name)
2001 keyword and code(\consists), code(\accepts), and code(\remove)
2002 keywords can appear in any order.  The code(\name) keyword specifies
2003 the name of the context that is handled by the translator.  If the
2004 name is not specified, the translator won't do anything.  Each
2005 code(\accepts) keyword specifies what contexts can be contained inside
2006 this one.  The code(\consists) keywords specify which notations are
2007 handled by the context.  Each code(\consists) keyword specifies the
2008 name of an engraver (for paper ouput) or performer (for MIDI output)
2009 which handles a certain notation.  The code(\remove) keyword can be
2010 used to remove a performer or engraver from the translator.
2011
2012 In the code(\paper) block, it is also possible to define translator
2013 identifiers.  Like other block identifiers, the identifier can only
2014 be used as the very first item of a translator.  In order to define
2015 such an identifier outside of code(\score), you must do
2016 verb(\paper{ foo=\translator{ ... }
2017 \score{
2018   \notes{ ... }
2019   \paper{ \translator{ \foo ... } }
2020 })
2021
2022 Some All of the standard translators have predefined identifiers,  making
2023 it easy to redefine these contexts by adding or removing items. 
2024 The predefined identifiers are:  code(StaffContext),
2025 code(RhythmicStaffContext),  code(VoiceContext),  code(ScoreContext), code(ScoreWithNumbers)
2026
2027
2028 subsubsect(Paper Types and Engravers and Pre-defined Translators)
2029
2030 Some pre-defined identifiers can simplify modification of translators.
2031 The pre-defined identifiers are:  
2032 description(
2033 dit(code(StaffContext)) Default Staff  context. 
2034 dit(code(RhythmicStaffContext)) Default RhythmicStaff  context. 
2035 dit(code(VoiceContext)) Default Voice  context.  
2036 dit(code(ScoreContext))  Default  Score context. 
2037 dit(code(ScoreWithNumbers)) Score  context with numbering at  the
2038 Score level.   
2039 dit(code(BarNumberingStaffContext)) Staff context with numbering  at
2040 the Staff level.  
2041 dit(code(HaraKiriStaffContext))  
2042 dit(code(OrchestralPartStaffContext))
2043 dit(code(OrchestralScoreContext))
2044 )
2045 Using these pre-defined values, you can remove  or add items to the
2046 translator verb(\paper{ \translator{ \StaffContext
2047                      \remove Some_engraver;
2048                      \consists Different_engraver;  }})
2049       
2050
2051
2052 There are four types for paper translators:
2053 description(
2054   dit(code(Engraver_group_engraver))
2055   dit(code(Hara_kiri_line_group_engraver))
2056   dit(code(Line_group_engraver_group))
2057   dit(code(Score_engraver))  
2058 )
2059 COMMENT( The names of these types seem somewhat confusing. )
2060
2061 The engravers for paper output are:
2062
2063 description(
2064 dit(code(Abbreviation_beam_engraver))
2065 dit(code(Bar_engraver)) Engraves bar lines.  Normally in code(Staff) and
2066 code(RhythmicStaff).  
2067 dit(code(Bar_number_engraver)) Engrave bar numbers.  These numbers
2068 appear at the start of each line.  Not normally in any translator.  Can
2069 be added to code(Score) for Score-wide numbering or to code(Staff) for
2070 numbering on each staff.  
2071
2072 dit(code(Beam_engraver)) Handles beam requests by engraving beams.  Normally
2073 appears in the code(Voice) translator.  If omitted, then notes will be printed
2074 with flags instead of beams.
2075
2076 dit(code(Beam_req_swallow_translator)) Swallows beam requests.  In
2077 code(LyricVoice).  
2078 dit(code(Chord_name_engraver)) Engraves chord names.  Normally in
2079 code(ChordNameVoice) 
2080 dit(code(Clef_engraver)) Engraves the clef symbol.  Normally in code(Staff).
2081 dit(code(Collision_engraver))
2082 dit(code(Dot_column_engraver)) Engraves dots on dotted notes shifted to the
2083 right of the note.  Normally in code(Voice).  If omitted, then dots appear on
2084 top of the notes.  
2085 dit(code(Dynamic_engraver)) Engraves dynamics symbols.  Normally in code(Voice).
2086 dit(code(Font_size_engraver))
2087 dit(code(Key_engraver)) Engraves the key signature.  Normally in code(Staff).
2088 dit(code(Local_key_engraver))
2089 dit(code(Lyric_engraver)) Engraves lyrics.  Normally in code(LyricVoice).
2090 dit(code(Multi_measure_rest_engraver)) Engraves multi-measure rests that are
2091 produced with code(R).  Normally in code(Voice).
2092 dit(code(Piano_bar_engraver))
2093 dit(code(Pitch_squash_engraver)) Treat all pitches as middle C.  Used in
2094 code(RhythmicStaff).  Note that the notes move, but the locations of
2095 accidentals stay the same. 
2096 dit(code(Priority_horizontal_align_engraver))
2097 dit(code(Repeat_engraver)) Handles repeats? In code(Staff) and 
2098    code(RhythmicStaff).
2099 dit(code(Rest_collision_engraver)) Handles collisions of rests. In code(Staff).
2100 dit(code(Rest_engraver)) Engraves rests.  Normally in code(Voice).
2101 dit(code(Rhythmic_column_engraver))
2102 dit(code(Score_priority_engraver))
2103 dit(code(Script_engraver)) Handles note ornaments generated by code(\script).
2104 Normally in code(Voice).  
2105 dit(code(Separating_line_group_engraver))
2106 dit(code(Skip_req_swallow_translator))
2107 dit(code(Slur_engraver)) Engraves slurs.  Normally in code(Voice).
2108 dit(code(Span_bar_engraver)) Engraves lines across multiple staffs.  Normally
2109 in code(Staffgroup) and code(GrandStaff).  Removing this from code(StaffGroup)
2110 gives the definition of code(ChoirStaff).  
2111 dit(code(Span_score_bar_engraver))
2112 dit(code(Staff_group_bar_engraver))
2113 dit(code(Staff_margin_engraver)) Prints the name of the instrument
2114 (specified by code(Staff.instrument) and code(Staff.instr)) at the
2115 left of the staff.  
2116 dit(code(Staff_sym_engraver))
2117 dit(code(Stem_engraver)) Engraves stems.  Normally in code(Voice).
2118 dit(code(Ties_engraver)) Engraves ties.  Normally in code(Voice).
2119 dit(code(Time_signature_engraver)) Engraves the time signature.  Normally in
2120 code(Staff) and code(RhythmicStaff).
2121 dit(code(Timing_engraver)) Responsible for synchronizing timing information
2122 from staffs.  Normally in code(Score).  In order to create polyrhythmic music,
2123 this engraver should be removed from code(Score) and placed in code(Staff).
2124 dit(code(Tuplet_engraver)) Engraves tuplet brackets?  In code(Staff).
2125 dit(code(Vertical_align_engraver)) 
2126 )
2127
2128
2129 subsubsect(MIDI Types and Performers)
2130
2131 The types available for  MIDI translators are:
2132 description(
2133 dit(code(Performer_group_performer))
2134 dit(code(Score_performer))
2135 dit(code(Staff_performer))
2136 )
2137
2138 The performers for MIDI translators are:
2139 description(
2140 dit(code(Key_performer))
2141 dit(code(Time_signature_performer))
2142 dit(code(Note_performer))
2143 dit(code(Lyric_performer))
2144 dit(code(Swallow_performer))
2145 )
2146