]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/refman.itely
release: 1.3.130
[lilypond.git] / Documentation / user / refman.itely
1
2 @c Note:
3 @c
4 @c A menu is needed before every deeper *section nesting of @nodes
5 @c Run M-x texinfo-all-menus-update
6 @c to automagically fill in these menus
7 @c before saving changes
8
9
10 @ignore
11  TODO:
12
13    fix all FIXMEs
14
15    Rhythm staff (clef, x-notehead)
16
17    markup text
18
19    postscript, scheme output?
20
21    (links to?) using/existance of ly2dvi, lilypond-book
22
23 @end ignore
24
25
26 @c .{Reference Manual}
27
28 @node Reference Manual
29 @chapter Reference Manual
30
31 This document describes GNU LilyPond and its input format. This document
32 has been revised for LilyPond 1.3.125
33
34
35
36 @menu
37 * Overview::                    
38 * Repeats::                     
39 * Note entry::                  
40 * Music notation::              
41 * Polyphony::                   
42 * Spanners::                    
43 * Piano music::                 
44 * Lyrics::                      
45 * Chords::                      
46 * Writing parts::               
47 * Custodes::                    
48 * Page layout::                 
49 * Sound::                       
50 * Music entry::                 
51 * Engravers::                   
52 * Syntactic details::           
53 * Unsorted::                    
54 @end menu
55
56 @c . {Overview}
57 @node Overview
58 @section Overview
59
60
61 The purpose of LilyPond is explained informally by the term `music
62 typesetter'.  This is not a fully correct name: not only does the
63 program print musical symbols, it also makes esthetic decisions.  All
64 symbols and their placement is @emph{generated} from a high-level
65 musical description.  In other words, LilyPond would be best described
66 by `music compiler' or `music to notation compiler'.
67
68 Internally, LilyPond is written in a mixture of Scheme and C++. Most of
69 the algorithms and low-level routines are written in C++, but these low
70 level components are glued together using Scheme data
71 structures. LilyPond is linked to GUILE, GNU's Scheme library for
72 extension.
73
74 When lilypond is run to typeset sheet music, the following happens:
75
76 @itemize @bullet
77 @item GUILE Initialization: various scheme files are read
78 @item parsing: first standard .ly initialization  files are read, and
79 then the user @file{.ly} file is read.
80 @item interpretation: the music in the file is processed "in playing
81 order", i.e. in the same order as your eyes scan sheet music, and in the
82 same order that you hear the notes play.
83
84 @item typesetting:
85 in this step, the results of the interpretation, a typesetting
86 specification, is solved.
87
88 @item the visible results ("virtual ink") is written to the output file.
89 @end itemize
90
91 These stages, involve data of a specific type: during parsing,
92 @strong{Music} objects are created.  During the interpretation,
93 @strong{context} is constructed, and with this context af network of
94 @strong{graphical objects} (``grobs'') is created. The grobs contain
95 unknown variables, and the network forms a set of equations. After
96 solving the equations and filling in these variables, the printed output
97 (in the form of @strong{molecules}) is written to an output file.
98
99 These threemanship of tasks (parsing, translating, typesetting) and
100 data-structures (music, context, graphical objects) permeates the entire
101 design of the program.  This manual is ordered in terms of user
102 tasks. With each concept will be explained to which of the three parts
103 it belongs.
104
105 LilyPond input can be classified into three types:
106 @itemize @bullet
107   @item musical expressions: a musical expression is some combination of
108 rest, notes, lyrics
109   @item output definitions: recipes for translating those musical
110 expressions into performances (MIDI) or graphics (eg. PostScript).
111
112   @item declarations: by declaring and naming musical expressions, you
113 can enter and edit them in manageable chunks.
114 @end itemize
115
116
117
118
119 @c .  {Repeats}
120 @node Repeats
121 @section Repeats
122
123
124 @cindex repeats
125 @cindex @code{\repeat}
126
127 In order to specify repeats, use the @code{\repeat}
128 keyword.  Since repeats look and sound differently when played or
129 printed, there are a few different variants of repeats.
130
131 @table @asis
132 @item unfolded  
133 Repeated music is fully written (played) out.  Useful for MIDI
134 output.
135
136 @item volta  
137 This is the normal notation: Repeats are not written out, but
138 alternative endings (voltas) are printed, left to right.
139
140 @item folded  
141 Alternative endings are written stacked.  Which is unfortunately not
142 practical for anything right now.
143
144 @item tremolo
145 Make tremolo beams.
146 @end table  
147
148 @menu
149 * Repeat syntax::               
150 * Manual repeat commands::      
151 * Tremolo repeats::             
152 * Tremolo subdivision::         
153 @end menu
154
155 @node Repeat syntax
156 @subsection Repeat syntax
157
158 The syntax for repeats is
159
160 @example
161   \repeat @var{variant} @var{repeatcount} @var{repeatbody}
162 @end example
163
164 If you have alternative endings, you may add
165
166 @cindex @code{\alternative}
167 @example
168  \alternative @code{@{} @var{alternative1}
169             @var{alternative2}
170             @var{alternative3} @dots{} @code{@}}
171 @end example
172
173 where each @var{alternative} is a Music expression.
174
175 Normal notation repeats are used like this:
176
177 @quotation
178
179 @lilypond[fragment,verbatim]
180   c'1
181   \repeat volta 2 { c'4 d' e' f' }
182   \repeat volta 2 { f' e' d' c' }
183 @end lilypond
184 @end quotation
185
186 With alternative endings:
187
188 @quotation
189
190 @lilypond[fragment,verbatim]
191   c'1
192   \repeat volta 2 {c'4 d' e' f'} 
193   \alternative { {d'2 d'} {f' f} }
194 @end lilypond
195 @end quotation
196
197 Folded repeats look like this:@footnote{Folded repeats offer little
198 more over simultaneous music.  However, it is to be expected that
199 more functionality -- especially for the MIDI backend -- will be
200 implemented at some point in the future.}
201
202 @quotation
203
204 @lilypond[fragment,verbatim]
205   c'1
206   \repeat fold 2 {c'4 d' e' f'} 
207   \alternative { {d'2 d'} {f' f} }
208
209 @end lilypond
210 @end quotation
211
212
213 If you don't give enough alternatives for all of the repeats, then
214 the first alternative is assumed to be repeated often enough to equal
215 the specified number of repeats.
216
217 @quotation
218 @lilypond[fragment,verbatim]
219 \context Staff {
220   \relative c' {
221     \partial 4;
222     \repeat volta 3 { e | c2 d2 | e2 f2 | }
223     \alternative { { g4 g g } { a | a a a a | b2. } }
224   }
225 }
226
227 @end lilypond
228 @end quotation
229
230
231 As you can see, LilyPond doesn't remember the timing information, nor
232 are slurs or ties repeated, so you have to reset timing information
233 after a repeat, eg using bar-checks, @code{Score.measurePosition} or
234 @code{\partial}. We hope to fix this after 1.4.
235
236 It is possible to nest @code{\repeat}, although it probably is only
237 meaningful for unfolded repeats.
238
239 @node Manual repeat commands
240 @subsection Manual repeat commands
241
242 @cindex @code{repeatCommands}
243
244 The property @code{repeatCommands} can be used to control the layout of
245 repeats. Its value is a Scheme list of repeat commands, where each repeat
246 command can be
247
248 @table @code
249 @item 'start-repeat
250  Print a |: bar line
251 @item 'stop-repeat
252  Print a :| bar line
253 @item (volta . @var{text})
254   Print a volta bracket saying @var{text}.
255 @item (volta . #f)
256   Stop a running volta bracket
257 @end table
258
259 @lilypond[verbatim, fragment]
260  c''4
261     \property Score.repeatCommands = #'((volta "93") end-repeat)
262  c4 c4
263     \property Score.repeatCommands = #'((volta #f))
264  c4 c4
265 @end lilypond
266
267
268 @node Tremolo repeats
269 @subsection Tremolo repeats
270 @cindex tremolo beams
271
272 To place tremolo marks between notes, use @code{\repeat} with tremolo
273 style.  
274 @lilypond[verbatim,center]
275 \score { 
276   \context Voice \notes\relative c' {
277     \repeat "tremolo" 8 { c16 d16 }
278     \repeat "tremolo" 4 { c16 d16 }    
279     \repeat "tremolo" 2 { c16 d16 }
280     \repeat "tremolo" 4 c16
281   }
282   \paper {
283     linewidth = 40*\staffspace;
284   }  
285 }
286 @end lilypond
287
288 @node Tremolo subdivision
289 @subsection Tremolo subdivision
290 @cindex tremolo marks
291 @cindex @code{tremoloFlags}
292
293 Tremolo marks can be printed on a single note by adding
294 `@code{:}[@var{length}]' after the note.  The length must be at least 8.
295 A @var{length} value of 8 gives one line across the note stem.  If the
296 length is omitted, then the last value is used, or the value of the
297 @code{tremoloFlags} property if there was no last value.
298
299 @lilypond[verbatim,fragment,center]
300   c'2:8 c':32
301 @end lilypond
302
303 Tremolos in this style do not carry over into the MIDI output.
304
305 Using this mechanism pays off when you entering many tremolos, since the
306 default argument saves a lot of typing.
307
308
309 @c . {Note entry}
310 @node Note entry
311 @section Note entry
312 @cindex Note entry
313
314 @menu
315 * Notes mode::                  
316 * Pitches::                     
317 * Defining pitch names::        
318 * Durations::                   
319 * Notes::                       
320 * Rests::                       
321 * Skip::                        
322 @end menu
323
324 @c .  {Notes mode}
325 @node Notes mode
326 @subsection Notes mode
327
328 @cindex note mode
329
330 @cindex @code{\notes}
331 Note mode is introduced by the keyword
332 @code{\notes}.  In Note mode, words can only
333 contain alphabetic characters.  If @code{word} is encountered,
334 LilyPond first checks for a notename of @code{word}.  If no
335 notename is found, then @code{word} is treated as a string.
336
337 Since combinations of numbers and dots are used for indicating
338 durations, it is not possible to enter real numbers in this mode.
339
340 @cindex Notes mode
341
342 @c .  {Pitches}
343 @node Pitches
344 @subsection Pitches
345
346 @cindex Pitch names
347 @cindex Note specification
348 @cindex pitches
349 @cindex entering notes
350
351 The verbose syntax for pitch specification is
352
353 @cindex @code{\pitch}
354 @example
355   \pitch @var{scmpitch}
356 @end example
357
358 @var{scmpitch} is a pitch scheme object, see @ref{Pitch data type}.
359
360 In Note and Chord mode, pitches may be designated by names.  The default
361 names are the Dutch note names.  The notes are specified by the letters
362 @code{c} through @code{b}, where @code{c} is an octave below middle C
363 and the letters span the octave above that C.  In Dutch,
364 @cindex note names, Dutch
365 a sharp is formed by adding @code{-is} to the end of a pitch name.  A
366 flat is formed by adding @code{-es}. Double sharps and double flats are
367 obtained by adding @code{-isis} or @code{-eses}.  @code{aes} and
368 @code{ees} are contracted to @code{as} and @code{es} in Dutch, but both
369 forms will be accepted.
370
371 LilyPond has predefined sets of notenames for various other languages.
372 To use them, simply include the language specific init file.  For
373 example: @code{\include "english.ly"}.  The available language files and
374 the names they define are:
375
376 @example 
377                         Note Names               sharp       flat
378 nederlands.ly  c   d   e   f   g   a   bes b   -is         -es
379 english.ly     c   d   e   f   g   a   bf  b   -s/-sharp   -f/-flat
380 deutsch.ly     c   d   e   f   g   a   b   h   -is         -es
381 norsk.ly       c   d   e   f   g   a   b   h   -iss/-is    -ess/-es
382 svenska.ly     c   d   e   f   g   a   b   h   -iss        -ess
383 italiano.ly    do  re  mi  fa  sol la  sib si  -d          -b
384 catalan.ly     do  re  mi  fa  sol la  sib si  -d/-s       -b 
385 @end example 
386
387 @cindex @code{'}
388 @cindex @code{,}
389
390
391
392
393 The optional octave specification takes the form of a series of
394 single quote (`@code{'}') characters or a series of comma
395 (`@code{,}') characters.  Each @code{'} raises the pitch by one
396 octave; each @code{,} lowers the pitch by an octave.
397
398 @lilypond[fragment,verbatim,center]
399   c' d' e' f' g' a' b' c''
400 @end lilypond
401
402 @lilypond[fragment,verbatim,center]
403   cis' dis' eis' fis' gis' ais' bis'
404 @end lilypond
405
406 @lilypond[fragment,verbatim,center]
407   ces' des' es' fes' ges' as' bes'
408 @end lilypond
409
410 @lilypond[fragment,verbatim,center]
411   cisis' eisis' gisis' aisis' beses'
412 @end lilypond
413
414 @lilypond[fragment,verbatim,center]
415   ceses' eses' geses' ases' beses'
416 @end lilypond
417
418
419 @c .  {Defining pitch names}
420 @node Defining pitch names
421 @subsection Defining pitch names
422
423 @cindex defining pitch names
424 @cindex pitch names, defining 
425
426 Note names and chord modifiers can be customised for nationalities.  The
427 syntax is as follows.
428
429 @cindex @code{\pitchnames}
430 @cindex @code{\chordmodifiers}
431 @example
432    \pitchnames @var{scheme-alist}
433    \chordmodifiers @var{scheme-alist}
434 @end example
435
436 See @file{ly/nederlands.ly} and @file{ly/chord-modifiers.ly} for
437 specific examples how to do this.  Some national note names have been
438 provided, among others: Norwegian, Swedish, German, Italian, Catalan,
439 French, Dutch and English.
440
441
442 @c .  {Durations}
443 @node Durations
444 @subsection Durations
445
446
447 @cindex duration
448 @cindex @code{\duration}
449
450 The syntax for an verbose duration specification is
451 @example
452  \duration @var{scmduration}
453 @end example
454
455 In Note, Chord, and Lyrics mode, durations may be designated by numbers
456 and dots: durations are entered as their reciprocal values.  For notes
457 longer than a whole note, use identifiers.
458
459 @quotation
460
461 @example 
462 c'\longa c'\breve  
463 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64 
464 r\longa r\breve  
465 r1 r2 r4 r8 r16 r32 r64 r64 
466 @end example 
467
468
469 @lilypond[]
470 \score {
471   \notes \relative c'' {
472     a\longa a\breve  \autoBeamOff
473     a1 a2 a4 a8 a16 a32 a64 a64 
474     r\longa r\breve  
475     r1 r2 r4 r8 r16 r32 r64 r64 
476   }
477   \paper {
478     \translator {
479       \StaffContext
480         \remove "Clef_engraver";
481         \remove "Staff_symbol_engraver";
482         \remove "Time_signature_engraver";
483         \consists "Pitch_squash_engraver";
484     }
485   }
486 }
487 @end lilypond
488 @end quotation
489
490 As you  can see, the longa is not printed. To get a longa note head, you
491 have to use a different style of note heads. See [TODO].
492
493 If the duration is omitted then it is set equal to the previous duration
494 entered.  At the start of parsing there is no previous duration, so then
495 a quarter note is assumed.  The duration can be followed by a dot
496 (`@code{.}')  to obtain dotted note lengths.
497 @cindex @code{.}
498
499 @lilypond[fragment,verbatim,center]
500   a'4. b'4.
501 @end lilypond
502 @cindex @code{r}
503 @cindex @code{s}
504
505 You can alter the length of duration by writing `@code{*}@var{fraction}'
506 after it.  This will not affect the appearance of note heads or rests.
507
508 @c . {Notes}
509 @node Notes
510 @subsection Notes
511
512 A note specification has the form
513
514 @example
515   @var{pitch}[@var{octavespec}][!][?][@var{duration}]
516 @end example
517
518
519 LilyPond will determine what accidentals to typeset depending on the key
520 and context, so alteration refer to what note is heard, not to whether
521 accidentals are printed.  A reminder accidental
522 @cindex reminder accidental
523 @cindex @code{?}
524 can be forced by adding an exclamation mark @code{!} after the pitch.
525 A cautionary accidental,
526 @cindex cautionary accidental
527
528 i.e., an accidental within parentheses can be obtained by adding the
529 question mark `@code{?}' after the pitch.
530
531 @lilypond[fragment,verbatim,center]
532   cis' d' e' cis'  c'? d' e' c'!
533 @end lilypond
534
535
536 @c .  {Rests}
537 @node  Rests
538 @subsection Rests
539 @cindex Rests
540
541 Rests are entered like notes, with note name `@code{r}'.
542 There is also a note name
543 `@code{s}', which produces a space of the specified
544 duration.
545
546
547 @c .  {Skip}
548 @node Skip
549 @subsection Skip
550 @cindex Skip
551
552
553 @example
554   \skip @var{duration} @code{;}
555 @end example
556 @cindex @code{\skip}
557
558 Skips the amount of time specified by @var{duration}.  If no other
559 music is played, a gap will be left for the skipped time with no
560 notes printed.  It works in Note Mode or Lyrics Mode.  In Note mode,
561 this has the same effect as the spacer rest.
562
563
564
565 @c . {Music notation}
566 @node Music notation
567 @section Music notation
568 @cindex Music notation
569 @menu
570 * Key::                         
571 * Time signature::              
572 @end menu
573
574 @c .  {Key}
575 @node Key
576 @subsection Key
577 @cindex Key
578
579 @cindex @code{\key}
580
581 @example
582   @code{\key} @var{pitch} @var{type} @code{;}
583 @end example
584 @cindex @code{\minor}
585 @cindex @code{\major}
586 @cindex @code{\minor}
587 @cindex @code{\ionian}
588 @cindex @code{\locrian}
589 @cindex @code{\aeolian}
590 @cindex @code{\mixolydian}
591 @cindex @code{\lydian}
592 @cindex @code{\phrygian}
593 @cindex @code{\dorian}
594
595 Change the key signature.  @var{type} should be @code{\major} or
596 @code{\minor} to get @var{pitch}-major or @var{pitch}-minor,
597 respectively.  The second argument is optional; the default is major
598 keys.  The @var{\context} argument can also be given as an integer,
599 which tells the number of semitones that should be added to the pitch
600 given in the subsequent @code{\key} commands to get the corresponding
601 major key, e.g., @code{\minor} is defined as 3.  The standard mode names
602 @code{\ionian}, @code{\locrian}, @code{\aeolian}, @code{\mixolydian},
603 @code{\lydian}, @code{\phrygian}, and @code{\dorian} are also defined.
604
605 This command sets @code{Staff.keySignature}. 
606
607 @cindex @code{keySignature}
608
609 @c .   {Clef changes}
610 @subsubsection Clef changes
611 @cindex @code{\clef}
612 @example
613   \clef @var{clefname} @code{;}
614 @end example
615
616 Short-cut for
617
618 @example
619   \property Staff.clefGlyph = @var{symbol associated with clefname} 
620   \property Staff.clefPosition = @var{clef Y-position for clefname}
621   \property Staff.clefOctavation = @var{extra pitch of clefname}
622 @end example
623
624 Supported clef-names include 
625
626 @itemize @bullet
627 @item treble, violin, G, G2: G clef on 2nd line
628 @item french: G clef on 1st line
629 @item soprano: C clef on 1st line
630 @item mezzosoprano: C clef on 2nd line
631 @item alto: C clef on 3rd line
632 @item tenor: C clef on 4th line
633 @item baritone: C clef on 5th line
634 @item varbaritone: F clef on 3rd line
635 @item bass, F: F clef on 4th line
636 @item subbass: F clef on 5th line
637 @item percussion: percussion clef
638 @end itemize
639
640 [todo: ancient clefs]
641
642 Supported associated symbols (for Staff.clefGlyph) are:
643
644 @itemize @bullet
645 @item clefs-C: modern style C clef
646 @item clefs-F: modern style F clef
647 @item clefs-G: modern style G clef
648 @item clefs-vaticana_do: Editio Vaticana style do clef
649 @item clefs-vaticana_fa: Editio Vaticana style fa clef
650 @item clefs-medicaea_do: Editio Medicaea style do clef
651 @item clefs-medicaea_fa: Editio Medicaea style fa clef
652 @item clefs-mensural1_c: modern style mensural C clef
653 @item clefs-mensural2_c: historic style small mensural C clef
654 @item clefs-mensural3_c: historic style big mensural C clef
655 @item clefs-mensural1_f: historic style traditional mensural F clef
656 @item clefs-mensural2_f: historic style new mensural F clef
657 @item clefs-mensural_g: historic style mensural G clef
658 @item clefs-hufnagel_do: historic style hufnagel do clef
659 @item clefs-hufnagel_fa: historic style hufnagel fa clef
660 @item clefs-hufnagel_do_fa: historic style hufnagel combined do/fa clef
661 @item clefs-percussion: modern style percussion clef
662 @end itemize
663
664 @emph{Modern style} means "as is typeset in current editions".
665 @emph{Historic style} means "as was typeset or written in contemporary
666 historic editions".  @emph{Editio XXX style} means "as is/was printed in
667 Editio XXX".
668
669 @c .  {Time signature}
670 @node Time signature
671 @subsection Time signature
672 @cindex Time signature
673 @cindex meter
674 @cindex @code{\time}
675
676 @example
677   \time @var{numerator}@code{/}@var{denominator} @code{;}
678 @end example
679
680 A short-cut for doing
681 @example
682      \property Score.timeSignatureFraction = #'(@var{numerator} . @var{denominator})
683 @end example
684
685 See the documentation of @code{timeSignatureFraction}
686
687
688 @c .   {Partial}
689 @subsubsection Partial
690 @cindex Partial
691 @cindex anacrusis
692 @cindex upstep
693 @cindex partial measure
694 @cindex measure, partial
695 @cindex shorten measures
696 @cindex @code{\partial}
697 @example
698   \partial @var{duration} @code{;}
699 @end example
700
701 Short cut for 
702
703 @example
704   \property Score.measurePosition = @var{length of duration}
705 @end example
706 @cindex @code{|}
707
708 See the documentation of @code{measurePosition}.
709
710
711 @c .   {Polyphony}
712 @node Polyphony
713 @section Polyphony
714 @cindex Polyphony
715
716 [todo : collisiosn, rest-collisinos, voiceX identifiers, how to
717 which  contexts to instantiate.]
718
719
720 @table @code
721 @cindex @code{\shiftOff}  
722   @item @code{\shiftOff}
723     Disable horizontal shifting of note heads that collide. 
724
725 @cindex @code{\shiftOn}  
726   @item @code{\shiftOn}
727     Enable note heads that collide with other note heads to be
728     shifted horiztonally. Also @code{\shiftOnn} and @code{\shiftOnnn}
729 set different shift values.
730
731 @cindex @code{\stemBoth}  
732   @item @code{\stemBoth}
733     Allow stems, beams, and slurs to point either upwards or
734     downwards, decided automatically by LilyPond.
735
736 @cindex @code{\stemDown}  
737   @item @code{\stemDown}
738     Force stems, beams, and slurs to point down.
739
740 @cindex @code{\stemUp}  
741   @item @code{\stemUp}
742     Force stems, beams and slurs to point up.
743 @end table
744
745 @c .  {Spanners}
746 @node Spanners
747 @section Spanners
748 @cindex Spanners
749
750 @menu
751 * Beam::                        
752 * Slur ::                       
753 * Phrasing slur::               
754 * Ornaments::                   
755 * Grace notes::                 
756 * Bar check::                   
757 @end menu
758
759
760
761 @c .   {Beam}
762 @node Beam
763 @subsection Beams
764
765 @cindex beams
766
767 @c .    {Automatic beams}
768 @subsubsection Automatic beams
769
770
771 @cindex automatic beam generation
772 @cindex autobeam
773 @cindex @code{Voice.noAutoBeaming}
774
775 LilyPond will group flagged notes and generate beams autmatically, where
776 appropriate.
777
778 This feature can be disabled by setting the @code{Voice.noAutoBeaming}
779 property to true, which you may find necessary for the melody that goes
780 with lyrics, eg.  Automatic beaming can easily be overridden for
781 specific cases by specifying explicit beams. This is discussed in the
782 next subsubsection.
783
784
785
786 @cindex @code{Voice.autoBeamSettings}
787 @cindex @code{(end * * * *)}
788 @cindex @code{(begin * * * *)}
789
790 A large number of Voice properties are used to decide how to generate
791 beams.  Their default values appear in @file{scm/auto-beam.scm}.  In
792 general, beams can begin anywhere, but their ending location is
793 significant.  Beams can end on a beat, or at durations specified by the
794 properties in @code{Voice.autoBeamSettings}.  To end beams every quarter
795 note, for example, you could set the property @code{(end * * * *)} to
796 @code{(make-moment 1 4)}.  To end beams at every three eighth notes you
797 would set it to @code{(make-moment 1 8)}.  The same syntax can be used
798 to specify beam starting points using @code{(begin * * * *)}, eg:
799 @quotation
800 @example
801 \property Voice.autoBeamSettings \override
802     #'(end * * * *) = #(make-moment 1 4)
803 \property Voice.autoBeamSettings \override
804     #'(begin * * * *) = #(make-moment 1 8)
805 @end example
806 @end quotation
807
808 To allow different settings for different time signatures, instead of
809 the first two asterisks @code{* *} you can specify a time signature; use
810 @code{(end N M * *)} to restrict the definition to
811 `@var{N}@code{/}@var{M}' time.  For example, to specify beams ending
812 only for 6/8 time you would use the property @code{(end 6 8 * *)}.
813
814 To allow different endings for notes of different durations, instead of
815 th last two asterisks you can specify a duration; use @code{(end * * N
816 M)} to restrict the definition to beams that contain notes of
817 `@var{N}@code{/}@var{M}' duration.
818
819 For example, to specify beam endings for beams that contain 32nd notes,
820 you would use @code{(end * * 1 32)}.
821
822
823
824 @c .    {Manual beams}
825 @cindex Automatic beams
826 @subsubsection Manual beams
827 @cindex beams, manual
828 @cindex @code{]}
829 @cindex @code{[}
830
831 In some cases it may be necessary to override LilyPond's automatic
832 beaming algorithm.  For example, the auto beamer will not beam over
833 rests or bar lines, so if you want that, specify the begin and end point
834 manually using @code{[} and @code{]}:
835
836 @quotation
837 @lilypond[fragment,relative,verbatim]
838   \context Staff {
839     r4 [r8 g'' a r8] r8 [g | a] r8
840   }
841 @end lilypond
842
843
844 @cindex @code{stemLeftBeamCount}
845
846 If you have specific wishes for the number of beams, you can fully
847 control the number of beams through the properties
848 y@code{Voice.stemLeftBeamCount} and @code{Voice.stemRightBeamCount}.
849
850 @lilypond[fragment,relative,verbatim]
851   \context Staff {
852     [f'8 r16 f g a]
853     [f8 r16 \property Voice.stemLeftBeamCount = #1 f g a]
854   }
855 @end lilypond
856 @end quotation
857 @cindex @code{stemRightBeamCount}
858
859
860 @c .    {Adjusting beams}
861 @unnumberedsubsubsec Adjusting beams
862 @cindex Adjusting beams
863
864 FIXME
865
866
867         
868
869 @c .   {Slur}
870 @node Slur 
871 @subsection Slur
872 @cindex slur
873
874 @menu
875 * Slur attachments::            
876 @end menu
877
878 A slur connects chords and is used to indicate legato.  Slurs avoid
879 crossing stems.  A slur is started with @code{(} and stopped with
880 @code{)}.  The starting @code{(} appears to the right of the first note
881 in the slur.  The terminal @code{)} appears to the left of the last note
882 in the slur.  This makes it possible to put a note in slurs from both
883 sides:
884
885 @lilypond[fragment,verbatim,center]
886   f'()g'()a' [a'8 b'(] a'4 g'2 )f'4
887 @end lilypond
888
889 @c .    {Adjusting slurs}
890 @unnumberedsubsubsec Adjusting slurs
891
892
893 @node Slur attachments
894 @subsubsection Slur attachments
895
896 The ending of a slur should whenever possible be attached to a note
897 head.  Only in some instances where beams are involved, LilyPond may
898 attach a slur to a stem end.  In some cases, you may want to override
899 LilyPond's decision, e.g., to attach the slur to the stem end.  This can
900 be done through @code{Voice.Slur}'s grob-property @code{attachment}:
901
902
903 @quotation
904 @lilypond[fragment,relative,verbatim]
905   \property Voice.Slur \set #'direction = #1
906   \property Voice.Stem \set #'length = #5.5
907   g''8(g)g4
908   \property Voice.Slur \set #'attachment = #'(stem . stem)
909   g8(g)g4
910 @end lilypond
911 @end quotation
912
913 Similarly, slurs can be attached to note heads even when beams are
914 involved:
915
916 @quotation
917 @lilypond[fragment,relative,verbatim]
918   \property Voice.Slur \set #'direction = #1
919   \property Voice.Slur \set #'attachment = #'(head . head)
920   g''16()g()g()g()d'()d()d()d
921 @end lilypond
922 @end quotation
923
924 If a slur would strike through a stem or beam, LilyPond will move the
925 slur away vertically (upward or downward).  In some cases, this may
926 cause ugly slurs that you may want to correct:
927
928 @quotation
929 @lilypond[fragment,relative,verbatim]
930   \property Voice.Stem \set #'direction = #1
931   \property Voice.Slur \set #'direction = #1
932   d'32( d'4 )d8..
933   \property Voice.Slur \set #'attachment = #'(stem . stem)
934   d,32( d'4 )d8..
935 @end lilypond
936 @end quotation
937
938 LilyPond will increase the curvature of a slur trying to stay free of
939 note heads and stems.  However, if the curvature would increase too much,
940 the slur will be reverted to its default shape.  This decision is based
941 on @code{Voice.Slur}'s grob-property @code{beautiful} value.  In some
942 cases, you may find ugly slurs beautiful, and tell LilyPond so by
943 increasing the @code{beautiful} value:
944
945 [hoe  gedefd?? wat betekent beautiful = X?]
946
947 @quotation
948 @lilypond[verbatim]
949 \score {
950   \notes \context PianoStaff <
951     \time 6/4;
952     \context Staff=up { s1 * 6/4 }
953     \context Staff=down <
954       \clef bass;
955       \autochange Staff \context Voice
956         \notes \relative c {
957           d,8( a' d f a d f d a f d )a
958         }
959     >
960   >
961   \paper {
962     linewidth = -1.;
963     \translator {
964       \VoiceContext
965       Slur \override #'beautiful = #5.0
966       Slur \override #'direction = #1
967       Stem \override #'direction = #-1
968       autoBeamSettings \override #'(end * * * *)
969         = #(make-moment 1 2)
970     }
971     \translator {
972       \PianoStaffContext
973       VerticalAlignment \override #'threshold = #'(5 . 5)
974     }
975   }
976 }
977 @end lilypond
978 @end quotation
979
980 @cindex Adusting slurs
981
982
983
984 @c .   {Phrasing slur}
985 @node Phrasing slur
986 @subsection Phrasing slur
987 @cindex phrasing slur
988 @cindex phrasing mark
989
990 A phrasing slur (or phrasing mark) connects chords and is used to
991 indicate a musical sentence.  Phrasing slurs avoid crossing stems.  A
992 phrasing slur is started with @code{\(} and stopped with @code{\)}.  The
993 starting @code{\(} appears to the right of the first note in the
994 phrasing slur.  The terminal @code{\)} appears to the left of the last
995 note in the phrasing slur.
996
997 @lilypond[fragment,verbatim,center,relative]
998   \time 6/4; c''\((d)e f(e)\)d
999 @end lilypond
1000
1001
1002 @c .   {Tie}
1003 @menu
1004 * Tie::                         
1005 * Tuplets::                     
1006 * Text spanner::                
1007 * Ottava::                      
1008 * Span requests::               
1009 @end menu
1010
1011 @node Tie
1012 @subsubsection Tie
1013
1014 @cindex Tie
1015 @cindex ties
1016 @cindex @code{~}
1017
1018 A tie connects two adjacent note heads of the same pitch.  When used
1019 with chords, it connects all of the note heads whose pitches match.
1020 Ties are indicated using the tilde symbol `@code{~}'.
1021 If you try to tie together chords which have no common pitches, a
1022 warning message will appear and no ties will be created.
1023
1024 @lilypond[fragment,verbatim,center]
1025   e' ~ e' <c' e' g'> ~ <c' e' g'>
1026 @end lilypond
1027
1028 [sparseTies]
1029
1030
1031 @c .   {Tuplets}
1032 @node Tuplets
1033 @subsubsection Tuplets
1034 @cindex Tuplets
1035 @cindex Times 
1036
1037 Tuplets are made out of a music expression by multiplying their duration
1038 with a fraction.
1039
1040 @cindex @code{\times}
1041 @example
1042   \times @var{fraction} @var{musicexpr}
1043 @end example
1044
1045 The duration of @var{musicexpr} will be multiplied by the fraction. 
1046 In print, the fraction's denominator will be printed over the notes,
1047 optionally with a bracket.  The most common tuplet is the triplet in
1048 which 3 notes have the length of 2, so the notes are 2/3 of
1049 their written length:
1050
1051 @lilypond[fragment,verbatim,center]
1052   g'4 \times 2/3 {c'4 c' c'} d'4 d'4
1053 @end lilypond
1054
1055 [todo: document tupletSpannerDuration]
1056
1057
1058
1059 @c .   {Text spanner}
1060 @node Text spanner
1061 @subsubsection Text spanner
1062 @cindex Text spanner
1063
1064 @c .   {Ottava}
1065 @node Ottava
1066 @subsubsection Ottava
1067 @cindex Ottava
1068 @unnumberedsubsubsec Ottava
1069
1070 [move to trick. Not a supported feature.]
1071
1072 @lilypond[fragment,relative,verbatim]
1073   a'''' b c a
1074   \property Voice.TextSpanner \set #'type = #'dotted-line
1075   \property Voice.TextSpanner \set #'edge-height = #'(0 . 1.5)
1076   \property Voice.TextSpanner \set #'edge-text = #'("8va " . "")
1077   \property Staff.centralCPosition = #-13
1078   a\spanrequest \start "text" b c a \spanrequest \stop "text"
1079 @end lilypond
1080
1081
1082
1083 @c .   {Span requests}
1084 @node Span requests
1085 @subsubsection Span requests
1086 @cindex Span requests
1087
1088 @cindex @code{\spanrequest}
1089
1090 @example
1091   \spanrequest @var{startstop} @var{type}
1092 @end example
1093 @cindex @code{\start}
1094 @cindex @code{\stop}
1095
1096 Define a spanning request. The @var{startstop} parameter is either -1
1097 (@code{\start}) or 1 (@code{\stop}) and @var{type} is a string that
1098 describes what should be started.  Supported types are @code{crescendo},
1099 @code{decrescendo}, @code{beam}, @code{slur}.  [FIXME: many more] This
1100 is an internal command.  Users should use the shorthands which are
1101 defined in the initialization file @file{spanners.ly}.
1102
1103 You can attach a (general) span request to a note using
1104
1105 @lilypond[fragment,verbatim,center]
1106   c'4-\spanrequest \start "slur"
1107   c'4-\spanrequest \stop "slur"
1108 @end lilypond
1109
1110 The slur syntax with parentheses is a shorthand for this.
1111
1112
1113 @c .  {Ornaments}
1114 @node Ornaments
1115 @subsection Ornaments
1116 @cindex Ornaments
1117 @menu
1118 * Articulation::                
1119 * Text scripts::                
1120 @end menu
1121
1122 @c .   {Articulation}
1123 @node Articulation
1124 @subsubsection Articulation
1125 @cindex Articulation
1126
1127 @cindex articulations
1128 @cindex scripts
1129 @cindex ornaments
1130
1131 A variety of symbols can appear above and below notes to indicate
1132 different characteristics of the performance.  These symbols can be
1133 added to a note with `@var{note}@code{-\}@var{name}'.  Numerous symbols
1134 are defined in @file{script.ly} and @file{script.scm}.  Symbols can be
1135 forced to appear above or below the note by writing
1136 `@var{note}@code{^\}@var{name}' and `@var{note}@code{_\}@var{name}'
1137 respectively.  Here is a chart showing symbols above notes, with the
1138 name of the corresponding symbol appearing underneath.
1139
1140 @lilypond[]
1141
1142   \score {
1143     < \notes {
1144         \property Score.LyricSyllable \override #'font-family =
1145 #'typewriter
1146         \property Score.LyricSyllable \override #'font-shape = #'upright
1147         c''-\accent      c''-\marcato      c''-\staccatissimo c''-\fermata 
1148         c''-\stopped     c''-\staccato     c''-\tenuto        c''-\upbow
1149         c''-\downbow     c''^\lheel        c''-\rheel         c''^\ltoe
1150         c''-\rtoe        c''-\turn         c''-\open          c''-\flageolet
1151         c''-\reverseturn c''-\trill        c''-\prall         c''-\mordent
1152         c''-\prallprall  c''-\prallmordent c''-\upprall       c''-\downprall
1153         c''-\thumb       c''-\segno        c''-\coda
1154       }
1155       \context Lyrics \lyrics {
1156         accent__      marcato__      staccatissimo__ fermata
1157         stopped__     staccato__     tenuto__        upbow
1158         downbow__     lheel__        rheel__         ltoe
1159         rtoe__        turn__         open__          flageolet
1160         reverseturn__ trill__        prall__         mordent
1161         prallprall__  prallmordent__ uprall__        downprall
1162         thumb__       segno__        coda
1163       }
1164     >
1165     \paper {
1166       linewidth = 5.875\in;          
1167       indent    = 0.0;
1168     }
1169   }
1170
1171 @end lilypond
1172
1173 @c .   {Text scripts}
1174 @node Text scripts
1175 @subsubsection Text scripts
1176 @cindex Text scripts
1177
1178 FIXME: markup
1179
1180 In addition, it is possible to place arbitrary strings of text or
1181 @TeX{} above or below notes by using a string instead of an
1182 identifier: @code{c^"text"}.  Fingerings 
1183 can be placed by simply using digits.  All of these note ornaments
1184 appear in the printed output but have no effect on the MIDI rendering of
1185 the music.
1186
1187 @c .    {Fingerings}
1188 @unnumberedsubsubsec Fingerings
1189 @cindex Fingerings
1190
1191 To save typing, fingering instructions (digits 0 to 9 are
1192 supported) and single characters shorthands exist for a few
1193 common symbols
1194
1195 @lilypond[]
1196   \score {
1197     \notes \context Voice {
1198       \property Voice.TextScript \set #'font-family = #'typewriter
1199       \property Voice.TextScript \set #'font-shape = #'upright
1200       c''4-._"c-."      s4
1201       c''4--_"c-{}-"    s4
1202       c''4-+_"c-+"      s4
1203       c''4-|_"c-|"      s4
1204       c''4->_"c->"      s4
1205       c''4-^_"c-\\^{ }" s4
1206       c''4-1_"c-1"      s4
1207       c''4-2_"c-2"      s4
1208       c''4-3_"c-3"      s4
1209       c''4-4_"c-4"      s4
1210     }
1211     \paper {
1212       linewidth = 5.875 \in;
1213       indent    = 0.0;
1214     }
1215   }
1216
1217 @end lilypond
1218
1219
1220 @cindex @code{\textscript}
1221
1222 @example
1223
1224   \textscript @var{text} @var{style}
1225 @end example
1226
1227 Defines a text to be printed over or under a note.  @var{style} is a
1228 string that may be one of @code{roman}, @code{italic}, @code{typewriter}, 
1229 @code{bold}, @code{Large}, @code{large}, @code{dynamic} or @code{finger}.
1230
1231 You can attach a general textscript request using this syntax:
1232
1233 @quotation
1234
1235 @example 
1236 c4-\textscript "6" "finger"
1237 c4-\textscript "foo" "normal" 
1238 @end example 
1239
1240 @end quotation
1241
1242 This is equivalent to @code{c4-6 c4-"foo"}.  
1243
1244 @cindex @code{\script}
1245 @cindex scripts
1246 @cindex superscript
1247 @cindex subscript
1248
1249 @example
1250   \script @var{alias}
1251 @end example
1252
1253 Prints a symbol above or below a note.  The argument is a string which
1254 points into the script-alias table defined in @file{scm/script.scm}.
1255 Usually the @code{\script} keyword is not used directly.  Various
1256 helpful identifier definitions appear in @file{script.ly}.
1257
1258 For information on how to add scripts, consult @file{scm/script.scm}.
1259
1260
1261
1262
1263 @c .   {Grace notes}
1264 @node Grace notes
1265 @subsection Grace notes
1266
1267
1268
1269
1270
1271
1272
1273 @cindex Grace music
1274 @cindex @code{\grace}
1275 @cindex ornaments
1276 @cindex grace notes
1277 @cindex @code{graceAlignPosition}
1278
1279 @example
1280   \grace @var{musicexpr}
1281 @end example
1282
1283 A grace note expression has duration 0; the next real note is
1284 assumed to be the main note.
1285
1286 You cannot have the grace note after the main note, in terms of
1287 duration, and main notes, but you can typeset the grace notes to the
1288 right of the main note using the property
1289 @code{graceAlignPosition}.
1290 @cindex @code{flagStyle}
1291
1292 When grace music is interpreted, a score-within-a-score is set up:
1293 @var{musicexpr} has its own time bookkeeping, and you could (for
1294 example) have a separate time signature within grace notes.  While in
1295 this score-within-a-score, you can create notes, beams, slurs, etc.
1296 Unbeamed eighth notes and shorter by default have a slash through the
1297 stem.  This behavior can be controlled with the
1298 @code{flagStyle} property.
1299
1300 @quotation
1301 @lilypond[fragment,verbatim]
1302 \relative c'' {
1303   \grace c8 c4 \grace { [c16 c16] } c4
1304   \grace { \property Grace.flagStyle = "" c16 } c4
1305 }
1306
1307 @end lilypond
1308 @end quotation
1309
1310
1311 At present, nesting @code{\grace} notes is not supported. The following
1312 may cause run-time errors:
1313 @example
1314   @code{\grace @{ \grace c32 c16 @} c4}
1315 @end example
1316 Since the meaning of such a construct is unclear, we don't consider
1317 this a loss.  Similarly, juxtaposing two @code{\grace} sections is
1318 syntactically valid, but makes no sense and may cause runtime errors.
1319
1320 Ending a staff or score with grace notes may also generate a run-time
1321 error, since there will be no main note to attach the grace notes to.
1322
1323 The present implementation is not robust and generally kludgy. We expect
1324 it to change after LilyPond 1.4. Syntax changes might also be
1325 implemented.
1326
1327
1328
1329
1330
1331
1332
1333 @c .   {Stem tremolo}
1334 @menu
1335 * Glissando ::                  
1336 * Dynamics::                    
1337 * Crescendo and Decrescendo::   
1338 * Bar lines::                   
1339 * Breath marks::                
1340 @end menu
1341
1342
1343
1344 @c .   {Glissando}
1345 @node Glissando 
1346 @subsubsection Glissando
1347 @cindex Glissando 
1348
1349 @cindex @code{\glissando}
1350
1351 A glissando line can be requested by attaching a @code{\glissando} to a
1352 note:
1353
1354 @quotation
1355 @lilypond[fragment,relative,verbatim]
1356   c'' \glissando c'
1357 @end lilypond
1358 @end quotation
1359
1360 Printing of an additional text (such as @emph{gliss.}) must be done
1361 manually.
1362
1363
1364
1365 @c .   {Dynamics}
1366 @node Dynamics
1367 @subsubsection Dynamics
1368 @cindex Dynamics
1369
1370
1371
1372 @cindex @code{\ppp}
1373 @cindex @code{\pp}
1374 @cindex @code{\p}
1375 @cindex @code{\mp}
1376 @cindex @code{\mf}
1377 @cindex @code{\f}
1378 @cindex @code{\ff}
1379 @cindex @code{\fff}
1380 @cindex @code{\ffff}
1381 @cindex @code{\fp}
1382 @cindex @code{\sf}
1383 @cindex @code{\sff}
1384 @cindex @code{\sp}
1385 @cindex @code{\spp}
1386 @cindex @code{\sfz}
1387 @cindex @code{\rfz}
1388
1389
1390
1391
1392
1393
1394 Dynamic marks are specified by using an identifier after a note:
1395 @code{c4-\ff}.  The available dynamic marks are:
1396 @code{\ppp}, @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f},
1397 @code{\ff}, @code{\fff}, @code{\fff}, @code{\fp}, @code{\sf},
1398 @code{\sff}, @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}.
1399
1400 @c .   {Crescendo and Decrescendo}
1401 @node Crescendo and Decrescendo
1402 @subsubsection Crescendo and Decrescendo
1403
1404 @cindex Crescendo and Decrescendo
1405 @cindex crescendo
1406 @cindex @code{\cr}
1407 @cindex @code{\rc}
1408 @cindex @code{\decr}
1409 @cindex @code{\rced}
1410 @cindex @code{\<}
1411 @cindex @code{\>}
1412 @cindex @code{\"!}
1413
1414
1415
1416 A crescendo mark is started with @code{\cr} and terminated with
1417 @code{\rc}, the textual reverse of @code{cr}.  A decrescendo mark is
1418 started with @code{\decr} and terminated with @code{\rced}.  There are
1419 also shorthands for these marks.  A crescendo can be started with
1420 @code{\<} and a decrescendo can be started with @code{\>}.  Either one
1421 can be terminated with @code{\!}.  Note that @code{\!}  must go before
1422 the last note of the dynamic mark whereas @code{\rc} and @code{\rced} go
1423 after the last note.  Because these marks are bound to notes, if you
1424 want to get several marks during one note, you must use spacer notes.
1425
1426 @lilypond[fragment,verbatim,center]
1427   c'' \< \! c''   d'' \decr e'' \rced 
1428   < f''1 { s4 \< \! s2 \> \! s4 } >
1429 @end lilypond
1430
1431 You can also use a text saying @emph{cresc.} instead of hairpins. Here
1432 is an example how to do it:
1433
1434 @lilypond[fragment,relative,verbatim]
1435   \context Voice {
1436     \property Voice.crescendoText = "cresc."
1437     \property Voice.crescendoSpanner = #'dashed-line
1438     a''2\mf\< a a \!a 
1439   }
1440 @end lilypond
1441
1442
1443
1444 @c .   {Bar lines}
1445 @node Bar lines
1446 @subsubsection Bar lines
1447 @cindex Bar lines
1448
1449 @cindex @code{\bar}
1450 @cindex measure lines
1451 @cindex repeat bars
1452
1453 @example
1454   \bar @var{bartype};
1455 @end example
1456
1457 This is a short-cut for doing
1458 @example
1459   \property Score.whichBar = @var{bartype} 
1460 @end example
1461
1462 You are encouraged to use @code{\repeat} for repetitions.  See
1463 @ref{Repeats}, and the documentation of @code{whichBar} in
1464 @ref{(lilypond-internals)LilyPond context properties}.
1465
1466
1467 [FIXME]
1468
1469 @c .   {Breath marks}
1470 @node Breath marks
1471 @subsubsection Breath marks
1472 @cindex Breath marks
1473
1474
1475
1476 @c .  {Bar check}
1477 @node Bar check
1478 @subsection Bar check
1479 @cindex Bar check
1480
1481 @cindex bar check
1482 @cindex @code{barCheckNoSynchronize}
1483 @cindex @code{|}
1484
1485
1486 Whenever a bar check is encountered during interpretation, a warning
1487 message is issued if it doesn't fall at a measure boundary.  This can
1488 help you find errors in the input.  Depending on the value of
1489 @code{barCheckNoSynchronize}, the beginning of the measure will be
1490 relocated, so this can also be used to shorten measures.
1491
1492 A bar check is entered using the bar symbol, @code{|}
1493
1494
1495
1496
1497
1498
1499
1500
1501 @c . {Piano music}
1502 @node Piano music
1503 @section Piano music
1504 @menu
1505 * Automatic staff changes::     
1506 * Manual staff switches::       
1507 * Pedals::                      
1508 * Arpeggio::                    
1509 * Follow Thread::               
1510 @end menu 
1511
1512
1513 @c .   {Automatic staff changes}
1514 @node Automatic staff changes
1515 @subsection Automatic staff changes
1516 @cindex Automatic staff changes
1517
1518 [\autochange]
1519
1520 @node Manual staff switches
1521 @subsection Manual staff switches
1522
1523 @cindex manual staff switches
1524 @cindex staff switch, manual
1525
1526 @cindex @code{\translator}
1527 @example
1528   \translator @var{contexttype} = @var{name}
1529 @end example
1530
1531 A music expression indicating that the context which is a direct
1532 child of the a context of type @var{contexttype} should be shifted to
1533 a context of type @var{contexttype} and the specified name.
1534
1535 Usually this is used to switch staffs in Piano music, e.g.
1536
1537 @example
1538   \translator Staff = top @var{Music}
1539 @end example
1540
1541
1542 @c .   {Pedals}
1543 @node Pedals
1544 @subsection Pedals
1545 @cindex Pedals
1546
1547 [todo]
1548
1549
1550 @c .   {Arpeggio}
1551 @node Arpeggio
1552 @subsection Arpeggio
1553 @cindex Arpeggio
1554
1555 @cindex broken arpeggio
1556 @cindex @code{\arpeggio}
1557
1558 You can specify an arpeggio sign on a chord by attaching an
1559 @code{\arpeggio} to a note of the chord.
1560
1561
1562 @quotation
1563 @lilypond[fragment,relative,verbatim]
1564   \context Voice <c'\arpeggio e g c>
1565 @end lilypond
1566 @end quotation
1567
1568 When an arpeggio crosses staffs in piano music, you attach an arpeggio
1569 to the chords in both staffs, and set
1570 @code{PianoStaff.connectArpeggios}. LilyPond will connect the arpeggios
1571 in both staffs.
1572
1573 @quotation
1574 @lilypond[fragment,relative,verbatim]
1575   \context PianoStaff <
1576     \property PianoStaff.connectArpeggios = ##t
1577     \context Voice = one  { <c''\arpeggio e g c> }
1578     \context Voice = other { \clef bass;  <c,,\arpeggio e g>}
1579   >  
1580 @end lilypond
1581 @end quotation
1582
1583
1584
1585 @c .    {Follow Thread}
1586 @node Follow Thread
1587 @subsection Follow Thread
1588 @cindex follow thread
1589 @cindex staff switching
1590 @cindex cross staff
1591
1592 [todo: different name, eg. voice line ? ]
1593
1594 @cindex @code{followThread}
1595
1596 Whenever a voice switches to another staff a line connecting the notes
1597 can be printed automatically. This is enabled if the property
1598 @code{PianoStaff.followThread} is set to true:
1599
1600 @quotation
1601 @lilypond[fragment,relative,verbatim]
1602   \context PianoStaff <
1603     \property PianoStaff.followThread = ##t
1604     \context Staff \context Voice {
1605       c'1
1606       \translator Staff=two
1607       b2 a
1608     }
1609     \context Staff=two {\clef bass; \skip 1*2;}
1610   >  
1611 @end lilypond
1612 @end quotation
1613
1614
1615 @c . {Lyrics}
1616 @node Lyrics
1617 @section Lyrics
1618
1619
1620 @menu
1621 * Lyrics mode::                 
1622 * Printing lyrics::             
1623 * Automatic syllable durations::  
1624 @end menu
1625
1626 @c .  {Lyrics mode}
1627 @node Lyrics mode
1628 @subsection Lyrics mode
1629 @cindex Lyrics mode
1630
1631 @cindex lyric mode
1632 @cindex @code{\lyrics}
1633
1634 Lyrics mode is introduced by the keyword @code{\lyrics}.  This mode has
1635 rules that make it easy to include punctuation and diacritical marks in
1636 words: The purpose of Lyrics mode is that you can enter lyrics in @TeX{}
1637 format or a standard encoding without needing quotes.  The precise
1638 definition of this mode is ludicrous, and this will remain so until the
1639 authors of LilyPond acquire a deeper understanding of character
1640 encoding, or someone else steps up to fix this.
1641
1642 A word in Lyrics mode begins with: an alphabetic character, @code{_},
1643 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
1644 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
1645 any 8-bit character with ASCII code over 127, or a two-character
1646 combination of a backslash followed by one of @code{`}, @code{'},
1647 @code{"}, or @code{^}.
1648
1649 Subsequent characters of a word can be any character that is not a digit
1650 and not white space.  One important consequence of this is that a word
1651 can end with `@code{@}}', which may be confusing. However, LilyPond will
1652 issue a warning.  Any @code{_} character which appears in an unquoted
1653 word is converted to a space.  This provides a mechanism for introducing
1654 spaces into words without using quotes.  Quoted words can also be used
1655 in Lyrics mode to specify words that cannot be written with the above
1656 rules.  Here are some examples.  Not all of these words are printable by
1657 @TeX{}.
1658
1659 @example 
1660 Ah!             % a word
1661 2B_||_!2B       % not a word because it starts with a digit
1662 ``Hello''       % not a word because it starts with `
1663 _ _ _ _         % 4 words, each one a space 
1664 @end example 
1665
1666 Since combinations of numbers and dots are used for indicating
1667 durations, you can not enter real numbers in this mode.
1668
1669 @cindex lyrics expressions
1670
1671 Syllables are entered like notes, with pitches replaced by text.  For
1672 example, @code{Twin-4 kle4 twin-4 kle4} enters four syllables, each
1673 with quarter note duration.  Note that the hyphen has no special
1674 meaning for lyrics, and does not introduce special symbols.  See
1675 section @ref{Lexical modes} for a description of what is interpreted as
1676 lyrics.
1677
1678 Spaces can be introduced into a lyric either by using quotes
1679 (@code{"}) or by using an underscore without quotes: @code{He_could4
1680 not4}.  All unquoted underscores are converted to spaces.  Printing
1681 lyrics is discussed in the next section.
1682
1683
1684 @c .  {Printing lyrics}
1685 @node Printing lyrics
1686 @subsection Printing lyrics
1687 @cindex lyrics
1688
1689
1690 Lyric syllables must be interpreted within a @code{Lyrics} context for
1691 printing them. Here is a full example:
1692
1693 @quotation
1694 @lilypond[verbatim]
1695 \score {
1696   <
1697     \notes \transpose c'' {
1698       c d e c | c d e c |
1699       e f g2 | e4 f g2 \bar "|.";
1700     }
1701     \context Lyrics \lyrics { 
1702       Va-4 der Ja- cob Va- der Ja- cob
1703       Slaapt gij nog?2 Slaapt4 gij nog?2
1704     }
1705   >
1706 }
1707
1708 @end lilypond
1709 @end quotation
1710
1711
1712
1713
1714 @cindex extender
1715 @cindex lyric extender
1716
1717 You may want a continuous line after the syllables to show melismata. 
1718 To achieve this effect, add a @code{__} lyric as a separate word
1719 after the lyric to be extended.  This will create an extender, a line
1720 that extends over the entire duration of the lyric.  This line will
1721 run all the way to the start of the next lyric, so you may want to
1722 shorten it by using a blank lyric (using @code{_}).
1723
1724 @quotation
1725
1726 @lilypond[verbatim]
1727 \score {
1728   <
1729     \notes \relative c'' {
1730       a4 () b () c () d | c () d () b () a | c () d () b () a
1731     }
1732     \context Lyrics \lyrics {
1733       foo1 __ | bar2. __ _4 | baz1 __
1734     }
1735   >
1736 }
1737
1738 @end lilypond
1739 @end quotation
1740
1741 @cindex Lyric hyphen
1742
1743 If you want to have hyphens centered between syllables (rather than
1744 attached to the end of the first syllable) you can use the special
1745 `@code{-}@code{-}' lyric as a separate word between syllables.  This
1746 will result in a hyphen which length varies depending on the space
1747 between syllables, and which will be centered between the syllables. 
1748 For example:
1749
1750 @quotation
1751
1752 @lilypond[verbatim]
1753 \score {
1754   <
1755     \notes \transpose c'' {
1756       c d e c | c d e c |
1757       e f g2 | e4 f g2 \bar "|.";
1758     }
1759     \context Lyrics \lyrics {
1760       Va4 -- der Ja -- cob | Va -- der Ja -- cob |
1761       Slaapt gij nog?2 | Slaapt4 gij nog?2
1762     }
1763   >
1764 }
1765
1766 @end lilypond
1767 @end quotation
1768
1769
1770 @c .  {Automatic syllable durations}
1771 @node Automatic syllable durations
1772 @subsection Automatic syllable durations
1773 @cindex Automatic syllable durations
1774
1775
1776 [explain automatic phrasing]
1777 @cindex automatic lyric durations
1778 @cindex @code{\addlyrics}
1779
1780 If you have lyrics that are set to a melody, you can import the rhythm
1781 of that melody into the lyrics using @code{\addlyrics}.  The syntax for
1782 this is
1783 @example
1784   \addlyrics @var{musicexpr1 musicexpr2}
1785 @end example
1786
1787 This means that both @var{musicexpr1} and @var{musicexpr2} are
1788 interpreted, but that every non-command atomic music expression
1789 (``every syllable'') in @var{musicexpr2} is interpreted using timing
1790 of @var{musicexpr1}.
1791 @cindex @code{automaticMelismata}
1792
1793 If the property @code{automaticMelismata} is set in the
1794 context of @var{musicexpr1}, no lyrics will be put on slurred or tied
1795 notes.
1796
1797 @quotation
1798 @lilypond[verbatim,fragment]
1799 \addlyrics
1800 \transpose c'' {
1801   \property Voice.automaticMelismata = ##t
1802   c8 () cis d8. e16 f2
1803 }
1804 \context Lyrics \lyrics {
1805  do4 re mi fa }
1806 @end lilypond
1807 @end quotation
1808
1809 You should use a single rhythm melody, and single rhythm lyrics (a
1810 constant duration is the obvious choice).  If you do not, you will get
1811 undesired effects when using multiple stanzas:
1812
1813 @quotation
1814 @lilypond[verbatim,fragment]
1815 \addlyrics
1816 \transpose c'' {
1817   c8 () cis d8. e16 f2
1818 }
1819 \context Lyrics \lyrics
1820 < { do4 re mi fa }
1821   { do8 re mi fa } >
1822
1823 @end lilypond
1824 @end quotation
1825
1826 It is valid (but probably not very useful) to use notes instead of
1827 lyrics for @var{musicexpr2}.
1828
1829
1830
1831 @c . {Chords}
1832 @node Chords
1833 @section Chords
1834 @cindex Chords
1835
1836 [chords vs. simultaneous music]
1837
1838 @menu
1839 * Chords mode::                 
1840 * Entering named chords::       
1841 * Printing named chords::       
1842 @end menu
1843
1844 @c .  {Chords mode}
1845 @node Chords mode
1846 @subsection Chords mode
1847 @cindex Chords mode
1848
1849 Chord mode is introduced by the keyword
1850 @code{\chords}.  It is similar to Note mode, but
1851 words are also looked up in a chord modifier table (containing
1852 @code{maj}, @code{dim}, etc).
1853
1854 Since combinations of numbers and dots are used for indicating
1855 durations, you can not enter real numbers in this mode.  Dashes
1856 and carets are used to indicate chord additions and subtractions,
1857 so scripts can not be entered in Chord mode.
1858
1859 @c .  {Entering named chords}
1860 @node Entering named chords
1861 @subsection Entering named chords
1862 @cindex Chords names
1863
1864 Chord names are a way to generate simultaneous music expressions that
1865 correspond with traditional chord names.  It can only be used in
1866 Chord mode (see section @ref{Lexical modes}).
1867
1868 @example
1869
1870   @var{tonic}[@var{duration}][@code{-}@var{modifiers}][@code{^}@var{subtractions}][@code{/}@var{inversion}][@code{/+}@var{bass}].
1871 @end example
1872
1873 @var{tonic} should be the tonic note of the chord, and @var{duration}
1874 is the chord duration in the usual notation.  There are two kinds of
1875 modifiers.  One type is @emph{chord additions}, which are obtained by
1876 listing intervals separated by dots.  An interval is written by its
1877 number with an optional @code{+} or @code{-} to indicate raising or
1878 lowering by half a step.  Chord additions has two effects: It adds
1879 the specified interval and all lower odd numbered intervals to the
1880 chord, and it may lower or raise the specified interval.  Intervals
1881 must be separated by a dot (@code{.}).
1882
1883
1884 Throughout these examples, chords have been shifted around the staff
1885 using @code{\transpose}.
1886
1887
1888 @quotation
1889
1890 @lilypond[fragment,verbatim]
1891 \transpose c'' {
1892   \chords {
1893     c1  c:3-       c:7     c:8
1894     c:9 c:9-.5+.7+ c:3-.5- c:4.6.8
1895   }
1896 }
1897
1898 @end lilypond
1899 @end quotation
1900
1901 @cindex @code{aug}
1902 @cindex @code{dim}
1903 @cindex @code{maj}
1904 @cindex @code{sus}
1905
1906 The second type of modifier that may appear after the @code{:} is a
1907 named modifier.  Named modifiers are listed in the file
1908 @file{chord-modifiers.ly}.  The available modifiers are @code{m} and
1909 @code{min} which lower the 3rd half a step, `@code{aug}' which
1910 raises the 5th, `@code{dim}' which lowers the 5th,
1911 `@code{maj}' which adds a raised 7th, and `@code{sus}'
1912 which replaces the 5th with a 4th.
1913
1914 @quotation
1915
1916 @lilypond[fragment,verbatim]
1917 \transpose c'' {
1918   \chords {
1919     c1:m c:min7 c:maj c:aug c:dim c:sus
1920   }
1921 }
1922
1923 @end lilypond
1924 @end quotation
1925  
1926
1927 Chord subtractions are used to eliminate notes from a chord.  The
1928 notes to be subtracted are listed after a @code{^} character,
1929 separated by dots.
1930
1931 @lilypond[fragment,verbatim,center]
1932   \transpose c'' {
1933     \chords {
1934       c1^3 c:7^5.3 c:8^7
1935     }
1936   }
1937 @end lilypond 
1938 @cindex @code{/}
1939
1940 Chord inversions can be specified by appending `@code{/}' and
1941 the name of a single note to a chord.  This has the effect of
1942 lowering the specified note by an octave so it becomes the lowest
1943 note in the chord.  If the specified note is not in the chord, a
1944 warning will be printed.
1945
1946 @lilypond[fragment,verbatim,center]
1947   \transpose c''' {
1948     \chords {
1949       c1 c/e c/g c:7/e
1950     }
1951   }
1952
1953 @end lilypond 
1954 @cindex @code{/+}
1955
1956 Bass notes can be added by `@code{/+}' and
1957 the name of a single note to a chord.  This has the effect of
1958 adding the specified note to the chord, lowered by an octave,
1959 so it becomes the lowest note in the chord.
1960
1961 @lilypond[fragment,verbatim,center]
1962   \transpose c''' {
1963     \chords {
1964       c1 c/+c c/+g c:7/+b
1965     }
1966   }
1967
1968 @end lilypond 
1969
1970 The most interesting application is printing  chord names, which is
1971 explained in the next subsection.
1972
1973 You should not combine @code{\relative} with named chords. [FIXME]
1974
1975 @c .  {Printing named chords}
1976 @node Printing named chords
1977 @subsection Printing named chords
1978
1979
1980
1981
1982
1983 @cindex printing chord names
1984 @cindex chord names
1985 @cindex chords
1986 @cindex @code{ChordNames}
1987 @cindex @code{ChordNameVoice}
1988
1989 For displaying printed chord names, use the @code{ChordNames} and
1990 @code{ChordNameVoice} contexts.  The chords may be entered either using
1991 the notation described above, or directly using simultaneous music.
1992
1993 @quotation
1994 @lilypond[verbatim]
1995 scheme = \notes {
1996   \chords {a1 b c} <d f g>  <e g b>
1997 }
1998 \score {
1999   \notes<
2000     \context ChordNamesVoice \scheme
2001     \context Staff \transpose c'' \scheme
2002   >
2003   \paper { linewidth = -1.; }
2004 }
2005 @end lilypond
2006 @end quotation
2007
2008 You can make the chord changes stand out more by setting property
2009 @code{ChordNames.chordChanges} to true.  This will only display chord
2010 names when there's a change in the chords scheme, but always display the
2011 chord name after a line break:
2012
2013 @c bug
2014 @quotation
2015 @lilypond[verbatim]
2016 scheme = \chords {
2017   c1:m \break c:m c:m c:m d
2018 }
2019
2020 \score {
2021   \notes <
2022     \context ChordNames \scheme
2023     \context Staff \transpose c'' \scheme
2024   >
2025   \paper{
2026     linewidth = 40 * \staffspace;
2027     \translator {
2028       \ChordNamesContext
2029       chordChanges = ##t
2030     }
2031   }
2032 }
2033 @end lilypond
2034 @end quotation
2035
2036
2037
2038 LilyPond examines chords specified as lists of notes to determine a
2039 name to give the chord. LilyPond will not try to
2040 identify chord inversions or added base, which may result in strange
2041 chord names when chords are entered as a list of pitches:
2042
2043 @quotation
2044 @lilypond[verbatim,center]
2045 scheme = \notes {
2046   <c'1 e' g'>
2047   <e' g' c''>
2048   <e e' g' c''>
2049 }
2050
2051 \score {
2052   <
2053     \context ChordNamesVoice \scheme
2054     \context Staff \scheme
2055   >
2056   \paper { linewidth = -1.; }
2057 }
2058 @end lilypond
2059 @end quotation
2060
2061 To specify chord inversions, append @code{/<notename>}.  To specify an
2062 added bass note, append @code{/+<notename}:
2063
2064 @quotation
2065 @lilypond[verbatim,center]
2066 scheme = \chords {
2067   d1 d/a d/+gis
2068 }
2069
2070 \score {
2071   \notes <
2072     \context ChordNames \scheme
2073     \context Staff \transpose c'' \scheme
2074   >
2075   \paper { linewidth = -1.; }
2076 }
2077 @end lilypond
2078 @end quotation
2079
2080 The chord names that LilyPond should print are fully customizable.  The
2081 code to print chord names is written in Scheme. It can be found in
2082 @file{scm/chord-name.scm}.  Chord names are based on Banter style
2083 naming, which is unambiguous and has a logical structure.  Typical
2084 American style chord names are implemented as a variation on Banter
2085 names, they can be selected by setting property @code{ChordName.style}
2086 to @code{american}:
2087
2088 @quotation
2089 @lilypond[verbatim]
2090 \include "english.ly"
2091
2092 scheme = \chords {
2093   c         % Major triad
2094   cs:m      % Minor triad
2095   df:m5-    % Diminished triad
2096   c:5^3     % Root-fifth chord
2097   c:4^3     % Suspended fourth triad
2098   c:5+      % Augmented triad
2099   c:2^3     % "2" chord
2100   c:m5-.7-  % Diminished seventh
2101   c:7+      % Major seventh
2102   c:7.4^3   % Dominant seventh suspended fourth
2103   c:5+.7    % Augmented dominant seventh
2104   c:m5-.7   % "Half" diminished seventh
2105   c:5-.7    % Dominant seventh flat fifth
2106   c:5-.7+   % Major seventh flat fifth
2107   c:m7+     % Minor-major seventh
2108   c:m7      % Minor seventh
2109   c:7       % Dominant seventh
2110   c:6       % Major sixth
2111   c:m6      % Minor sixth
2112   c:9^7     % Major triad w/added ninth
2113   c:6.9^7   % Six/Nine chord
2114   c:9       % Dominant ninth 
2115   c:7+.9    % Major ninth
2116   c:m7.9    % Minor ninth
2117 }
2118
2119 \score {
2120   \notes <
2121     \context ChordNames \scheme
2122     \context Staff \transpose c'' \scheme
2123   >
2124   \paper {
2125     \translator { 
2126       \ChordNamesContext
2127       ChordName \override #'word-space = #1 
2128       ChordName \override #'style = #'american
2129     }
2130   }
2131 }
2132 @end lilypond
2133 @end quotation
2134
2135 Similarly, Jazz style chord names are implemented as a variation on
2136 American style names:
2137 @quotation
2138 @lilypond[verbatim]
2139 scheme = \chords {
2140   % major chords
2141   c
2142   c:6           % 6 = major triad with added sixth
2143   c:maj         % triangle = maj
2144   c:6.9^7       % 6/9 
2145   c:9^7         % add9
2146
2147   % minor chords
2148   c:m           % m = minor triad
2149   c:m.6         % m6 = minor triad with added sixth
2150   c:m.7+        % m triangle = minor major seventh chord
2151   c:3-.6.9^7    % m6/9 
2152   c:m.7         % m7
2153   c:3-.9        % m9
2154   c:3-.9^7      % madd9
2155
2156   % dominant chords
2157   c:7           % 7 = dominant
2158   c:7.5+        % +7 = augmented dominant
2159   c:7.5-        % 7b5 = hard diminished dominant
2160   c:9           % 7(9)
2161   c:9-          % 7(b9)
2162   c:9+          % 7(#9)
2163   c:13^9.11     % 7(13)
2164   c:13-^9.11    % 7(b13)
2165   c:13^11       % 7(9,13)
2166   c:13.9-^11    % 7(b9,13)
2167   c:13.9+^11    % 7(#9,13)
2168   c:13-^11      % 7(9,b13)
2169   c:13-.9-^11   % 7(b9,b13)
2170   c:13-.9+^11   % 7(#9,b13)
2171
2172   % half diminished chords
2173   c:m5-.7               % slashed o = m7b5
2174   c:9.3-.5-     % o/7(pure 9)
2175
2176   % diminished chords
2177   c:m5-.7-      % o = diminished seventh chord
2178 }
2179
2180 \score {
2181   \notes <
2182     \context ChordNames \scheme
2183     \context Staff \transpose c'' \scheme
2184   >
2185   \paper {
2186     \translator { 
2187       \ChordNamesContext
2188       ChordName \override #'word-space = #1 
2189       ChordName \override #'style = #'jazz
2190     }
2191   }
2192 }
2193 @end lilypond
2194 @end quotation
2195
2196 @node Writing parts
2197 @section Writing parts
2198
2199 @c .  {Transpose}
2200 @menu
2201 * Rehearsal marks::             
2202 * Instrument names::            
2203 * Transpose::                   
2204 * Multi measure rests::         
2205 @end menu
2206
2207 [TODO:
2208
2209 partcombine
2210
2211 rehearsal marks
2212
2213 tranposing midi property.
2214
2215 instrument names
2216
2217
2218
2219 @c .   {Rehearsal marks}
2220 @node Rehearsal marks
2221 @subsection Rehearsal marks
2222 @cindex Rehearsal marks
2223 @cindex mark
2224 @cindex @code{\mark}
2225 @cindex @code{Mark_engraver}
2226
2227 @example
2228   \mark @var{unsigned};
2229   \mark @var{string};
2230   \mark ; 
2231 @end example
2232
2233 With this command, you can print a rehearsal mark above the system. You
2234 can provide a number, a string or a markup text as argument. If there is
2235 no argument, the property @code{rehearsalMark} is used and automatically
2236 incremented.
2237
2238 @lilypond[fragment,verbatim]
2239 \relative c'' {
2240   c1 \mark "A2";
2241   c1 \mark ; 
2242   c1 \mark ; 
2243   c1 \mark "12";
2244   c1 \mark #'(music "scripts-segno") ;
2245   c1
2246 }
2247 @end lilypond
2248
2249 @node Instrument names
2250 @subsection Instrument names
2251
2252 You can specify an instrument name for a staff by setting
2253 @code{Staff.instrument} and @code{Staff.instr}. This will print a string
2254 before the start of the staff. For the first start, @code{instrument} is
2255 used, for the next ones @code{instr} is used.
2256
2257 @lilypond[verbatim]
2258 \score { \notes {
2259   \property Staff.instrument = "instr " { c''4 } }
2260   \paper { linewidth = -1.;
2261     \translator { \StaffContext
2262     \consists "Instrument_name_engraver"; } } }
2263 @end lilypond
2264
2265 This requires  that you add the @code{Instrument_name_engraver} to the
2266 staff context.
2267
2268
2269 @node Transpose
2270 @subsection Transpose
2271 @cindex Transpose
2272 @cindex transposition of pitches
2273 @cindex @code{\transpose}
2274
2275 A music expression can be transposed with @code{\transpose}.  The syntax
2276 is
2277 @example
2278   \transpose @var{pitch} @var{musicexpr}
2279 @end example
2280
2281 This means that middle C in @var{musicexpr} is transposed to
2282 @var{pitch}.
2283
2284 @code{\transpose} distinguishes between enharmonic pitches: both
2285 @code{\transpose cis'} or @code{\transpose des'} will transpose up half
2286 a tone.  The first version will print sharps and the second version
2287 will print flats.
2288
2289 @quotation
2290 @lilypond[fragment,verbatim]
2291 \context Staff {
2292   \clef "F";
2293   { \key e \major; c d e f }
2294   \clef "G";
2295   \transpose des'' { \key e \major; c d e f }
2296   \transpose cis'' { \key e \major; c d e f }
2297 }
2298
2299 @end lilypond
2300 @end quotation
2301
2302 If you want to use both @code{\transpose} and @code{\relative}, then
2303 you must use @code{\transpose} first.  @code{\relative} will have no
2304 effect music that appears inside a @code{\transpose}.
2305
2306
2307 @c .  {Multi measure rests}
2308 @node  Multi measure rests
2309 @subsection Multi measure rests
2310 @cindex Multi measure rests
2311
2312 @cindex @code{R}
2313
2314 Multi measure rests are entered using `@code{R}'. It is specifically
2315 meant for entering parts: the rest can expand to fill a score with
2316 rests, or it can be printed as a single multimeasure rest This expansion
2317 is controlled by the property @code{Score.skipBars}. If this is set to true,
2318 Lily will not expand empty measures, and the appropriate number is added
2319 automatically.
2320
2321 @lilypond[fragment,verbatim]
2322  \time 3/4; R2.*2 \property Score.skipBars = ##t R2.*17  R2.*4
2323 @end lilypond
2324
2325 Currently, there is  no way to condense multiple rests into a single
2326 multimeasure rest.
2327
2328 @cindex condensing rests
2329
2330 @c . {Custodes}
2331 @node Custodes
2332 @section Custodes
2333 @cindex Custos
2334 @cindex Custodes
2335
2336 A @emph{custos} (plural: @emph{custodes}; latin word for "guard") is a
2337 staff context symbol that appears at the end of a staff line.  It
2338 anticipates the pitch of the first note(s) of the following line and
2339 thus helps the player or singer to manage line breaks during
2340 performance, thus enhancing readability of a score.
2341
2342 @quotation
2343 @lilypond[verbatim]
2344 \score {
2345   \notes { c'1 d' e' d' \break c' d' e' d' }
2346   \paper {
2347     \translator {
2348       \StaffContext
2349       \consists Custos_engraver;
2350       Custos \override #'style = #'mensural;
2351     }
2352   }
2353 }
2354 @end lilypond
2355 @end quotation
2356
2357 Custodes were frequently used in music notation until the 16th century.
2358 There were different appearences for different notation styles.
2359 Nowadays, they have survived only in special forms of musical notation
2360 such as via the editio vaticana dating back to the beginning of the 20th
2361 century.
2362
2363 For typesetting custodes, just put a @code{Custos_engraver} into the
2364 @code{StaffContext} when declaring the @code{\paper} block.  In this
2365 block, you can also globally control the appearance of the custos symbol
2366 by setting the custos @code{style} property.  Currently supported styles
2367 are @code{vaticana}, @code{medicaea}, @code{hufnagel} and
2368 @code{mensural}.
2369
2370 @quotation
2371 \paper @{
2372   \translator @{
2373       \StaffContext
2374       \consists Custos_engraver;
2375       Custos \override #'style = #'mensural;
2376   @}
2377 @}
2378 @end quotation
2379
2380 The property can also be set locally, for example in a @code{\notes}
2381 block:
2382
2383 @quotation
2384 \notes @{
2385   \property Staff.Custos \override #'style = #'vaticana
2386   c'1 d' e' d' \break c' d' e' d'
2387 @}
2388 @end quotation
2389
2390 @c . {Page layout}
2391 @node Page layout
2392 @section Page layout
2393 @cindex Page layout
2394
2395 @menu
2396 * Paper block::                 
2397 * Paper variables::             
2398 * Font Size::                   
2399 * Paper size::                  
2400 * Line break::                  
2401 * Page break::                  
2402 @end menu
2403
2404 @c .  {Paper block}
2405 @node Paper block
2406 @subsection Paper block
2407 @cindex Paper block
2408
2409 The most important output definition is the @code{\paper} block, for
2410 music notation.  The syntax is
2411
2412 @example
2413   @code{\paper @{} [@var{paperidentifier}] @var{items} @code{@}}
2414 @end example
2415
2416 where each of the items is one of
2417
2418 @itemize @bullet
2419   @item  An assignment.  The assignment must be terminated by a
2420        semicolon.  
2421
2422   @item  A context definition.  See section @ref{Context definitions} for
2423        more information on context definitions.
2424
2425   @item  \stylesheet  declaration.  Its syntax is
2426        @example
2427                 \stylesheet @var{alist}
2428        @end example
2429
2430         See @file{font.scm} for details of @var{alist}.
2431 @end itemize
2432
2433 @c .  {Paper variables}
2434 @node Paper variables
2435 @subsection Paper variables 
2436 @cindex Paper variables
2437
2438 The paper block has some variables you may want to use or change:
2439
2440 @table @code
2441 @cindex @code{indent}
2442   @item @code{indent}  
2443     The indentation of the first line of music.
2444 @cindex @code{staffspace}
2445
2446   @item @code{staffspace}
2447     The distance between two staff lines, calculated from the center
2448     of the lines.  You should use either this or @code{stafflinethickness}
2449     as a unit for distances you modify.
2450   
2451 @cindex @code{linewidth}
2452   @item @code{linewidth}  
2453     Sets the width of the lines.
2454
2455 If set to a negative value, a single
2456     unjustified line is produced.
2457
2458 @cindex @code{textheight}
2459
2460   @item @code{textheight}  
2461     Sets the total height of the music on each page. Only used by
2462     ly2dvi.
2463 @cindex @code{interscoreline}
2464
2465   @item @code{interscoreline}  
2466     Sets the spacing between the score lines. Defaults to 16 pt.
2467 @cindex @code{interscorelinefill}
2468
2469   @item @code{interscorelinefill}  
2470     If set to a positive number, the distance between the score 
2471     lines will stretch in order to fill the full page. In that
2472     case @code{interscoreline} specifies the minimum spacing.
2473     Defaults to 0.
2474 @cindex @code{stafflinethickness}
2475
2476   @item @code{stafflinethickness}  
2477     Determines the thickness of staff lines, and also acts as a scaling
2478     parameter for other line thicknesses.
2479 @end table
2480
2481
2482
2483 @c .  {Font size}
2484 @node Font Size
2485 @subsection Font size
2486 @cindex font size
2487
2488 The Feta font provides musical symbols at six different sizes.  These
2489 fonts are 11 point, 13 point, 16 point, 20 point,
2490 23 point, and 26 point.  The point size of a font is the
2491 height of the five lines in a staff when displayed in the font.
2492
2493 Definitions for these sizes are the files @file{paperSZ.ly}, where
2494 @code{SZ} is one of 11, 13, 16, 20, 23 and 26.  If you include any of
2495 these files, the identifiers @code{paperEleven}, @code{paperThirteen},
2496 @code{paperSixteen}, @code{paperTwenty}, @code{paperTwentythree}, and
2497 @code{paperTwentysix} are defined respectively.  The default
2498 @code{\paper} block is also set.
2499
2500 The font definitions are generated using a Scheme function. For more
2501 details, see the file @file{font.scm}.
2502
2503
2504
2505 @c .  {Paper size}
2506 @node Paper size
2507 @subsection Paper size
2508 @cindex Paper size
2509
2510 @cindex paper size
2511 @cindex page size
2512 @cindex @code{papersize}
2513
2514 To change the paper size, you must first set the
2515 @code{papersize} variable at top level.  Set it to
2516 the strings @code{a4}, @code{letter}, or @code{legal}.  After this
2517 specification, you must set the font as described above.  If you want
2518 the default font, then use the 20 point font.  The new paper size will
2519 not take effect if the font is not loaded and selected afterwards.
2520
2521 @example
2522         papersize = "a4"
2523         \include "paper16.ly"
2524
2525         \score @{
2526                 ...
2527                 \paper @{ \paperSixteen @}
2528         @}
2529 @end example
2530
2531 The file "paper16.ly" will now include a file named @file{a4.ly}, which
2532 will set the paper variables @code{hsize} and @code{vsize} (used by
2533 @code{ly2dvi})
2534
2535
2536
2537
2538
2539
2540
2541 @c .  {Line break}
2542 @node Line break
2543 @subsection Line break
2544
2545 @cindex line breaks
2546 @cindex breaking lines
2547
2548 Line breaks are normally computed automatically. They are chosen such
2549 that the resulting spacing has low variation, and looks neither cramped
2550 nor loose.
2551
2552 Occasionally you might want to override the automatic breaks; you can do
2553 this by specifying @code{\break}. This will force a line break at this
2554 point. Do remember that line breaks can only occur at places where there
2555 are barlines.  If you want to have a line break where there is no
2556 barline, you can force a barline by entering @code{\bar "";}.
2557
2558 Similarly, @code{\noBreak} forbids a  line break at a certain point.
2559
2560 @cindex @code{\penalty}
2561
2562 The @code{\break} and @code{\noBreak} commands are defined in terms of
2563 the penalty command:
2564 @example
2565   \penalty @var{int} @code{;}
2566 @end example
2567
2568 This imposes   encourages or discourages LilyPond to make a line break
2569 at this point.
2570
2571 @strong{Warning} do not use @code{\penalty} directly. It is rather
2572 kludgy, and slated for rewriting.
2573
2574 @c .  {Page break}
2575 @node Page break
2576 @subsection Page break
2577
2578 @cindex page breaks
2579 @cindex breaking pages
2580
2581
2582 Page breaks are normally computed by @TeX{}, so they are not under direct
2583 control.  However, you can insert a commands into the @file{.tex} output to
2584 instruct @TeX{} where to break pages. For more details, see  the
2585 example file @file{input/test/between-systems.ly}
2586
2587 [or -> Tricks? ]
2588
2589
2590
2591
2592
2593
2594 @c . {Sound}
2595 @node Sound
2596 @section Sound
2597 @cindex Sound
2598 @menu
2599 * MIDI block::                  
2600 * MIDI instrument names::       
2601 * Tempo::                       
2602 @end menu
2603
2604 @c .  {MIDI block}
2605 @node MIDI block
2606 @subsection MIDI block
2607 @cindex MIDI block
2608
2609
2610 The MIDI block is analogous to the paper block, but it is somewhat
2611 simpler.  The @code{\midi} block can contain:
2612 @cindex MIDI block
2613
2614 @itemize @bullet
2615   @item  a @code{\tempo} definition
2616   @item  context definitions
2617 @end itemize
2618
2619 Assignments in the @code{\midi} block are not allowed.
2620
2621
2622
2623 @cindex context definition
2624
2625 Context definitions follow precisely the same syntax as within the
2626 \paper block.  Translation modules for sound are called performers.
2627 The contexts for MIDI output are defined in @file{ly/performer.ly}.
2628
2629
2630 @c .  {MIDI instrument names}
2631 @node MIDI instrument names
2632 @subsection MIDI instrument names
2633 @cindex instrument names
2634 @cindex @code{Staff.midiInstrument}
2635 @cindex @code{Staff.instrument}
2636
2637 The MIDI instrument name is set by the @code{Staff.midiInstrument}
2638 property or, if that property is not set, the @code{Staff.instrument}
2639 property.  The instrument name should be chosen from the following list.
2640 If the selected string does not exactly match, then LilyPond uses the
2641 default piano.
2642
2643 [FIXME: to appendix ]
2644
2645
2646 @example 
2647 "acoustic grand"            "contrabass"           "lead 7 (fifths)"
2648 "bright acoustic"           "tremolo strings"      "lead 8 (bass+lead)"
2649 "electric grand"            "pizzicato strings"    "pad 1 (new age)"
2650 "honky-tonk"                "orchestral strings"   "pad 2 (warm)"
2651 "electric piano 1"          "timpani"              "pad 3 (polysynth)"
2652 "electric piano 2"          "string ensemble 1"    "pad 4 (choir)"
2653 "harpsichord"               "string ensemble 2"    "pad 5 (bowed)"
2654 "clav"                      "synthstrings 1"       "pad 6 (metallic)"
2655 "celesta"                   "synthstrings 2"       "pad 7 (halo)"
2656 "glockenspiel"              "choir aahs"           "pad 8 (sweep)"
2657 "music box"                 "voice oohs"           "fx 1 (rain)"
2658 "vibraphone"                "synth voice"          "fx 2 (soundtrack)"
2659 "marimba"                   "orchestra hit"        "fx 3 (crystal)"
2660 "xylophone"                 "trumpet"              "fx 4 (atmosphere)"
2661 "tubular bells"             "trombone"             "fx 5 (brightness)"
2662 "dulcimer"                  "tuba"                 "fx 6 (goblins)"
2663 "drawbar organ"             "muted trumpet"        "fx 7 (echoes)"
2664 "percussive organ"          "french horn"          "fx 8 (sci-fi)"
2665 "rock organ"                "brass section"        "sitar"
2666 "church organ"              "synthbrass 1"         "banjo"
2667 "reed organ"                "synthbrass 2"         "shamisen"
2668 "accordion"                 "soprano sax"          "koto"
2669 "harmonica"                 "alto sax"             "kalimba"
2670 "concertina"                "tenor sax"            "bagpipe"
2671 "acoustic guitar (nylon)"   "baritone sax"         "fiddle"
2672 "acoustic guitar (steel)"   "oboe"                 "shanai"
2673 "electric guitar (jazz)"    "english horn"         "tinkle bell"
2674 "electric guitar (clean)"   "bassoon"              "agogo"
2675 "electric guitar (muted)"   "clarinet"             "steel drums"
2676 "overdriven guitar"         "piccolo"              "woodblock"
2677 "distorted guitar"          "flute"                "taiko drum"
2678 "guitar harmonics"          "recorder"             "melodic tom"
2679 "acoustic bass"             "pan flute"            "synth drum"
2680 "electric bass (finger)"    "blown bottle"         "reverse cymbal"
2681 "electric bass (pick)"      "skakuhachi"           "guitar fret noise"
2682 "fretless bass"             "whistle"              "breath noise"
2683 "slap bass 1"               "ocarina"              "seashore"
2684 "slap bass 2"               "lead 1 (square)"      "bird tweet"
2685 "synth bass 1"              "lead 2 (sawtooth)"    "telephone ring"
2686 "synth bass 2"              "lead 3 (calliope)"    "helicopter"
2687 "violin"                    "lead 4 (chiff)"       "applause"
2688 "viola"                     "lead 5 (charang)"     "gunshot"
2689 "cello"                     "lead 6 (voice)" 
2690 @end example 
2691
2692
2693
2694
2695
2696 @c .  {Tempo}
2697 @node Tempo
2698 @subsection Tempo
2699 @cindex Tempo
2700 @cindex beats per minute
2701 @cindex metronome marking
2702
2703 @cindex @code{\tempo}
2704 @example
2705   \tempo @var{duration} = @var{perminute} @code{;}
2706 @end example
2707
2708 Used to specify the tempo.  For example, @code{\tempo 4 = 76;} requests
2709 output with 76 quarter notes per minute.
2710
2711
2712
2713
2714
2715 @c . {Music entry}
2716 @node Music entry
2717 @section Music entry
2718 @cindex Music entry
2719 @menu
2720 * Relative::                    
2721 * Point and click::             
2722 @end menu
2723
2724
2725
2726 @c .  {Relative}
2727 @node Relative
2728 @subsection Relative
2729 @cindex Relative
2730 @cindex relative octave specification
2731
2732 Octaves are specified by adding @code{'} and @code{,} to pitch names.
2733 When you copy existing music, it is easy to accidentally put a pitch in
2734 the wrong octave and hard to find such an error.  To prevent these
2735 errors, LilyPond features octave entry.
2736
2737 @cindex @code{\relative}
2738 @example
2739   \relative @var{startpitch} @var{musicexpr}
2740 @end example
2741
2742 The octave of notes that appear in @var{musicexpr} are calculated as
2743 follows: If no octave changing marks are used, the basic interval
2744 between this and the last note is always taken to be a fourth or less.
2745   The octave changing marks @code{'} and @code{,} can then
2746 be added to raise or lower the pitch by an extra octave.  Upon entering
2747 relative mode, an absolute starting pitch must be specified that will
2748 act as the predecessor of the first note of @var{musicexpr}.
2749
2750 This distance is determined without regarding accidentals: a
2751 @code{fisis} following a @code{ceses} will be put above the
2752 @code{ceses}.
2753
2754 Entering scales is straightforward in relative mode.
2755
2756 @lilypond[fragment,verbatim,center]
2757   \relative c'' {
2758     g a b c d e f g g, g
2759   }
2760 @end lilypond
2761
2762 And octave changing marks are used for intervals greater than a fourth.
2763
2764 @lilypond[fragment,verbatim,center]
2765   \relative c'' {
2766     c g c f, c' a, e'' }
2767 @end lilypond
2768
2769 If the preceding item is a chord, the first note of the chord is used
2770 to determine the first note of the next chord.  But other notes
2771 within the second chord are determined by looking at the immediately
2772 preceding note.
2773
2774 @lilypond[fragment,verbatim,center]
2775   \relative c' {
2776     c <c e g> 
2777     <c' e g>
2778     <c, e' g>
2779   }
2780 @end lilypond 
2781 @cindex @code{\notes}
2782
2783 The pitch after the @code{\relative} contains a notename.  To parse
2784 the pitch as a notename, you have to be in note mode, so there must
2785 be a surrounding @code{\notes} keyword (which is not
2786 shown here).
2787
2788 The relative conversion will not affect @code{\transpose} or
2789 @code{\relative} sections in its argument.  If you want to use
2790 relative within transposed music, you must place an additional
2791 @code{\relative} inside the @code{\transpose}.
2792
2793
2794 @c .  {Point and click}
2795 @node Point and click
2796 @subsection Point and click
2797
2798 [todo]
2799
2800 @c . {Engravers}
2801 @node Engravers
2802 @section Engravers
2803 @cindex engravers
2804 @menu
2805 * Selecting contexts::          
2806 * Context definitions::         
2807 * Notation Contexts::           
2808 @end menu
2809
2810 @c .  {Music expressions}
2811 @node Selecting contexts
2812 @subsection Selecting contexts
2813
2814 @cindex @code{\context}
2815 @cindex context selection
2816
2817 @example
2818   \context @var{contexttype} [= @var{contextname}] @var{musicexpr}
2819 @end example
2820
2821 Interpret @var{musicexpr} within a context of type @var{contexttype}. 
2822 If the context does not exist, it will be created.  The new context
2823 can optionally be given a name.  
2824
2825
2826
2827 @c .  {Context definitions}
2828 @node Context definitions
2829 @subsection Context definitions
2830
2831 @cindex context definition
2832 @cindex translator definition
2833 @cindex engraver hacking
2834
2835
2836 A notation contexts is defined by the following information
2837
2838 @enumerate 1
2839   @item  A name.
2840
2841   @item  The LilyPond modules that do the actual conversion of music to
2842        notation.  Each module is a so-called
2843        @emph{engraver}
2844 @cindex engraver
2845 .
2846
2847   @item  How these modules should cooperate, i.e. which ``cooperation
2848        module'' should be used.  This cooperation module is a special
2849        type of engraver.
2850
2851   @item  What other contexts the context can contain,
2852
2853   @item  What properties are defined.
2854 @end enumerate
2855
2856 A context definition has this syntax:
2857
2858 @example
2859
2860   \translator @code{@{}
2861                       @var{translatorinit} @var{translatormodifierlist}
2862                     @code{@}}
2863 @end example
2864
2865 @var{translatorinit} can be an identifier or 
2866 @example
2867   \type @var{typename} @code{;}
2868 @end example
2869 where @var{typename} is one of
2870
2871 @table @code
2872 @cindex @code{Engraver_group_engraver}
2873   @item @code{Engraver_group_engraver}  
2874     The standard cooperation engraver.
2875 @cindex @code{Score_engraver}
2876
2877   @item @code{Score_engraver}  
2878     This is cooperation module that should be in the top level context.
2879 @cindex @code{Grace_engraver_group}
2880
2881   @item @code{Grace_engraver_group}  
2882     This is a special cooperation module (resembling
2883     @code{Score_engraver}) that is used to created an embedded
2884     `miniscore'.
2885 @end table 
2886
2887 @var{translatormodifierlist} is a list of items where each item is
2888 one of
2889
2890 @itemize @bullet
2891   @item  @code{\consists} @var{engravername} @code{;}  
2892     Add @var{engravername} to the list of modules in this context. 
2893   The order of engravers added with @code{\consists} is
2894     significant.
2895   
2896   @item  @code{\consistsend} @var{engravername} @code{;}  
2897     Analogous to @code{\consists}, but makes sure that
2898     @var{engravername} is always added to the end of the list of
2899     engravers.
2900
2901     Some engraver types need to be at the end of the list; this
2902     insures they are put there, and stay there, if a user adds or
2903     removes engravers.  This command is usually not needed for
2904     end-users.
2905     
2906   @item  @code{\accepts} @var{contextname} @code{;}  
2907     Add @var{contextname} to the list of  context this context can
2908     contain.  The first listed context is the context to create by
2909     default.
2910
2911   @item @code{\denies}. The opposite of @code{\accepts}. Added for
2912 completeness, but is never used in practice.
2913  
2914   
2915   @item  @code{\remove} @var{engravername} @code{;}  
2916     Remove a previously added (with @code{\consists}) engraver.
2917   
2918   @item  @code{\name} @var{contextname} @code{;}  
2919     This sets name of the context, e.g. @code{Staff}, @code{Voice}.  If
2920     the name is not specified, the translator won't do anything.
2921
2922   @item  @var{propname} @code{=} @var{value} @code{;}  
2923     A property assignment.
2924 @end itemize
2925
2926 In the @code{\paper} block, it is also possible to define translator
2927 identifiers.  Like other block identifiers, the identifier can only
2928 be used as the very first item of a translator.  In order to define
2929 such an identifier outside of @code{\score}, you must do
2930
2931 @quotation
2932
2933 @example 
2934 \paper @{
2935   foo = \translator @{ @dots{} @}
2936 @}
2937 \score @{
2938   \notes @{
2939     @dots{}
2940   @}
2941   \paper @{
2942     \translator @{ \foo @dots{} @}
2943   @}
2944 @} 
2945 @end example 
2946
2947 @end quotation
2948
2949
2950 @cindex paper types, engravers, and pre-defined translators
2951
2952 Some pre-defined identifiers can simplify modification of
2953 translators.  The pre-defined identifiers are:
2954
2955 @table @code
2956 @cindex @code{StaffContext}
2957   @item @code{StaffContext}  
2958     Default Staff context. 
2959 @cindex @code{RhythmicStaffContext}
2960
2961   @item @code{RhythmicStaffContext}  
2962     Default RhythmicStaff context. 
2963 @cindex @code{VoiceContext}
2964
2965   @item @code{VoiceContext}  
2966     Default Voice context.  
2967 @cindex @code{ScoreContext}
2968
2969   @item @code{ScoreContext}  
2970     Default Score context. 
2971
2972 @cindex @code{HaraKiriStaffContext}
2973
2974   @item @code{HaraKiriStaffContext}  
2975     Staff context that does not print if it only contains rests. 
2976     Useful for orchestral scores.@footnote{Harakiri, also called
2977     Seppuku, is the ritual suicide of the Japanese Samourai warriors.}
2978
2979 @end table
2980
2981 Using these pre-defined values, you can remove or add items to the
2982 translator:
2983
2984 @quotation
2985
2986 @example 
2987 \paper @{
2988   \translator @{
2989     \StaffContext
2990     \remove Some_engraver;
2991     \consists Different_engraver;
2992   @}
2993 @} 
2994 @end example 
2995
2996 @end quotation
2997
2998       
2999
3000
3001 @c .  {Notation Contexts}
3002 @node Notation Contexts
3003 @subsection Notation Contexts
3004
3005 @cindex notation contexts
3006
3007 Notation contexts are objects that only exist during a run of
3008 LilyPond.  During the interpretation phase of LilyPond, the Music
3009 expression contained in a @code{\score} block is interpreted in time
3010 order.  This is the order in which humans read, play, and write
3011 music.
3012
3013 A context is an object that holds the reading state of the
3014 expression; it contains information like
3015
3016 @itemize @bullet
3017   @item What notes are playing at this point?
3018   @item What symbols will be printed at this point?
3019   @item In what style will they printed?
3020   @item What is the current key signature, time signature, point within
3021        the measure, etc.?
3022 @end itemize
3023
3024 Contexts are grouped hierarchically: A @code{Voice} context is
3025 contained in a @code{Staff} context (because a staff can contain
3026 multiple voices at any point), a @code{Staff} context is contained in
3027 a @code{Score}, @code{StaffGroup}, or @code{ChoirStaff} context (because
3028 these can all contain multiple staffs).
3029
3030 Contexts associated with sheet music output are called @emph{notation
3031 contexts}, those for sound output are called performance contexts.
3032
3033 Contexts are created either manually or automatically.  Initially, the
3034 top level music expression is interpreted by the top level context (the
3035 @code{Score} context).  When a atomic music expression (i.e. a note, a
3036 rest, etc.), a nested set of contexts is created that can process these
3037 atomic expressions, as in this example:
3038
3039 @example
3040 \score @{ \notes @{ c4 @} @} 
3041 @end example 
3042
3043 The sequential music, `@code{@{ c4 @}}' is interpreted by @code{Score}
3044 context. When the note @code{c4} itself is interpreted, a set of
3045 contexts is needed that will accept notes.  The default for this is a
3046 @code{Voice} context, contained in a @code{Staff} context.  Creation of
3047 these contexts results in the staff being printed.
3048
3049 @cindex context
3050
3051 You can also create contexts manually, and you probably have to do so
3052 if you want to typeset complicated multiple part material.  If a
3053 `@code{\context} @var{name} @var{musicexpr}' expression is encountered
3054 during the interpretation phase, the @var{musicexpr} argument will be
3055 interpreted with a context of type @var{name}.  If you specify a name,
3056 the specific context with that name is searched.
3057
3058 [type vs id]
3059
3060 If a context of the specified type and name can not be found, a new
3061 one is created.  For example,
3062
3063 @quotation
3064
3065 @lilypond[verbatim]
3066 \score {
3067   \notes \relative c'' {
3068     c4 <d4 \context Staff = "another" e4> f
3069   }
3070 }
3071
3072 @end lilypond
3073 @end quotation
3074
3075 In this example, the @code{c} and @code{d} are printed on the
3076 default staff.  For the @code{e}, a context Staff called
3077 @code{another} is specified; since that does not exist, a new
3078 context is created.  Within @code{another}, a (default) Voice context
3079 is created for the @code{e4}.  When all music referring to a
3080 context is finished, the context is ended as well.  So after the
3081 third quarter, @code{another} is removed.
3082
3083 Almost all music expressions inherit their interpretation context
3084 from their parent.  In other words, suppose that the syntax for a
3085 music expression is
3086
3087 @example
3088
3089   \keyword @var{musicexpr1} @var{musicexpr2} @dots{}
3090 @end example
3091
3092 When the interpretation of this music expression starts, the context
3093 for @var{musicexpr1}, @var{musicexpr2}, etc. is that of the total
3094 expression.
3095
3096 Lastly, you may wonder, why this:
3097
3098 @quotation
3099
3100 @example 
3101 \score @{
3102   \notes \relative c'' @{
3103     c4 d4 e4
3104   @}
3105 @} 
3106 @end example 
3107
3108 @end quotation
3109
3110 doesn't result in this:
3111
3112 @lilypond[]
3113
3114   \score {
3115     \notes \relative c'' {
3116       <c4> <d4> <e4>
3117     }
3118   }
3119
3120 @end lilypond
3121
3122 For the @code{c4}, a default @code{Staff} (with a contained
3123 @code{Voice}) context is created.  After the @code{c4} ends, no
3124 music refers to this default staff, so it would be ended, with the
3125 result shown.  To prevent this inconvenient behavior, the context to
3126 which the sequential music refers is adjusted during the
3127 interpretation.  So after the @code{c4} ends, the context of the
3128 sequential music is also the default @code{Voice} context. 
3129 The @code{d4} gets interpreted in the same context
3130 as @code{c4}.
3131
3132 Properties that are set in one context are inherited by all of the
3133 contained contexts.  This means that a property valid for the
3134 @code{Voice} context can be set in the @code{Score} context (for
3135 example) and thus take effect in all @code{Voice} contexts.
3136
3137 Properties can be preset within the @code{\translator} block
3138 corresponding to the appropriate context.  In this case, the syntax
3139 is
3140
3141 @example
3142   @var{propname} @code{=} @var{value}
3143 @end example
3144
3145 This assignment happens before interpretation starts, so a
3146 @code{\property} expression will override any predefined settings.
3147
3148 The property settings are used during the interpretation phase.  They
3149 are read by the LilyPond modules where interpretation contexts are
3150 built of.  These modules are called @emph{translators}.  Translators for
3151 notation are called @emph{engravers}, and translators for sound are
3152 called @emph{performers}.
3153
3154
3155
3156 @c . {Syntactic details}
3157 @node Syntactic details
3158 @section Syntactic details
3159 @cindex Syntactic details
3160 @menu
3161 * Top level::                   
3162 * Identifiers::                 
3163 * Music expressions::           
3164 * Manipulating music expressions::  
3165 * Assignments::                 
3166 * Lexical details::             
3167 * Lexical modes::               
3168 * Ambiguities::                 
3169 @end menu
3170
3171 @c .  {Top level}
3172 @node Top level
3173 @subsection Top level
3174 @cindex Top level
3175
3176 This section describes what you may enter at top level.
3177
3178
3179 @unnumberedsubsec Score definition
3180 @cindex score definition
3181
3182 The output is generated combining a music expression with an output
3183 definition.  A score block has the following syntax:
3184
3185 @example
3186   \score @{ @var{musicexpr} @var{outputdefs} @}
3187 @end example
3188
3189 @var{outputdefs} are zero or more output definitions.  If no output
3190 definition is supplied, the default @code{\paper} block will be added.
3191
3192
3193 @c .   {Score}
3194 @subsubsection Score
3195 @cindex Score
3196
3197 @c .   {Paper}
3198 @subsubsection Paper
3199 @cindex Paper
3200
3201 @c .   {Midi}
3202 @subsubsection Midi
3203 @cindex Midi
3204
3205 @c .   {Header}
3206 @subsubsection Header
3207 @cindex Header
3208 @cindex @code{\header}
3209
3210 The syntax is
3211
3212 @example
3213   \header @{ @var{key1} = @var{val1};
3214 @cindex @code{ly2dvi}
3215              @var{key2} = @var{val2}; @dots{} @}
3216 @end example
3217
3218
3219 A header describes the file's contents.  It can also appear in a
3220 @code{\score} block.  Tools like @code{ly2dvi} can use this
3221 information for generating titles.  Key values that are used by
3222 @code{ly2dvi} are: title, subtitle, composer, opus, poet, instrument,
3223 metre, arranger, piece and tagline.
3224
3225 It is customary to put the @code{\header} at the top of the file.
3226
3227 @subsubsection Default output
3228
3229 A @code{\midi} or @code{\paper} block at top-level sets the default
3230
3231 paper block for all scores that lack an explicit paper block.
3232
3233 @c .  {Identifiers}
3234 @node Identifiers
3235 @subsection Identifiers
3236 @cindex  Identifiers
3237
3238 All of the information in a LilyPond input file, is represented as a
3239 Scheme value. In addition to normal Scheme data types (such as pair,
3240 number, boolean, etc.), LilyPond has a number of specialized data types,
3241
3242 @itemize @bullet
3243 @item Input
3244 @item c++-function
3245 @item Music
3246 @item Identifier
3247 @item Translator_def
3248 @item Duration
3249 @item Pitch
3250 @item Score
3251 @item Music_output_def
3252 @item Moment (rational number)
3253 @end itemize
3254
3255 LilyPond also includes some transient object types. Objects of these
3256 types are built during a LilyPond run, and do not `exist' per se within
3257 your input file. These objects are created as a result of your input
3258 file, so you can include commands in the input to manipulate them,
3259 during a lilypond run.
3260
3261 @itemize @bullet
3262 @item Grob: short for Graphical object. See @ref{Grobs}. 
3263 @item Molecule: device-independent page output object,
3264 including dimensions.  Produced by some Grob functions
3265 See @ref{Molecules}
3266 @item Translator: object that produces audio objects or Grobs. This is
3267 not yet user accessible.
3268 @item Font_metric: object representing a font. (See @ref{Font metrics})
3269
3270 @end itemize
3271
3272
3273 @node Music expressions
3274 @subsection Music expressions
3275
3276 @cindex music expressions
3277
3278 Music in LilyPond is entered as a music expression.  Notes, rests, lyric
3279 syllables are music expressions, and you can combine music expressions
3280 to form new ones, for example by enclosing a list of expressions in
3281 @code{\sequential @{ @}} or @code{< >}.  In this example, a compound
3282 expression is formed out of the quarter note @code{c} and a quarter note
3283 @code{d}:
3284
3285 @example 
3286 \sequential @{ c4 d4 @} 
3287 @end example 
3288
3289 @cindex Sequential music
3290 @cindex @code{\sequential}
3291 @cindex sequential music
3292 @cindex @code{<}
3293 @cindex @code{>}
3294 @cindex Simultaneous music
3295 @cindex @code{\simultaneous}
3296
3297 The two basic compound  music expressions are simultaneous  and
3298 sequential music.
3299
3300 @example
3301   \sequential @code{@{} @var{musicexprlist} @code{@}}
3302   \simultaneous @code{@{} @var{musicexprlist} @code{@}}
3303 @end example
3304 For both, there is a shorthand:
3305 @example
3306   @code{@{} @var{musicexprlist} @code{@}}
3307 @end example
3308 for sequential and
3309 @example
3310   @code{<} @var{musicexprlist} @code{>}
3311 @end example
3312 for simultaneous music.
3313 Other compound music expressions include
3314 @example
3315  \repeat @var{expr}
3316  \transpose @var{pitch} @var{expr}
3317  \apply @var{func} @var{expr}
3318  \context @var{type} = @var{id} @var{expr}
3319  \times @var{fraction} @var{expr}
3320 @end example
3321
3322 In principle, the way in which you nest sequential and simultaneous to
3323 produce music is not relevant.  In the following example, three chords
3324 are expressed in two different ways:
3325
3326 @lilypond[fragment,verbatim,center]
3327   \notes \context Voice {
3328     <a c'> <b  d' > <c' e'>
3329     < { a b  c' } { c' d' e' } >
3330   }
3331 @end lilypond
3332
3333 However, in some cases, LilyPond will also try to choose contexts, and
3334 use the structure of the music expression  to do so. This can have
3335 undesired effects: for example, LilyPond will create a separate staff
3336 for each note if you start a @code{\score} with a  chord:
3337 @lilypond[verbatim,center]
3338   \score {
3339     \notes <c''4 e''>
3340     \paper {
3341       linewidth = -1.;
3342     }
3343   }
3344 @end lilypond
3345   The solution is to explicitly instantiate the context you desire.
3346 In this case this is typically a Voice context
3347 @lilypond[verbatim,center]
3348   \score {
3349     \notes\context Voice <c''4 e''>
3350     \paper {
3351       linewidth = -1.;
3352     }
3353   }
3354 @end lilypond
3355 If you use @code{\context Staff} you will get separate stems for each
3356 note head, leading to collisions, so don't use that.
3357
3358
3359
3360 @c . {Manipulating music expressions}
3361 @node Manipulating music expressions
3362 @subsection  Manipulating music expressions
3363
3364 The @code{\apply} mechanism gives you access to the internal
3365 representation of music. You can write Scheme-functions that operate
3366 directly on it. The syntax is 
3367 @example
3368         \apply #@var{func} @var{music}
3369 @end example
3370 This means that @var{func} is applied to @var{music}.  The function
3371 @var{func} should return a music expression.
3372
3373 This example replaces the text string of a script. It also shows a dump
3374 of the music it processes, which is useful if you want to know more
3375 about how music is stored.
3376 @lilypond[verbatim]
3377 #(define (testfunc x)
3378         (if (equal? (ly-get-mus-property x 'text) "foo")
3379                 (ly-set-mus-property x 'text "bar"))
3380         ;; recurse
3381         (ly-set-mus-property x 'elements
3382           (map testfunc (ly-get-mus-property x 'elements)))
3383         (display x)
3384         x        
3385 )
3386 \score { \notes
3387   \apply #testfunc { c4_"foo" }
3388
3389 @end lilypond
3390
3391 For more information on what is possible, see the @ref{Tricks} and the
3392 automatically generated documentation.
3393
3394 As always: directly accessing internal representations is dangerous: the
3395 implementation is subject to changes, so you should not use this if
3396 possible.
3397
3398
3399 @c .   {Assignments}
3400 @node Assignments
3401 @subsection Assignments
3402 @cindex Assignments
3403
3404 Identifiers allow objects to be assigned to names during the parse
3405 stage.  To assign an identifier, you use @var{name}@code{=}@var{value}
3406 and to refer to an identifier, you preceed its name with a backslash:
3407 `@code{\}@var{name}'.  @var{value} is any valid Scheme value or any of
3408 the input-types listed above.  Identifier assignments can appear at top
3409 level in the LilyPond file, but also in @code{\paper} blocks.
3410
3411 Semicolons are forbidden after top level assignments, but mandatory in
3412 other places. The rules about semicolons and assignments are very
3413 confusing, but when LilyPond input evolves more towards Scheme, we hope
3414 that this problem will grow smaller.
3415
3416 An identifier can be created with any string for its name, but you will
3417 only be able to refer to identifiers whose names begin with a letter,
3418 being entirely alphabetical.  It is impossible to refer to an identifier
3419 whose name is the same as the name of a keyword.
3420
3421 The right hand side of an identifier assignment is parsed completely
3422 before the assignment is done, so it is allowed to redefine an
3423 identifier in terms of its old value, e.g.
3424
3425 @example
3426 foo = \foo * 2.0
3427 @end example
3428
3429 When an identifier is referenced, the information it points to is
3430 copied.  For this reason, an identifier reference must always be the
3431 first item in a block.
3432 @example
3433 \paper  @{
3434         foo = 1.0
3435         \paperIdent % wrong and invalid
3436 @}
3437
3438 \paper @{
3439         \paperIdent % correct
3440         foo = 1.0 @}
3441 @end example
3442
3443 @c .  {Lexical details}
3444 @node Lexical details
3445 @subsection Lexical details
3446 @cindex Lexical details
3447 @menu
3448 @end menu
3449
3450 @c .   {Comments}
3451 @subsubsection Comments
3452 @cindex Comments
3453
3454 @cindex @code{%}
3455
3456
3457 A one line comment is introduced by a @code{%} character. 
3458 Block comments are started by @code{%@{} and ended by @code{%@}}. 
3459 They cannot be nested.
3460
3461 @c .  {Direct Scheme}
3462 @subsubsection Direct Scheme
3463 @cindex Scheme
3464 @cindex GUILE
3465 @cindex Scheme, in-line code
3466
3467
3468 LilyPond contains a Scheme interpreter (the GUILE library) for
3469 internal use. In some places Scheme expressions also form valid syntax:
3470 whereever it is allowed,
3471 @example
3472   #@var{scheme}
3473 @end example
3474 evaluates the specified Scheme code. If this is used at toplevel, then
3475 the result is discarded. Example:
3476 @example
3477   \property Staff.TestObject \override #'foobar =  #(+ 1 2)
3478 @end example
3479
3480 @code{\override} expects two Scheme expressions, so there are two Scheme
3481 expressions. The first one is a symbol (@code{foobar}), the second one
3482 an integer (namely, 3).
3483
3484 Scheme is a full-blown programming language, and a full discussion is
3485 outside the scope of this document. Interested readers are referred to
3486 the website @uref{http://www.schemers.org/} for more information on
3487 Scheme.
3488
3489
3490 @c .   {Keywords}
3491 @subsubsection Keywords
3492 @cindex Keywords
3493
3494
3495 Keywords start with a backslash, followed by a number of lower case
3496 alphabetic characters.  These are all the keywords.
3497
3498 @example
3499 apply arpeggio autochange spanrequest commandspanrequest
3500 simultaneous sequential accepts alternative bar breathe
3501 char chordmodifiers chords clef cm consists consistsend
3502 context denies duration dynamicscript elementdescriptions
3503 font grace header in lyrics key mark pitch
3504 time times midi mm name pitchnames notes outputproperty
3505 override set revert partial paper penalty property pt
3506 relative remove repeat addlyrics partcombine score
3507 script stylesheet skip textscript tempo translator
3508 transpose type
3509 @end example
3510
3511 @c .   {Integers}
3512 @subsubsection Integers
3513
3514 @cindex integers
3515 @cindex @code{+}
3516 @cindex @code{-}
3517 @cindex @code{*}
3518 @cindex @code{/}
3519
3520 Formed from an optional minus sign followed by digits.  Arithmetic
3521 operations cannot be done with integers, and integers cannot be mixed
3522 with reals.
3523
3524 @c .   {Reals}
3525 @subsubsection Reals
3526 @cindex real numbers
3527
3528
3529
3530
3531
3532 Formed from an optional minus sign and a sequence of digits followed
3533 by a @emph{required} decimal point and an optional exponent such as
3534 @code{-1.2e3}.  Reals can be built up using the usual operations:
3535 `@code{+}', `@code{-}', `@code{*}', and
3536 `@code{/}', with parentheses for grouping.
3537
3538 @cindex @code{\mm},
3539 @cindex @code{\in}
3540 @cindex @code{\cm}
3541 @cindex @code{\pt}
3542 @cindex dimensions
3543
3544 A real constant can be followed by one of the dimension keywords:
3545 @code{\mm} @code{\pt}, @code{\in}, or @code{\cm}, for millimeters,
3546 points, inches and centimeters, respectively.  This converts the number
3547 to a real that is the internal representation of dimensions.
3548
3549
3550 @c .   {Strings}
3551 @subsubsection Strings
3552 @cindex string
3553 @cindex concatenate
3554
3555 Begins and ends with the @code{"} character.  To include a @code{"}
3556 character in a string write @code{\"}.  Various other backslash
3557 sequences have special interpretations as in the C language.  A string
3558 that contains no spaces can be written without the quotes.  See
3559 @ref{Lexical modes} for details on unquoted strings; their
3560 interpretation varies depending on the situation.  Strings can be
3561 concatenated with the @code{+} operator.
3562
3563 The tokenizer accepts the following commands. They have no grammatical
3564 function, hence they can appear anywhere in the input.
3565
3566
3567 @c .   {Main input}
3568 @subsubsection Main input
3569 @cindex Main input
3570
3571 @cindex @code{\maininput}
3572
3573 The @code{\maininput} command is used in init files to signal that the
3574 user file must be read. This command cannot be used in a user file.
3575
3576 @c .   {File inclusion}
3577 @subsubsection Main input
3578 @cindex Main input
3579
3580 @subsubsection File inclusion
3581 @cindex @code{\include}
3582 @example
3583   \include @var{filename}
3584 @end example
3585
3586 Include @var{filename}.  The argument @var{filename} may be a quoted string (an
3587 unquoted string will not work here!) or a string identifier.  The full
3588 filename including the @file{.ly} extension must be given,
3589
3590 @subsubsection Version information 
3591 @cindex @code{\version}
3592 @example
3593   \version @var{string} ;
3594 @end example
3595
3596 Specify the version of LilyPond that a file was written for.  The
3597 argument is a version string in quotes, for example @code{"1.2.0"}. 
3598 This is used to detect invalid input, and to aid
3599 @code{convert-ly}  a tool that automatically upgrades input files. See
3600 See @ref{convert-ly} for more information on @code{convert-ly}.
3601
3602 @cindex convert-ly
3603
3604
3605 @c .   {Pitch names}
3606 @subsubsection Defining pitch names
3607 @cindex Lexical modes
3608 @cindex definining pitch names
3609 @cindex pitch names, definining
3610 @cindex note names
3611 @cindex chord modifier names
3612
3613 A @code{\paper} block at top level sets the default paper block.  A
3614 @code{\midi} block at top level works similarly.
3615
3616 @c .   {Assignments}
3617 @subsubsection Assignments
3618 @cindex assignments
3619 @cindex @code{#}
3620
3621 Identifier assignments may appear at top level.  @ref{Assignments}
3622
3623
3624
3625 @c .    {Direct scheme}
3626 @subsubsection Direct scheme
3627 @cindex Direct scheme
3628
3629 Scheme statements maybe issued to produce interesting side-effects. 
3630
3631
3632 @c .  {Lexical modes}
3633 @node Lexical modes
3634 @subsection Lexical modes
3635 @cindex Lexical modes
3636 @cindex input mode
3637 @cindex mode, input 
3638 @cindex @code{\notes}
3639 @cindex @code{\chords}
3640 @cindex @code{\lyrics}
3641
3642 To simplify entering notes, lyrics, and chords, LilyPond has three
3643 special input modes on top of the default mode: note, lyrics and chords
3644 mode.  These input modes change the way that normal, unquoted words are
3645 interpreted: for example, the word @code{cis} may be interpreted as a
3646 C-sharp, as a lyric syllable `cis' or as a C-sharp major triad
3647 respectively.
3648
3649 A mode switch is entered as a compound music expressions
3650 @example
3651 @code{\notes} @var{musicexpr}
3652 @code{\chords} @var{musicexpr}
3653 @code{\lyrics}  @var{musicexpr}.
3654 @end example
3655
3656 In each of these cases, these expressions do not add anything to the
3657 meaning of their arguments.  They are just a way to indicate that the
3658 arguments should be parsed in indicated mode.  The modes are treated in
3659 more detail in the sections @ref{Note entry}, @ref{Lyrics} and
3660 @ref{Chords}.
3661
3662 You may nest different input modes.
3663
3664 @c .  {Ambiguities}
3665 @node Ambiguities
3666 @subsection Ambiguities
3667 @cindex ambiguities
3668 @cindex grammar
3669
3670
3671 The grammar contains a number of ambiguities. We hope to resolve them at
3672 some time.
3673
3674 @itemize @bullet
3675   @item  The assignment
3676
3677          @example 
3678 foo = bar 
3679 @end example 
3680
3681        can be interpreted as making a string identifier @code{\foo}
3682        containing @code{"bar"}, or a music identifier @code{\foo}
3683        containing the syllable `bar'.
3684
3685   @item  The assignment
3686
3687          @example 
3688 foo = -6 
3689 @end example 
3690
3691        can be interpreted as making an integer identifier
3692        containing -6, or a Request identifier containing the
3693        fingering `6' (with neutral direction).
3694
3695   @item  If you do a nested repeat like
3696
3697        @quotation
3698
3699 @example 
3700 \repeat @dots{}
3701 \repeat @dots{}
3702 \alternative 
3703 @end example 
3704
3705        @end quotation
3706
3707        then it is ambiguous to which @code{\repeat} the
3708        @code{\alternative} belongs.  This is the classic if-then-else
3709        dilemma.  It may be solved by using braces.
3710
3711   @item  (an as yet unidentified ambiguity :-)
3712 @end itemize
3713
3714
3715
3716
3717 @c . {Unsorted}
3718 @node Unsorted
3719 @section Unsorted
3720
3721 [mucho todo]
3722
3723 Translation?
3724
3725 @cindex properties
3726 @unnumberedsubsec Translation property
3727
3728 [todo: add \set/\override/\revert]
3729
3730
3731 @cindex @code{\property}
3732 @example
3733   \property @var{contextname}.@var{propname} =  @var{value}
3734 @end example
3735
3736 Sets the @var{propname} property of the context @var{contextname} to
3737 the specified @var{value}.  All three arguments are strings. 
3738 Depending on the context, it may be necessary to quote the strings or
3739 to leave space on both sides of the dot.
3740
3741
3742 @cindex output properties
3743 @unnumberedsubsec Output properties
3744
3745 These allow you to tweak what is happening in the back-end
3746 directly. If you want to control every detail of the output
3747 formatting, this is the feature to use. The downside to this is that
3748 you need to know exactly how the backend works. Example:
3749
3750
3751 @lilypond[fragment,verbatim]
3752 \relative c'' { c4
3753   \context Staff \outputproperty
3754   #(make-type-checker 'note-head-interface)
3755   #'extra-offset = #'(0.5 . 0.75)
3756   <c8 e g> }
3757 @end lilypond
3758
3759 This selects all note heads occurring at current staff level, and sets
3760 the @code{extra-offset} of those heads to @code{(0.5,0.75)}, shifting
3761 them up and right.
3762
3763 Use of this feature is entirely on your own risk: if you use this, the
3764 result will depend very heavily on the implementation of the backend,
3765 which we change regularly and unscrupulously.
3766
3767
3768 Don't move the finger 2, only text "m.d." ...
3769 @lilypond[verbatim]
3770 #(define (make-text-checker text)
3771    (lambda (grob) (equal? text (ly-get-elt-property grob 'text))))
3772
3773 \score {    
3774   \notes\relative c''' {
3775     \property Voice.Stem \set #'direction = #1
3776     \outputproperty #(make-text-checker "m.d.")
3777       #'extra-offset = #'(-3.5 . -4.5)
3778     a^2^"m.d."    
3779   }
3780   \paper { linewidth = -1.; }
3781 }
3782 @end lilypond
3783
3784
3785 @menu
3786 * Text markup::                 
3787 @end menu
3788
3789 @node Text markup
3790 @subsection Text markup
3791
3792 LilyPond has an internal mechanism to typeset texts: you can
3793 form text markup expressions by composing scheme expressions
3794 in the following way:
3795
3796 @lilypond[verbatim]
3797 \score { \notes \relative c' {
3798   b-#"text"
3799   c-#'(bold "text")
3800   d-#'(lines "one" (bold "text"))
3801   e-#'(music (named "noteheads-2" "flags-u3"))
3802 }
3803 \paper { linewidth = 10.\cm; } }
3804 @end lilypond
3805
3806 Formally, Scheme markup text is defined as follows:
3807
3808 @example
3809 text: string | (markup sentence)
3810 sentence: text | sentence text
3811 markup: property | abbrev | style
3812 property: (@var{key} . @var{value})
3813 abbrev: @code{rows lines roman music bold italic named super sub text}
3814 style: @var{fontstyle}
3815 @end example
3816
3817 The @var{key}-@var{value} pair is a grob property. [Why is this
3818 useful?]  The following abbreviations are currently defined:
3819
3820 @table @code
3821 @item rows
3822 horizontal mode: set all text on one line (default)
3823 @item lines
3824  vertical mode: set every text on new line
3825 @item roman
3826  select roman font
3827 @item music
3828  select feta font
3829 @item bold
3830  select bold series
3831 @item italic
3832  select italic shape
3833 @item named
3834  lookup by character name
3835 @item text
3836  plain text lookup (by character value)
3837 @item super
3838  superscript
3839 @item sub
3840  subscript
3841 @end table
3842
3843
3844 @var{fontstyle} may be any of @code{finger volta timesig mmrest mark
3845 script large Large dynamic}
3846
3847
3848 [kern, raise ??]
3849
3850 [I still think that the semantics are weird, but well]
3851
3852 @c .{Local emacs vars}
3853 @c Local variables:
3854 @c mode: texinfo
3855 @c minor-mode: font-lock
3856 @c minor-mode: outline
3857 @c outline-layout: (-1 : 0)
3858 @c outline-use-mode-specific-leader: "@c \."
3859 @c outline-primary-bullet: "{"
3860 @c outline-stylish-prefixes: nil
3861 @c outline-override-protect: t
3862 @c End:
3863