]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/notation.itely
release commit
[lilypond.git] / Documentation / user / notation.itely
1 @c Note: -*-texinfo-*-
2 @c This file is part of lilypond.tely
3
4 @c A menu is needed before every deeper *section nesting of @node's; run
5 @c     M-x texinfo-all-menus-update
6 @c to automatically fill in these menus before saving changes
7
8 @node Notation manual
9 @chapter Notation manual
10
11 This chapter describes all the different types of notation supported
12 by LilyPond. It is intended as a reference for users that are already
13 somewhat familiar with LilyPond.
14
15 @menu
16 * Note entry::                  
17 * Easier music entry::          
18 * Staff notation::              
19 * Polyphony::                   
20 * Beaming::                     
21 * Accidentals::                 
22 * Expressive marks::            
23 * Repeats::                     
24 * Rhythmic music::              
25 * Piano music::                 
26 * Vocal music::                 
27 * Tablatures::                  
28 * Chord names::                 
29 * Orchestral music::            
30 * Ancient notation::            
31 * Contemporary notation::       
32 * Special notation::            
33 * Sound::                       
34 @end menu
35
36 @c FIXME: Note entry vs Music entry at top level menu is confusing.
37
38 @node Note entry
39 @section Note entry
40 @cindex Note entry
41
42 This section is about basic notation elements notes, rests and
43 related constructs, such as stems, tuplets and ties.
44
45 @menu
46 * Notes::                       
47 * Pitches::                     
48 * Chromatic alterations::       
49 * Chords::                      
50 * Rests::                       
51 * Skips::                       
52 * Durations::                   
53 * Stems::                       
54 * Ties::                        
55 * Tuplets::                     
56 @end menu
57
58
59 @node Notes
60 @subsection Notes
61
62
63 A note is printed by specifying its pitch and then its duration
64 @footnote{Notes constitute the most basic elements of LilyPond input,
65 but they do not form valid input on their own without a @code{\score}
66 block.  However, for the sake of brevity and simplicity we will
67 generally omit @code{\score} blocks and @code{\paper} declarations in
68 this manual.}
69
70 @quotation
71 @lilypond[fragment,verbatim]
72 cis'4 d'8 e'16 c'16
73 @end lilypond
74 @end quotation
75
76
77 @node Pitches
78 @subsection Pitches
79
80 @cindex Pitch names
81 @cindex Note specification
82 @cindex pitches
83 @cindex entering notes
84
85 The most common syntax for pitch entry is used in @code{\chords} and
86 @code{\notes} mode.  In these modes, pitches may be designated by
87 names.  The notes are specified by the letters @code{a} through
88 @code{g}, while the octave is formed with notes ranging from @code{c}
89 to @code{b}.  The pitch @code{c} is an octave below middle C and the
90 letters span the octave above that C
91
92 @quotation
93 @lilypond[fragment,verbatim]
94 \clef bass
95 a,4 b, c d e f g a b c' d' e' \clef treble f' g' a' b' c''
96 @end lilypond
97 @end quotation
98
99 @cindex note names, Dutch
100
101 A sharp is formed by adding @code{-is} to the end of a pitch name and
102 a flat is formed by adding @code{-es}.  Double sharps and double flats
103 are obtained by adding @code{-isis} or @code{-eses}.  These
104 names are the Dutch note names.  In Dutch, @code{aes} is contracted to
105 @code{as}, but both forms are accepted. Similarly, both
106 @code{es} and @code{ees} are accepted.
107
108 Half-flats and half-sharps are formed by adding @code{-eh} and
109 @code{-ih}; the following is a series of Cs with increasing pitches
110
111 @cindex quarter tones
112 @cindex semi-flats, semi-sharps
113
114 @quotation
115 @lilypond[verbatim,relative=3]
116 ceses4
117 ceseh
118 ces
119 ceh
120 c
121 cih
122 cis 
123 cisih
124 cisis
125 @end lilypond
126 @end quotation  
127
128 There are predefined sets of note names for various other languages.
129 To use them,  include the language specific init file.  For
130 example: @code{\include "english.ly"}.  The available language files
131 and the note names they define are
132
133 @anchor{note name}
134 @anchor{note names}
135 @example 
136                         Note Names               sharp       flat
137 nederlands.ly  c   d   e   f   g   a   bes b   -is         -es
138 english.ly     c   d   e   f   g   a   bf  b   -s/-sharp   -f/-flat
139                                                -x (double)
140 deutsch.ly     c   d   e   f   g   a   b   h   -is         -es
141 norsk.ly       c   d   e   f   g   a   b   h   -iss/-is    -ess/-es
142 svenska.ly     c   d   e   f   g   a   b   h   -iss        -ess
143 italiano.ly    do  re  mi  fa  sol la  sib si  -d          -b
144 catalan.ly     do  re  mi  fa  sol la  sib si  -d/-s       -b 
145 espanol.ly     do  re  mi  fa  sol la  sib si  -s          -b 
146
147 @end example 
148
149 @cindex @code{'}
150 @cindex @code{,}
151
152
153
154 The optional octave specification takes the form of a series of
155 single quote (`@code{'}') characters or a series of comma
156 (`@code{,}') characters.  Each @code{'} raises the pitch by one
157 octave; each @code{,} lowers the pitch by an octave
158
159 @quotation
160 @lilypond[fragment,verbatim]
161 c' c'' es' g' as' gisis' ais'
162 @end lilypond
163 @end quotation
164
165
166 @refcommands
167
168 Notes can be hidden and unhidden with the following commands
169
170 @cindex @code{\hideNotes}
171 @code{\hideNotes}, 
172 @cindex @code{\unHideNotes}
173 @code{\unHideNotes}.
174
175
176 @seealso
177
178 Program reference: @internalsref{NoteEvent}, and @internalsref{NoteHead}.
179
180 @node Chromatic alterations
181 @subsection Chromatic alterations
182
183 Normally accidentals are printed automatically, but you may also
184 print them manually.  A reminder accidental
185 @cindex reminder accidental
186 @cindex @code{?}
187 can be forced by adding an exclamation mark @code{!}
188 after the pitch.  A cautionary accidental
189 @cindex cautionary accidental
190 @cindex parenthesized accidental
191 (i.e. an accidental within parentheses) can be obtained by adding the
192 question mark `@code{?}' after the pitch
193
194 @quotation
195 @lilypond[fragment,verbatim]
196 cis' cis' cis'! cis'?
197 @end lilypond
198 @end quotation
199
200
201 @seealso
202
203 The automatic production of accidentals can be tuned in many
204 ways. For more information, refer to @ref{Accidentals}.
205
206
207 @refbugs
208
209 There are no generally accepted standards for denoting three quarter
210 flats, so LilyPond's symbol does not conform to any standard.
211
212 @node Chords
213 @subsection Chords
214
215 A chord is formed by a enclosing a set of pitches in @code{<} and
216 @code{>}. A chord may be followed by  a duration, and a set of
217 articulations, just like simple notes.
218
219 @quotation
220 @lilypond[relative=1]
221 <c e g>4 <c>8 <>8 
222 @end lilypond
223 @end quotation
224
225 @node Rests
226 @subsection Rests
227 @cindex Rests
228
229
230
231
232 Rests are entered like notes, with the note name @code{r}
233
234 @quotation
235 @lilypond[raggedright,verbatim]
236 r1 r2 r4 r8
237 @end lilypond
238 @end quotation
239
240 Whole bar rests, centered in middle of the bar,
241 must be done  with multi-measure rests. They are discussed in
242 @ref{Multi measure rests}.
243
244
245 A rest's vertical position may be explicitly specified by entering a
246 note with the @code{\rest} keyword appended. This makes manual
247 formatting in polyphonic music easier.  Rest collision testing will
248 leave these rests alone
249
250 @quotation
251 @lilypond[raggedright,verbatim]
252 a'4\rest d'4\rest
253 @end lilypond
254 @end quotation
255
256 @seealso
257
258 Program reference: @internalsref{RestEvent}, and @internalsref{Rest}.
259
260
261 @c FIXME: naming.
262 @node Skips
263 @subsection Skips
264 @cindex Skip
265 @cindex Invisible rest
266 @cindex Space note
267
268 An invisible rest (also called a `skip') can be entered like a note
269 with note name `@code{s}' or with @code{\skip @var{duration}}
270
271 @quotation
272 @lilypond[raggedright,verbatim]
273 a2 s4 a4 \skip 1 a4 
274 @end lilypond
275 @end quotation
276
277 The @code{s} syntax is only available in note mode and chord mode.  In
278 other situations, you should use the @code{\skip} command
279
280 @quotation
281 @lilypond[raggedright,verbatim]
282 \score {
283   \new Staff <<
284     { \time 4/8 \skip 2 \time 4/4 } 
285     \notes\relative c'' { a2 a1 }
286   >>
287 }
288 @end lilypond
289 @end quotation
290
291 The skip command is merely an empty musical placeholder.  It does not
292 produce any output, not even transparent output.
293
294 The @code{s} skip command does create @internalsref{Staff} and
295 @internalsref{Voice} when necessary, similar to note and rest
296 commands. For example, the following results in an empty staff.
297
298 @quotation
299 @lilypond[raggedright,verbatim]
300 \score { \notes { s4 } } 
301 @end lilypond
302 @end quotation
303
304 The same fragment using @code{\skip} results in an empty page.
305
306 @seealso
307
308 Program reference: @internalsref{SkipEvent}, @internalsref{SkipMusic}.
309
310
311
312 @node Durations
313 @subsection Durations
314
315
316 @cindex duration
317
318
319 In Note, Chord, and Lyrics mode, durations are designated by numbers
320 and dots: durations are entered as their reciprocal values.  For example,
321 a quarter note is entered using a @code{4} (since it is a 1/4 note), while
322 a half note is entered using a @code{2} (since it is a 1/2 note).  For notes
323 longer than a whole you must use variables
324
325 @example 
326 c'\breve  
327 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64 
328 r\longa r\breve  
329 r1 r2 r4 r8 r16 r32 r64 r64 
330 @end example 
331
332 @quotation
333 @lilypond[noindent]
334 \score {
335   \notes \relative c'' {
336     a\breve*1/2  \autoBeamOff
337     a1 a2 a4 a8 a16 a32 a64 a64 
338     r\longa*1/4 r\breve  *1/2
339     r1 r2 r4 r8 r16 r32 r64 r64 
340   }
341   \paper {
342     raggedright = ##t
343     \context {
344       \StaffContext
345         \remove "Clef_engraver"
346         \override StaffSymbol #'transparent = ##t 
347         \override TimeSignature #'transparent = ##t
348         \override BarLine #'transparent = ##t
349         \consists "Pitch_squash_engraver"
350     }
351   }
352 }
353 @end lilypond
354 @end quotation
355
356
357 If the duration is omitted then it is set to the previously entered
358 duration. The default for the first note is a quarter note.  The duration
359 can be followed by dots (`@code{.}') in order to obtain dotted note
360 lengths
361 @cindex @code{.}
362
363 @quotation
364 @lilypond[fragment,verbatim]
365 a' b' c''8 b' a'4 a'4. b'4.. c'8.
366 @end lilypond
367 @end quotation
368 @cindex @code{r}
369 @cindex @code{s}
370
371 You can alter the length of duration by a fraction @var{N/M}
372 appending `@code{*}@var{N/M}' (or `@code{*}@var{N}' if @var{M=1}). This
373 will not affect the appearance of the notes or rests produced.
374
375 In the following example, the first three notes take up exactly two
376 beats, but no triplet bracket is printed.
377 @quotation
378 @lilypond[fragment,relative=3,verbatim]
379 \time 2/4
380 a4*2/3 gis4*2/3 a4*2/3
381 a4
382 @end lilypond
383 @end quotation
384
385 @refcommands
386
387 Dots are normally moved up to avoid staff lines, except in polyphonic
388 situations. The following commands may be used to force a particular
389 direction manually
390
391 @cindex @code{\dotsUp}
392 @code{\dotsUp}, 
393 @cindex @code{\dotsDown}
394 @code{\dotsDown}, 
395 @cindex @code{\dotsBoth}
396 @code{\dotsBoth}.
397
398 @seealso
399
400 This manual: @ref{Tuplets}
401
402 Program reference: @internalsref{Dots}, and @internalsref{DotColumn}. 
403
404 @node Stems
405 @subsection Stems
406
407 Whenever a note is found, a @internalsref{Stem} object is created
408 automatically. For whole notes and rests, they are also created but
409 made invisible.
410
411 @refcommands
412
413 @cindex @code{\stemUp}
414 @code{\stemUp}, 
415 @cindex @code{\stemDown}
416 @code{\stemDown}, 
417 @cindex @code{\stemBoth}
418 @code{\stemBoth}. 
419
420
421 @node Ties
422 @subsection Ties
423
424 @cindex Tie
425 @cindex ties
426 @cindex @code{~}
427
428 A tie connects two adjacent note heads of the same pitch.  The tie in
429 effect extends the length of a note.  Ties should not be confused with
430 slurs, which indicate articulation, or phrasing slurs, which indicate
431 musical phrasing.  A tie is entered using the tilde symbol `@code{~}'
432
433 @quotation
434 @lilypond[fragment,verbatim]
435  e' ~ e' <c' e' g'> ~ <c' e' g'>
436 @end lilypond
437 @end quotation
438
439 When a tie is applied to a chord, all note heads whose pitches match
440 are connected.  When no note heads match, no ties will be created.
441
442 In its meaning a tie is just a way of extending a note duration, similar
443 to the augmentation dot; in the following example there are two ways of 
444 notating exactly the same concept
445 @c
446 @quotation
447 @lilypond[fragment,raggedright]
448 \time 3/4 c'2. c'2 ~ c'4
449 @end lilypond
450 @end quotation
451 If you need to tie a lot of  notes over bars, it may be easier to use automatic
452 note splitting (see @ref{Automatic note splitting}).
453
454 @refcommands
455
456
457 @cindex @code{\tieUp}
458 @code{\tieUp}, 
459 @cindex @code{\tieDown}
460 @code{\tieDown}, 
461 @cindex @code{\tieBoth}
462 @code{\tieBoth}, 
463 @cindex @code{\tieDotted}
464 @code{\tieDotted}, 
465 @cindex @code{\tieSolid}
466 @code{\tieSolid}.
467
468 @seealso 
469
470 In this manual: @ref{Automatic note splitting}.
471
472 Program reference: @internalsref{TieEvent}, @internalsref{Tie}.
473
474 For tying only a subset of the note heads of a pair of chords, see
475 @inputfileref{input/regression,tie-chord-partial.ly}.
476
477 @refbugs
478
479
480 Switching staves when a tie is active will not produce a slanted tie.
481
482 Formatting of ties is a difficult subject. The results are often not
483 optimal.
484
485
486
487 @node Tuplets
488 @subsection Tuplets
489
490 @cindex tuplets
491 @cindex triplets
492 @cindex @code{\times}
493
494 Tuplets are made out of a music expression by multiplying all durations
495 with a fraction
496
497 @cindex @code{\times}
498 @example
499 \times @var{fraction} @var{musicexpr}
500 @end example
501
502 @noindent
503 The duration of @var{musicexpr} will be multiplied by the fraction.
504 The fraction's denominator will be printed over the notes, optionally
505 with a bracket.  The most common tuplet is the triplet in which 3
506 notes have the length of 2, so the notes are 2/3 of their written
507 length
508
509 @quotation
510 @lilypond[fragment,verbatim]
511 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
512 @end lilypond
513 @end quotation
514
515 The property @code{tupletSpannerDuration} specifies how long each
516 bracket should last.  With this, you can make lots of tuplets while
517 typing @code{\times} only once, saving lots of typing. In the next
518 example, there are two triplets shown, while @code{\times} was only
519 used once
520
521 @quotation
522 @lilypond[fragment,relative=1,raggedright,verbatim]
523 \set tupletSpannerDuration = #(ly:make-moment 1 4)
524 \times 2/3 { c'8 c c c c c }
525 @end lilypond
526 @end quotation
527
528 The format of the number is determined by the property
529 @code{tupletNumberFormatFunction}.  The default prints only the
530 denominator, but if it is set to the Scheme function
531 @code{fraction-tuplet-formatter}, @var{num}:@var{den} will be printed
532 instead.
533
534
535 @cindex @code{tupletNumberFormatFunction}
536 @cindex tuplet formatting 
537
538
539 @refcommands
540
541 @cindex @code{\tupletUp}
542 @code{\tupletUp}, 
543 @cindex @code{\tupletDown}
544 @code{\tupletDown}, 
545 @cindex @code{\tupletBoth}
546 @code{\tupletBoth}.
547
548 @seealso
549
550 Program reference: @internalsref{TupletBracket}, and @internalsref{TimeScaledMusic}.
551
552 Examples: @inputfileref{input/regression,tuplet-nest.ly}.
553
554 @refbugs
555
556 Nested tuplets are not formatted automatically.  In this case, outer
557 tuplet brackets should be moved manually, which is demonstrated in
558 @inputfileref{input/regression,tuplet-nest.ly}.
559
560
561
562 @node Easier music entry
563 @section Easier music entry
564 @cindex Music entry
565
566 This section deals with tricks and features of the input language that
567 were added solely to help entering music, finding and correcting
568 mistakes.  There are also external tools that make debugging easier.
569 See @ref{Point and click} for more information.
570
571 It is also possible to enter and edit music using other programs.  For
572 example, GUI interfaces, or MIDI sequencers. Refer to the LilyPond
573 website for more information.
574
575
576 @menu
577 * Relative octaves::            
578 * Octave check::                
579 * Bar check::                   
580 * Skipping corrected music::    
581 * Automatic note splitting::    
582 @end menu
583
584
585
586
587 @node Relative octaves
588 @subsection Relative octaves
589 @cindex Relative
590 @cindex relative octave specification
591
592 Octaves are specified by adding @code{'} and @code{,} to pitch names.
593 When you copy existing music, it is easy to accidentally put a pitch
594 in the wrong octave and hard to find such an error. The relative
595 octave mode prevents these errors: a single error puts the rest of the
596 piece off by one octave
597
598 @cindex @code{\relative}
599 @example
600   \relative @var{startpitch} @var{musicexpr}
601 @end example
602
603 The octave of notes that appear in @var{musicexpr} are calculated as
604 follows: If no octave changing marks are used, the basic interval
605 between this and the last note is always taken to be a fourth or
606 less. This distance is determined without regarding alterations; a
607 @code{fisis} following a @code{ceses} will be put above the
608 @code{ceses}.
609
610 The octave changing marks @code{'} and @code{,} can be added to raise
611 or lower the pitch by an extra octave.  Upon entering relative mode,
612 an absolute starting pitch must be specified that will act as the
613 predecessor of the first note of @var{musicexpr}.
614
615 Here is the relative mode shown in action
616 @quotation
617 @lilypond[fragment,raggedright,verbatim]
618 \relative c'' {
619   b c d c b c bes a 
620 }
621 @end lilypond
622 @end quotation
623
624 Octave changing marks are used for intervals greater than a fourth
625 @quotation
626 @lilypond[fragment,verbatim]
627 \relative c'' {
628   c g c f, c' a, e''
629 }
630 @end lilypond
631 @end quotation
632
633 If the preceding item is a chord, the first note of the chord is used
634 to determine the first note of the next chord
635
636 @quotation
637 @lilypond[fragment,verbatim]
638 \relative c' {
639   c <c e g> 
640   <c' e g>
641   <c, e' g>
642 }
643 @end lilypond
644 @end quotation 
645 @cindex @code{\notes}
646
647 The pitch after the @code{\relative} contains a note name.  To parse
648 the note name as a pitch, it must surrounded by @code{\notes}
649
650 The relative conversion will not affect @code{\transpose},
651 @code{\chords} or @code{\relative} sections in its argument.  If you
652 want to use relative within transposed music, you must place an
653 additional @code{\relative} inside the @code{\transpose}.
654
655 @node Octave check
656 @subsection Octave check
657
658
659 Octave checks make octave errors easier to correct:  a note may be
660 followed by @code{=}@var{quotes} which indicates what its absolute
661 octave should be.  In the following example,
662 @example
663 \relative c'' @{ c='' b=' d,='' @}        
664 @end example
665
666 @noindent
667 @c take care with @code, adds confusing quotes.
668 the d will generate a warning, because a d'' is expected, but a d' is
669 found.  In the output, the octave is corrected for this and the
670 following notes.
671
672
673
674 There is also a syntax that is separate from the notes.
675 @example
676 \octave @var{pitch}
677 @end example
678
679 This checks that @var{pitch} (without octave) yields @var{pitch} (with
680 octave) in \relative mode. If not, a warning is printed, and the
681 octave is corrected, for example, the first check is passed
682 successfully.  The second check fails with an error message.  The
683 octave is adjusted so the following notes are in the correct octave
684 once again.
685 @example
686 \relative c' @{
687   e
688   \octave a'
689   \octave b'
690 @}
691 @end example
692
693
694 The octave of a note following an octave check is determined with
695 respect to the note preceding it. In the next fragment, the last note
696 is a @code{a'}, above middle C. Hence, the @code{\octave} check may
697 be deleted without changing the meaning of the piece.
698
699 @quotation
700 @lilypond[verbatim,fragment] 
701 \relative c' {
702   e
703   \octave b
704   a        
705 }
706 @end lilypond
707 @end quotation
708
709 @node Bar check
710 @subsection Bar check
711 @cindex Bar check
712
713 @cindex bar check
714 @cindex @code{barCheckSynchronize}
715 @cindex @code{|}
716
717 Bar checks help detect errors in the durations.  A bar check is
718 entered using the bar symbol, `@code{|}'.  Whenever it is encountered
719 during interpretation, it should fall on a measure boundary.  If it
720 does not, a warning is printed.  In the next example, the second bar
721 check will signal an error
722 @example
723 \time 3/4 c2 e4 | g2 | 
724 @end example
725
726 Bar checks can also be used in lyrics, for example 
727
728 @example
729 \lyrics @{
730   \time 2/4
731   Twin -- kle | Twin -- kle
732 @} 
733 @end example
734
735
736 @cindex skipTypesetting
737
738 Failed bar checks are caused by entering incorrect
739 durations. Incorrect durations often completely garble up the score,
740 especially if it is polyphonic, so you should start correcting the
741 score by scanning for failed bar checks and incorrect durations.  To
742 speed up this process, you can use @code{skipTypesetting}, described
743 in the next section.
744
745 @node Skipping corrected music
746 @subsection Skipping corrected music
747
748 The property @code{Score.skipTypesetting} can be used to switch on and
749 off typesetting completely during the interpretation phase. When
750 typesetting is switched off, the music is processed much more quickly.
751 This can be used to skip over the parts of a score that have already
752 been checked for errors
753
754 @quotation
755 @lilypond[fragment,raggedright,verbatim]
756 \relative c'' { c8 d
757 \set Score.skipTypesetting = ##t
758 e f g a g c, f e d
759 \set Score.skipTypesetting = ##f
760 c d b bes a g c2 } 
761 @end lilypond
762 @end quotation
763
764 @node Automatic note splitting
765 @subsection Automatic note splitting
766
767 Long notes can be converted automatically to tied notes.  This is done
768 by replacing the @internalsref{Note_heads_engraver} by the
769 @internalsref{Completion_heads_engraver}.
770 In the following examples, notes crossing the bar line are split and tied.
771
772
773 @quotation
774 @lilypond[noindent,verbatim,relative=2]
775 \new Voice \with {
776   \remove "Note_heads_engraver"
777   \consists "Completion_heads_engraver"
778 } {
779   c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2 
780 }
781 @end lilypond
782 @end quotation
783
784 This engraver splits all running notes at the bar line, and inserts
785 ties.  One of its uses is to debug complex scores: if the measures are
786 not entirely filled, then the ties exactly show how much each measure
787 is off.
788
789 @refbugs
790
791 Not all durations (especially those containing tuplets) can be
792 represented exactly; the engraver will not insert tuplets. 
793
794 @seealso
795
796 Examples: @inputfileref{input/regression,completion-heads.ly}.
797
798 Program reference: @internalsref{Completion_heads_engraver}.
799
800
801 @node Staff notation
802 @section Staff notation
803
804 This section describes music notation that occurs on staff level,
805 such as keys, clefs and time signatures.
806
807 @cindex Staff notation
808
809 @menu
810 * Staff symbol::                
811 * Key signature::               
812 * Clef::                        
813 * Ottava brackets::             
814 * Time signature::              
815 * Partial measures::            
816 * Unmetered music::             
817 * Bar lines::                   
818 @end menu
819
820 @node Staff symbol
821 @subsection Staff symbol
822
823 @cindex adjusting staff symbol
824
825 Notes, dynamic signs, etc. are grouped
826 with a set of horizontal lines, into a staff (plural `staves'). In our
827 system, these lines are drawn using a separate layout object called
828 staff symbol.  
829
830
831 @cindex staff lines, setting number of
832 @cindex staff lines, setting thickness of
833 @cindex thickness of staff lines, setting 
834 @cindex number of staff lines, setting 
835
836 @seealso
837
838 Program reference: @internalsref{StaffSymbol}.
839
840 Examples: @inputfileref{input/test,staff-lines.ly},
841 @inputfileref{input/test,staff-size.ly}.
842
843 @refbugs
844
845 If a staff is ended halfway a piece, the staff symbol may not end
846 exactly on the bar line.
847
848
849 @node Key signature
850 @subsection Key signature
851 @cindex Key signature
852
853 @cindex @code{\key}
854
855 The key signature indicates the scale in which a piece is played. It
856 is denoted by a set of alterations (flats or sharps) at the start of
857 the staff.
858
859
860 Setting or changing the key signature is done with the @code{\key}
861 command
862 @example
863   @code{\key} @var{pitch} @var{type}
864 @end example
865
866 @cindex @code{\minor}
867 @cindex @code{\major}
868 @cindex @code{\minor}
869 @cindex @code{\ionian}
870 @cindex @code{\locrian}
871 @cindex @code{\aeolian}
872 @cindex @code{\mixolydian}
873 @cindex @code{\lydian}
874 @cindex @code{\phrygian}
875 @cindex @code{\dorian}
876
877 Here, @var{type} should be @code{\major} or @code{\minor} to get
878 @var{pitch}-major or @var{pitch}-minor, respectively.
879 The standard mode names @code{\ionian},
880 @code{\locrian}, @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
881 @code{\phrygian}, and @code{\dorian} are also defined.
882
883 This command sets the context property
884 @internalsref{Staff}.@code{keySignature}.  Non-standard key signatures
885 can be specified by setting this property directly.
886
887 Accidentals and key signatures often confuse new users, because
888 unaltered notes get natural signs depending on the key signature. For
889 more information,   see  @ref{More about pitches}.
890
891 @refbugs
892
893 The ordering of a key cancellation is wrong when it is combined with
894 repeat bar lines. The cancellation is also printed after a line break.
895
896 @seealso
897
898 Program reference: @internalsref{KeyChangeEvent}, and @internalsref{KeySignature}.
899
900 @cindex @code{keySignature}
901
902
903 @node Clef
904 @subsection Clef
905 @cindex @code{\clef}
906
907 The clef indicates which lines of the staff correspond to which
908 pitches.
909
910
911 The clef can be set or changed with the @code{\clef} command
912 @quotation
913 @lilypond[fragment,verbatim]
914 \key f\major  c''2 \clef alto g'2
915 @end lilypond
916 @end quotation
917
918 Supported clef-names include
919 @c Moved standard clefs to the top /MB
920 @table @code
921 @cindex treble clef
922 @cindex violin clef
923 @item treble, violin, G, G2
924 G clef on 2nd line
925 @item alto, C
926 @cindex alto clef 
927  C clef on 3rd line
928 @item tenor
929 @cindex tenor clef 
930  C clef on 4th line. 
931 @item bass, F
932 @cindex bass clef
933  F clef on 4th line
934 @item french
935 @cindex french clef
936  G clef on 1st line, so-called French violin clef
937 @item soprano
938 @cindex soprano clef
939  C clef on 1st line
940 @item mezzosoprano
941 @cindex mezzosoprano clef
942  C clef on 2nd line
943 @item baritone
944 @cindex baritone clef
945  C clef on 5th line
946 @item varbaritone
947 @cindex varbaritone clef
948  F clef on 3rd line
949 @item subbass
950 @cindex subbass clef
951  F clef on 5th line
952 @item percussion
953  percussion clef
954 @item tab
955  tablature clef
956 @end table
957
958 By adding @code{_8} or @code{^8} to the clef name, the clef is
959 transposed one octave down or up, respectively, and @code{_15} and
960 @code{^15} transposes by two octaves.  The argument @var{clefname}
961 must be enclosed in quotes when it contains underscores or digits. For
962 example,
963
964
965 @cindex choral tenor clef  
966 @quotation
967 @lilypond[verbatim,fragment,relative=1]
968 \clef "G_8" c4
969 @end lilypond
970 @end quotation
971
972 This command is equivalent to setting @code{clefGlyph},
973 @code{clefPosition} (which controls the Y position of the clef),
974 @code{centralCPosition} and @code{clefOctavation}. A clef is printed
975 when any of these properties are changed.
976
977 @seealso
978
979 Program reference: the object for this symbol is @internalsref{Clef}.
980
981
982
983 @node Ottava brackets
984 @subsection Ottava brackets
985
986 ``Ottava'' brackets introduce an extra transposition of an octave for
987 the staff. They are created by invoking the function
988 @code{set-octavation}
989
990 @cindex ottava
991 @cindex 15ma
992 @cindex octavation
993
994 @quotation
995 @lilypond[verbatim,fragment]
996 \relative c''' {
997   a2 b
998   #(set-octavation 1)
999   a b 
1000   #(set-octavation 0)
1001   a b
1002 }
1003 @end lilypond
1004 @end quotation
1005
1006 The @code{set-octavation} function also takes -1 (for 8va bassa) and 2
1007 (for 15ma) as arguments.  Internally the function sets the properties
1008 @code{ottavation} (e.g. to @code{"8va"}) and
1009 @code{centralCPosition}. For overriding the text of the bracket, set
1010 @code{ottavation} after invoking @code{set-octavation}, i.e.,
1011
1012 @example
1013 #(set-octavation 1)
1014 \set Staff.ottavation = #"8"
1015 @end example
1016
1017 @seealso
1018
1019 Program reference: @internalsref{OttavaBracket}.
1020
1021 Examples: @inputfileref{input/regression,ottava.ly},
1022 @inputfileref{input/regression,ottava-broken.ly}.
1023
1024 @refbugs
1025
1026 @code{set-octavation} will get confused when clef changes happen
1027 during an octavation bracket.
1028
1029 @node Time signature
1030 @subsection Time signature
1031 @cindex Time signature
1032 @cindex meter
1033 @cindex @code{\time}
1034
1035 Time signature indicates the metrum of a piece: a regular pattern of
1036 strong and weak beats. It is denoted by a fraction at the start of the
1037 staff.
1038
1039
1040 The time signature is set or changed by the @code{\time}
1041 command
1042 @quotation
1043 @lilypond[fragment,verbatim]
1044 \time 2/4 c'2 \time 3/4 c'2. 
1045 @end lilypond
1046 @end quotation
1047
1048 The symbol that is printed can be customized with the @code{style}
1049 property. Setting it to @code{#'()} uses fraction style for 4/4 and
1050 2/2 time.  There are many more options for its layout.  See
1051 @inputfileref{input/test,time.ly} for more examples.
1052
1053
1054 This command sets the property @code{timeSignatureFraction},
1055 @code{beatLength} and @code{measureLength} in the @code{Timing}
1056 context, which is normally aliased to @internalsref{Score}.  The
1057 property @code{measureLength} determines where bar lines should be
1058 inserted, and how automatic beams should be generated.  Changing the
1059 value of @code{timeSignatureFraction} also causes the symbol to be
1060 printed.
1061
1062 More options are available through the Scheme function
1063 @code{set-time-signature}. In combination with the
1064 @internalsref{Measure_grouping_engraver}, it will create
1065 @internalsref{MeasureGrouping} signs. Such signs ease reading
1066 rhythmically complex modern music.  In the following example, the 9/8
1067 measure is subdivided in 2, 2, 2 and 3. This is passed to
1068 @code{set-time-signature} as the third argument @code{(2 2 2 3)}
1069
1070 @quotation
1071 @lilypond[raggedright,verbatim]
1072 \score {
1073   \notes \relative c'' {
1074     #(set-time-signature 9 8 '(2 2 2 3))
1075     g8[ g] d[ d] g[ g] a8[( bes g]) | 
1076     #(set-time-signature 5 8 '(3 2))
1077     a4. g4
1078   }
1079   \paper {
1080     \context {
1081       \StaffContext
1082       \consists "Measure_grouping_engraver"
1083     }
1084   }
1085 }
1086 @end lilypond
1087 @end quotation 
1088
1089 @seealso
1090
1091 Program reference: @internalsref{TimeSignature}, and @internalsref{Timing_engraver}.
1092
1093
1094 @refbugs
1095
1096 Automatic beaming does not use the measure grouping specified with
1097 @code{set-time-signature}.
1098
1099 @node Partial measures
1100 @subsection Partial measures
1101 @cindex Partial
1102 @cindex anacrusis
1103 @cindex partial measure
1104 @cindex measure, partial
1105 @cindex shorten measures
1106 @cindex @code{\partial}
1107
1108 Partial measures, for example in upsteps, are entered using the
1109 @code{\partial} command
1110 @quotation
1111 @lilypond[fragment,verbatim,relative=2]
1112 \partial 16*5  c16 cis d dis e | a2. c,4 | b2
1113 @end lilypond
1114 @end quotation
1115
1116 The syntax for this command is 
1117 @example
1118   \partial @var{duration} 
1119 @end example
1120 This is  internally translated into
1121 @example
1122   \set Timing.measurePosition = -@var{length of duration}
1123 @end example
1124 @cindex @code{|}
1125 The property @code{measurePosition} contains a rational number
1126 indicating how much of the measure has passed at this point.
1127
1128 @node Unmetered music
1129 @subsection Unmetered music
1130
1131 Bar lines and bar numbers are calculated automatically. For unmetered
1132 music (e.g. cadenzas), this is not desirable.  By setting
1133 @code{Score.timing} to false, this automatic timing can be switched
1134 off. Empty bar lines,
1135
1136 @example
1137   \bar ""
1138 @end example
1139
1140 @noindent
1141 indicate where line breaks can occur.
1142
1143
1144
1145 @refcommands
1146
1147 @cindex @code{\cadenzaOn}
1148 @code{\cadenzaOn}, 
1149 @cindex @code{\cadenzaOff}
1150 @code{\cadenzaOff}.
1151
1152 @node Bar lines
1153 @subsection Bar lines
1154 @cindex Bar lines
1155
1156 @cindex @code{\bar}
1157 @cindex measure lines
1158 @cindex repeat bars
1159
1160
1161 Bar lines delimit measures, but are also used to indicate repeats.
1162 Normally, they are inserted automatically.  Line breaks may only
1163 happen on bar lines.
1164
1165
1166  Special types
1167 of bar lines can be forced with the @code{\bar} command
1168 @c
1169 @quotation
1170 @lilypond[relative=2,fragment,verbatim]
1171 c4 \bar "|:" c4
1172 @end lilypond
1173 @end quotation
1174
1175 The following bar types are available
1176 @quotation
1177 @lilypond[fragment,relative=1,raggedright,verbatim]
1178 c4
1179 \bar "|" c
1180 \bar "" c
1181 \bar "|:" c
1182 \bar "||" c
1183 \bar ":|" c
1184 \bar ".|" c
1185 \bar ".|." c
1186 \bar ":|:" c
1187 \bar "|." c
1188 \bar ":" c
1189 @end lilypond
1190 @end quotation
1191 For allowing line breaks, there is a special command,
1192 @example
1193   \bar "empty"
1194 @end example 
1195 This will insert an invisible bar line, and allow line breaks at this
1196 point.
1197
1198 In scores with many staves, a @code{\bar} command in one staff is
1199 automatically applied to all staves. The resulting bar lines are
1200 connected between different staves of a @internalsref{StaffGroup}
1201 @c
1202 @quotation
1203 @lilypond[fragment,verbatim]
1204 <<
1205   \context StaffGroup <<
1206     \new Staff {
1207       e'4 d'
1208       \bar "||"
1209       f' e'
1210     }
1211     \new Staff { \clef bass c4 g e g }
1212   >>
1213   \new Staff { \clef bass c2 c2 }
1214 >>
1215 @end lilypond
1216 @end quotation
1217
1218 A bar line is created whenever the @code{whichBar} property is set.
1219 At the start of a measure it is set to the contents of
1220 @code{defaultBarType}. The contents of @code{repeatCommands} are used
1221 to override default measure bars.
1222
1223 The command @code{\bar }@var{bartype} is a short cut for doing
1224 @code{\set Timing.whichBar = }@var{bartype}.  Whenever @code{whichBar}
1225 is set to a string, a bar line of that type is created.
1226
1227 @cindex whichBar
1228 @cindex repeatCommands
1229 @cindex defaultBarType
1230
1231 You are encouraged to use @code{\repeat} for repetitions.  See
1232 @ref{Repeats}.
1233
1234
1235
1236 @seealso
1237
1238 In this manual: @ref{Repeats}.
1239
1240
1241 Program reference: the bar line objects that are created at
1242 @internalsref{Staff} level are called @internalsref{BarLine}, the bar
1243 lines that span staves are @internalsref{SpanBar} objects.
1244
1245 @cindex bar lines at start of system
1246 @cindex start of system
1247
1248 The bar lines at the start of each system are
1249 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace}, and
1250 @internalsref{SystemStartBracket}.  Only one of these types is created
1251 in every context, and that type is determined by the property
1252 @code{systemStartDelimiter}.
1253
1254 Examples: @inputfileref{input/test,bar-lines.ly},
1255
1256 @node Polyphony
1257 @section Polyphony
1258 @cindex polyphony
1259
1260 The easiest way to enter fragments with more than one voice on a staff
1261 is to split chords using the separator @code{\\}.  You can use it for
1262 small, short-lived voices or for single chords
1263
1264 @quotation
1265 @lilypond[verbatim,fragment]
1266 \context Staff \relative c'' {
1267   c4 << { f d e  } \\ { b c2 } >>
1268   c4 << g' \\ b, \\  f' \\ d >>
1269 }
1270 @end lilypond
1271 @end quotation
1272
1273 The separator causes @internalsref{Voice} contexts@footnote{Polyphonic
1274 voices are sometimes called "layers" other notation packages}
1275 @cindex layers
1276 to be instantiated. They bear the names @code{"1"}, @code{"2"}, etc. In
1277 each of these contexts, vertical direction of slurs, stems, etc. is set
1278 appropriately.
1279
1280 @cindex @code{\voiceOne}
1281 @cindex @code{\voiceFour}
1282
1283 This can also be done by instantiating @internalsref{Voice} contexts
1284 by hand, and using @code{\voiceOne}, up to @code{\voiceFour} to assign
1285 a stem directions and horizontal shift for each part
1286 @c
1287
1288 @quotation
1289 @lilypond[raggedright,verbatim]
1290 \relative c''
1291 \context Staff <<
1292   \new Voice { \voiceOne cis2 b  }
1293   \new Voice { \voiceThree b4 ais ~ ais4 gis4 } 
1294   \new Voice { \voiceTwo fis4~  fis4 f ~ f  } >>
1295 @end lilypond
1296 @end quotation
1297
1298 @noindent
1299 The command @code{\oneVoice} will revert back to the normal setting.
1300 @cindex @code{\oneVoice}
1301
1302
1303 Normally, note heads with a different number of dots are not merged, but
1304 when  the object property @code{merge-differently-dotted} is set in
1305 the @internalsref{NoteCollision} object, they are merged
1306 @quotation
1307 @lilypond[verbatim,fragment,raggedright]
1308 \relative c'' \context Voice << {
1309   g8 g8 
1310   \override Staff.NoteCollision  
1311     #'merge-differently-dotted = ##t
1312   g8 g8
1313 } \\ { g8.[ f16] g8.[ f16] } >>
1314 @end lilypond
1315 @end quotation
1316
1317 Similarly, you can merge half note heads with eighth notes, by setting
1318 @code{merge-differently-headed}
1319 @quotation
1320 @lilypond[fragment,relative=3,verbatim]
1321 \context Voice << {
1322   c8 c4.
1323   \override Staff.NoteCollision
1324     #'merge-differently-headed = ##t
1325 c8 c4. } \\ { c2 c2 } >>
1326 @end lilypond
1327 @end quotation
1328
1329 LilyPond also vertically shifts rests that are opposite of a stem
1330
1331
1332 @quotation
1333 @lilypond[raggedright,fragment,verbatim]
1334 \context Voice << c''4 \\  r4 >>
1335 @end lilypond
1336 @end quotation
1337
1338
1339 @refcommands
1340
1341
1342
1343 @cindex @code{\oneVoice}
1344 @code{\oneVoice}, 
1345 @cindex @code{\voiceOne}
1346 @code{\voiceOne}, 
1347 @cindex @code{\voiceTwo}
1348 @code{\voiceTwo}, 
1349 @cindex @code{\voiceThree}
1350 @code{\voiceThree}, 
1351 @cindex @code{\voiceFour}
1352 @code{\voiceFour}.
1353
1354
1355 The following commands specify in what chords of the current voice
1356 should be shifted: the outer voice has @code{\shiftOff}, and the inner
1357 voices have @code{\shiftOn}, @code{\shiftOnn}, etc.
1358
1359
1360 @cindex @code{\shiftOn}
1361 @code{\shiftOn}, 
1362 @cindex @code{\shiftOnn}
1363 @code{\shiftOnn}, 
1364 @cindex @code{\shiftOnnn}
1365 @code{\shiftOnnn}, 
1366 @cindex @code{\shiftOff}
1367 @code{\shiftOff}.
1368
1369
1370
1371 @seealso
1372
1373 Program reference: the objects responsible for resolving collisions are
1374 @internalsref{NoteCollision} and @internalsref{RestCollision}.
1375
1376 Examples: See also example files
1377 @inputfileref{input/regression,collision-dots.ly},
1378 @inputfileref{input/regression,collision-head-chords.ly},
1379 @inputfileref{input/regression,collision-heads.ly},
1380 @inputfileref{input/regression,collision-mesh.ly}, and
1381 @inputfileref{input/regression,collisions.ly}.
1382
1383
1384 @refbugs
1385
1386 Resolving collisions is a intricate subject, and only a few situations
1387 are handled. When LilyPond cannot cope, the @code{force-hshift}
1388 property of the @internalsref{NoteColumn} object and pitched rests can
1389 be used to override typesetting decisions.
1390
1391 When using @code{merge-differently-headed} with an upstem eighth or a
1392 shorter note, and a downstem half note, the eighth note gets the wrong
1393 offset.
1394
1395 There is no support for clusters where the same note occurs with
1396 different accidentals in the same chord. In this case, it is
1397 recommended to use enharmonic transcription, or to use special cluster
1398 notation (see @ref{Clusters}).
1399
1400 @node Beaming
1401 @section Beaming
1402
1403 Beams are used to group short notes into chunks that are aligned with
1404 the metrum. They are inserted automatically
1405
1406 @quotation
1407 @lilypond[fragment,verbatim,relative=3]
1408 \time 2/4 c8 c c c \time 6/8 c c c c8. c16  c8
1409 @end lilypond
1410 @end quotation
1411
1412 When these automatic decisions are not good enough, beaming can be
1413 entered explicitly. It is also possible to define beaming patterns
1414 that differ from the defaults.
1415
1416 Individual notes may be marked with @code{\noBeam}, to prevent them
1417 from being beamed
1418
1419 @quotation
1420 @lilypond[fragment,verbatim,relative=3]
1421   \time 2/4 c8 c\noBeam c c
1422 @end lilypond
1423 @end quotation
1424
1425
1426 @seealso
1427
1428 Program reference: @internalsref{Beam}. 
1429
1430
1431 @cindex Automatic beams
1432 @menu
1433 * Manual beams::                
1434 * Setting automatic beam behavior::  
1435 @end menu
1436
1437 @node Manual beams
1438 @subsection Manual beams
1439 @cindex beams, manual
1440 @cindex @code{]}
1441 @cindex @code{[}
1442
1443 In some cases it may be necessary to override the automatic beaming
1444 algorithm.  For example, the autobeamer will not put beams over rests
1445 or bar lines. Such beams are specified by manually: the begin and end
1446 point are marked with @code{[} and @code{]}
1447
1448 @quotation
1449 @lilypond[fragment,relative=1,verbatim]
1450 \context Staff {
1451   r4 r8[ g' a r8] r8 g[ | a] r8
1452 }
1453 @end lilypond
1454 @end quotation
1455
1456 @cindex @code{stemLeftBeamCount}
1457
1458 Normally, beaming patterns within a beam are determined automatically.
1459 If necessary, the properties @code{stemLeftBeamCount} and
1460 @code{stemRightBeamCount} can be used to override the defaults.  If
1461 either property is set, its value will be used only once, and then it
1462 is erased
1463
1464 @quotation
1465 @lilypond[fragment,relative=1,verbatim]
1466 \context Staff {
1467   f8[ r16 f g a]
1468   f8[ r16 \set stemLeftBeamCount = #1 f g a]
1469 }
1470 @end lilypond
1471 @end quotation
1472 @cindex @code{stemRightBeamCount}
1473
1474
1475 The property @code{subdivideBeams} can be set in order to subdivide
1476 all 16th or shorter beams at beat positions, as defined by the
1477 @code{beatLength} property.
1478
1479
1480 @quotation
1481 @lilypond[relative=2,verbatim,noindent]
1482 c16[ c c c c c c c]
1483 \set subdivideBeams = ##t
1484 c16[ c c c c c c c]
1485 \set Score.beatLength = #(ly:make-moment 1 8)
1486 c16[ c c c c c c c]
1487 @end lilypond
1488 @end quotation
1489 @cindex subdivideBeams
1490
1491 Kneed beams are inserted automatically, when a large gap is detected
1492 between the note heads.  This behavior can be tuned through the object
1493 property @code{auto-knee-gap}.
1494
1495 Normally, line breaks are forbidden when beams cross bar lines.  This
1496 behavior can be changed by setting @code{allowBeamBreak}.
1497
1498 @cindex @code{allowBeamBreak}
1499 @cindex beams and line breaks
1500
1501 @cindex beams, kneed
1502 @cindex kneed beams
1503 @cindex auto-knee-gap
1504
1505
1506
1507 @refbugs
1508
1509 @cindex Frenched staves
1510
1511 Automatically kneed cross-staff beams cannot be used together with
1512 hidden staves.
1513
1514
1515
1516
1517 @node Setting automatic beam behavior
1518 @subsection Setting automatic beam behavior 
1519
1520 @cindex @code{autoBeamSettings}
1521 @cindex @code{(end * * * *)}
1522 @cindex @code{(begin * * * *)}
1523 @cindex automatic beams, tuning
1524 @cindex tuning automatic beaming
1525
1526 @c [TODO: use \applycontext]
1527
1528 In normal time signatures, automatic beams can start on any note but can
1529 only end in a few positions within the measure: beams can end on a beat,
1530 or at durations specified by the properties in
1531 @code{autoBeamSettings}. The defaults for @code{autoBeamSettings}
1532 are defined in @file{scm/auto-beam.scm}.
1533
1534 The value of @code{autoBeamSettings} is changed with two functions,
1535 @example
1536   #(override-auto-beam-setting
1537      '(@var{be} @var{p} @var{q} @var{n} @var{m}) @var{a} @var{b}
1538      [@var{context}])
1539   #(revert-auto-beam-setting '(@var{be} @var{p} @var{q} @var{n} @var{m}))
1540 @end example
1541 Here, @var{be} is the symbol @code{begin} or @code{end}, and
1542 @var{context} is an optional context (default: @code{'Voice}). It
1543 determines whether the rule applies to begin or end-points.  The
1544 quantity @var{p}/@var{q} refers to the length of the beamed notes (and
1545 `@code{* *}' designates notes of any length), @var{n}/@var{M} refers
1546 to a time signature (wildcards `@code{* *}' may be entered to
1547 designate all time signatures), @var{a}/@var{b} is a duration.  By
1548 default, this command changes settings for the current voice. It is
1549 also possible to adjust settings at higher contexts, by adding a
1550 @var{context} argument.
1551
1552 For example, if automatic beams should end on every quarter note, use
1553 the following
1554 @example
1555    #(override-auto-beam-setting '(end * * * *) 1 4 'Staff)
1556 @end example
1557 Since the duration of a quarter note is 1/4 of a whole note, it is
1558 entered as @code{(ly:make-moment 1 4)}.
1559
1560 The same syntax can be used to specify beam starting points. In this
1561 example, automatic beams can only end on a dotted quarter note
1562 @example
1563    #(override-auto-beam-setting '(end * * * *) 3 8)
1564 @end example
1565 In 4/4 time signature, this means that automatic beams could end only on
1566 3/8 and on the fourth beat of the measure (after 3/4, that is 2 times
1567 3/8, has passed within the measure).
1568
1569 Rules can also be restricted to specific time signatures. A rule that
1570 should only be applied in @var{N}/@var{M} time signature is formed by
1571 replacing the second asterisks by @var{N} and @var{M}. For example, a
1572 rule for 6/8 time exclusively looks like
1573 @example
1574  #(override-auto-beam-setting '(begin * * 6 8) @dots{})
1575 @end example
1576
1577 If a rule should be to applied only to certain types of beams, use the
1578 first pair of asterisks. Beams are classified according to the
1579 shortest note they contain. For a beam ending rule that only applies
1580 to beams with 32nd notes (and no shorter notes), use @code{(end 1 32 *
1581 *)}.
1582
1583 @cindex automatic beam generation
1584 @cindex autobeam
1585 @cindex @code{autoBeaming}
1586 @cindex lyrics
1587
1588 If beams are used to indicate melismata in songs, then automatic
1589 beaming should be switched off. This is done by setting
1590 @code{autoBeaming} to @code{#f}.
1591
1592 @refcommands
1593
1594 @cindex @code{\autoBeamOff}
1595 @code{\autoBeamOff}, 
1596 @cindex @code{\autoBeamOn}
1597 @code{\autoBeamOn}.
1598
1599
1600 @refbugs
1601
1602 If a score ends while an automatic beam has not been ended and is
1603 still accepting notes, this last beam will not be typeset at all. The
1604 same holds polyphonic voices, entered with @code{<< @dots{} \\ @dots{}
1605 >>}. If a polyphonic voice ends while an automatic beam is still
1606 accepting notes, it is not typeset.
1607
1608 The rules for ending a beam depend on the shortest note in a beam.
1609 So, while it is possible to have different ending rules for eight
1610 beams and sixteenth beams, a beam that contains both eight and
1611 sixteenth notes will use the rules for the sixteenth beam.
1612
1613 In the example below, the autobeamer makes eight beams and sixteenth
1614 end at 3 eights; the third beam can only be corrected by specifying
1615 manual beaming.
1616
1617 @quotation
1618 @lilypond[raggedright,fragment,relative=1]
1619 #(override-auto-beam-setting '(end * * * *) 3 8)
1620 % rather show case where it goes wrong
1621 %\time 12/8 c'8 c c c16 c c c c c c[ c c c] c8[ c] c4
1622 \time 12/8 c'8 c c c16 c c c c c c c c c c8 c c4
1623 @end lilypond
1624 @end quotation
1625 It is not possible to specify beaming parameters that act differently in
1626 different parts of a measure. This means that it is not possible to use
1627 automatic beaming in irregular meters such as @code{5/8}.
1628
1629 @node Accidentals
1630 @section Accidentals
1631 @cindex Accidentals
1632
1633 This section describes how to change the way that accidentals are
1634 inserted automatically before the running notes.
1635
1636 Common rules for typesetting accidentals have been canned in a
1637 function. This function is called as follows
1638
1639 @cindex @code{set-accidental-style}
1640 @example
1641   #(set-accidental-style 'modern 'Voice)
1642 @end example
1643
1644 The function takes two arguments: a symbol that denotes the style (in
1645 the example, @code{modern}), and another symbol that denotes the
1646 context name (in this example, @code{Voice}). If no context name is
1647 supplied, @code{Staff} is the default.
1648
1649 The following styles are supported
1650 @table @code
1651 @item default
1652       This is the default typesetting behavior. It should correspond
1653       to 18th century common practice: Accidentals are
1654       remembered to the end of the measure in which they occur and
1655       only on their own octave.
1656
1657 @item voice
1658 @c
1659       The normal behavior is to remember the accidentals on
1660 Staff-level.  This variable, however, typesets accidentals
1661 individually for each voice.  Apart from that, the rule is similar to
1662 @code{code}.
1663
1664       This leads to some weird and often unwanted results
1665       because accidentals from one voice do not get canceled in other
1666       voices
1667 @quotation
1668 @lilypond[raggedright,relative=1,fragment,verbatim]
1669 \context Staff <<
1670   #(set-accidental-style 'voice)
1671   <<
1672     { es g } \\
1673     { c, e }
1674 >> >>
1675 @end lilypond
1676 @end quotation
1677       Hence you should only use @code{voice} if the voices
1678 are to be read solely by individual musicians. If the staff is to be
1679 used by one musician (e.g. a conductor) then you use
1680 @code{modern} or @code{modern-cautionary}
1681 instead.
1682
1683 @item modern
1684 @cindex @code{modern} style accidentals
1685       This rule  corresponds to the common practice in the 20th
1686       century.
1687       This rule prints the same accidentals as @code{default},  but temporary
1688       accidentals also are canceled in other octaves. Furthermore,
1689       in the same octave, they also get canceled in the following
1690       measure
1691
1692 @quotation
1693 @lilypond[raggedright,fragment,verbatim]
1694 #(set-accidental-style 'modern)
1695 cis' c'' cis'2 | c'' c'
1696 @end lilypond
1697 @end quotation
1698
1699 @item @code{modern-cautionary}
1700       @cindex @code{modern-cautionary}
1701      This rule is similar to @code{modern}, but the
1702      ``extra'' accidentals (the ones not typeset by
1703      @code{default}) are typeset as cautionary accidentals.
1704      They are printed in reduced size or with parentheses
1705 @quotation
1706 @lilypond[raggedright,fragment,verbatim]
1707 #(set-accidental-style 'modern-cautionary)
1708 cis' c'' cis'2 | c'' c'
1709 @end lilypond
1710 @end quotation
1711
1712       @cindex @code{modern-voice}
1713 @item modern-voice
1714 This rule is used for multivoice accidentals to be read both by musicians
1715 playing one voice and musicians playing all voices.  Accidentals are
1716 typeset for each voice, but they @emph{are} canceled across voices in
1717 the same @internalsref{Staff}.
1718
1719       @cindex @code{modern-voice-cautionary}
1720 @item modern-voice-cautionary
1721 This rule is the same as @code{modern-voice}, but with the extra
1722 accidentals (the ones not typeset by @code{voice}) typeset
1723 as cautionaries.  Even though all accidentals typeset by
1724 @code{default} @emph{are} typeset by this variable then
1725 some of them are typeset as cautionaries.
1726
1727 @item piano
1728       @cindex @code{piano} accidentals
1729 This rule reflects      20th century practice for piano notation. Very similar to
1730       @code{modern} but accidentals also get canceled
1731       across the staves in the same @internalsref{GrandStaff} or
1732       @internalsref{PianoStaff}.
1733
1734 @item piano-cautionary
1735       @cindex @code{#(set-accidental-style 'piano-cautionary)}
1736       As @code{#(set-accidental-style 'piano)' , str)} but with the extra accidentals
1737       typeset as cautionaries.
1738
1739 @item no-reset
1740       @cindex @code{no-reset} accidental style
1741       @c
1742       This is the same as @code{default} but with accidentals lasting
1743       ``forever'' and not only until the next measure
1744 @quotation
1745 @lilypond[raggedright,fragment,verbatim,relative=1]
1746       #(set-accidental-style 'no-reset)
1747       c1 cis cis c
1748 @end lilypond
1749 @end quotation
1750
1751 @item forget
1752       This is sort of the opposite of @code{no-reset}: Accidentals
1753       are not remembered at all---and hence all accidentals are
1754       typeset relative to the key signature, regardless of what was
1755       before in the music
1756       
1757 @quotation
1758 @lilypond[raggedright,fragment,verbatim,relative=1]
1759 #(set-accidental-style 'forget)
1760 \key d\major c4 c cis cis d d dis dis
1761 @end lilypond
1762 @end quotation
1763 @end table
1764
1765
1766 @seealso
1767
1768 Program reference: @internalsref{Accidental_engraver},
1769 @internalsref{Accidental}, and @internalsref{AccidentalPlacement}.
1770
1771
1772 @refbugs
1773
1774 Simultaneous notes are considered to be entered in sequential
1775 mode. This means that in a chord the accidentals are typeset as if the
1776 notes in the chord happened once at a time - in the order in which
1777 they appear in the input file.
1778
1779 This is only a problem when accidentals in a chord depend on each
1780 other.  This problem can be solved by manually inserting @code{!} and
1781 @code{?}  for the problematic notes.
1782
1783 In the default scheme, accidentals only depend on other
1784 accidentals with the same pitch on the same staff, so no conflicts are
1785 possible.
1786
1787 @node Expressive marks
1788 @section Expressive marks
1789
1790
1791 @c todo: should change ordering
1792 @c where to put text spanners, metronome marks,
1793 @c fingering?
1794  
1795 @menu
1796 * Slurs::                       
1797 * Phrasing slurs::              
1798 * Breath marks::                
1799 * Metronome marks::             
1800 * Text spanners::               
1801 * Analysis brackets::           
1802 * Articulations::               
1803 * Fingering instructions::      
1804 * Text scripts::                
1805 * Grace notes::                 
1806 * Glissando::                   
1807 * Dynamics::                    
1808 @end menu
1809
1810 @node Slurs
1811 @subsection Slurs
1812 @cindex Slurs
1813
1814 A slur indicates that notes are to be played bound or @emph{legato}.
1815
1816
1817 They are entered using parentheses
1818 @quotation
1819 @lilypond[relative=2,fragment,verbatim]
1820 f( g)( a) a8 b( a4 g2 f4)
1821 <c e>2( <b d>2)
1822 @end lilypond
1823 @end quotation
1824
1825
1826 @c TODO: should explain that ^( and _( set directions
1827 @c should set attachments with ^ and _ ?  
1828
1829 Slurs avoid crossing stems, and are generally attached to note heads.
1830 However, in some situations with beams, slurs may be attached to stem
1831 ends.  If you want to override this layout you can do this through the
1832 object property @code{attachment} of @internalsref{Slur}.  Its value
1833 is a pair of symbols, specifying the attachment type of the left and
1834 right end points
1835
1836 @quotation
1837 @lilypond[fragment,relative=1,verbatim]
1838 \slurUp
1839 \override Stem #'length = #5.5
1840 g'8(g g4)
1841 \override Slur #'attachment = #'(stem . stem)
1842 g8( g g4)
1843 @end lilypond
1844 @end quotation
1845
1846 If a slur would strike through a stem or beam, the slur will be moved
1847 away upward or downward. If this happens, attaching the slur to the
1848 stems might look better
1849
1850 @quotation
1851 @lilypond[fragment,relative=1,verbatim]
1852 \stemUp \slurUp
1853 d32( d'4 d8..)
1854 \override Slur #'attachment = #'(stem . stem)
1855 d,32( d'4 d8..)
1856 @end lilypond
1857 @end quotation
1858
1859 @refcommands
1860
1861
1862 @cindex @code{\slurUp}
1863 @code{\slurUp}, 
1864 @cindex @code{\slurDown}
1865 @code{\slurDown}, 
1866 @cindex @code{\slurBoth}
1867 @code{\slurBoth}, 
1868 @cindex @code{\slurDotted}
1869 @code{\slurDotted}, 
1870 @cindex @code{\slurSolid}
1871 @code{\slurSolid}.
1872
1873 @seealso
1874
1875 Program reference: @seeinternals{Slur}, and @internalsref{SlurEvent}.
1876
1877
1878 @refbugs
1879
1880 Producing nice slurs is a difficult problem, and LilyPond 
1881 uses a simple, empiric method to produce slurs. In some cases, its
1882 results are ugly.
1883
1884
1885 @cindex Adjusting slurs
1886
1887 @node Phrasing slurs
1888 @subsection Phrasing slurs
1889
1890 @cindex phrasing slurs
1891 @cindex phrasing marks
1892
1893 A phrasing slur (or phrasing mark) connects chords and is used to
1894 indicate a musical sentence. It is started using @code{\(} and @code{\)}
1895 respectively
1896
1897 @quotation
1898 @lilypond[fragment,verbatim,relative=1]
1899 \time 6/4 c'\( d( e) f( e)  d\) 
1900 @end lilypond
1901 @end quotation
1902
1903 Typographically, the phrasing slur behaves almost exactly like a
1904 normal slur.  However, they are treated as different objects.  A
1905 @code{\slurUp} will have no effect on a phrasing slur; instead, you
1906 should use @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and
1907 @code{\phrasingSlurBoth}.
1908
1909 The commands @code{\slurUp}, @code{\slurDown}, and @code{\slurBoth}
1910 will only affect normal slurs and not phrasing slurs.
1911
1912 @refcommands
1913
1914 @cindex @code{\phrasingSlurUp}
1915 @code{\phrasingSlurUp}, 
1916 @cindex @code{\phrasingSlurDown}
1917 @code{\phrasingSlurDown}, 
1918 @cindex @code{\phrasingSlurBoth}
1919 @code{\phrasingSlurBoth}.
1920
1921 @seealso
1922
1923 Program reference: see also @internalsref{PhrasingSlur}, and
1924 @internalsref{PhrasingSlurEvent}.
1925
1926 @refbugs
1927
1928 Phrasing slurs have the same limitations in their formatting as normal
1929 slurs. Putting phrasing slurs over rests leads to spurious warnings.
1930
1931 @node Breath marks
1932 @subsection Breath marks
1933
1934 Breath marks are entered using @code{\breathe}
1935
1936
1937 @quotation
1938 @lilypond[fragment,relative=1,verbatim]
1939 c'4 \breathe d4
1940 @end lilypond
1941 @end quotation
1942
1943 The glyph of the breath mark can be tuned by overriding the
1944 @code{text} property of the @code{BreathingSign} layout object with
1945 any markup text.   For example,
1946 @quotation
1947 @lilypond[fragment,verbatim,relative=1]
1948 c'4
1949 \override BreathingSign #'text
1950  = #(make-musicglyph-markup "scripts-rvarcomma")
1951 \breathe
1952 d4
1953 @end lilypond
1954 @end quotation
1955
1956 @seealso 
1957
1958 Program reference: @internalsref{BreathingSign},
1959 @internalsref{BreathingSignEvent}.
1960
1961 Examples: @inputfileref{input/regression,breathing-sign.ly}.
1962
1963
1964 @node Metronome marks
1965 @subsection Metronome marks
1966
1967 @cindex Tempo
1968 @cindex beats per minute
1969 @cindex metronome marking
1970
1971 Metronome settings can be entered as follows
1972 @example 
1973   \tempo @var{duration} = @var{per-minute} 
1974 @end example
1975
1976 In the MIDI output, they are interpreted as a tempo change, and in the
1977 paper output, a metronome marking is printed
1978 @cindex @code{\tempo}
1979 @quotation
1980 @lilypond[fragment,verbatim]
1981 \tempo 8.=120 c''1
1982 @end lilypond
1983 @end quotation
1984
1985 @seealso
1986
1987 Program reference: @internalsref{MetronomeChangeEvent}.
1988   
1989
1990
1991 @node Text spanners
1992 @subsection Text spanners
1993 @cindex Text spanners
1994
1995 Some performance indications, e.g. @i{rallentando} or @i{accelerando},
1996 are written as texts, and extended over many measures with dotted
1997 lines.  You can create such texts using text spanners: attach
1998 @code{\startTextSpan} and @code{\stopTextSpan} to the
1999 start and ending note of the spanner. 
2000
2001 The string to be printed, as well as the style, is set through object
2002 properties
2003
2004 @quotation
2005 @lilypond[fragment,relative=1,verbatim]
2006 \relative c' {
2007   c1 
2008   \override TextSpanner #'direction = #-1
2009   \override TextSpanner #'edge-text = #'("rall " . "")
2010   c2\startTextSpan b c\stopTextSpan a
2011 }
2012 @end lilypond
2013 @end quotation
2014
2015
2016 @seealso
2017
2018 Internals @internalsref{TextSpanEvent},
2019 @internalsref{TextSpanner}.
2020
2021 Examples: @inputfileref{input/regression,text-spanner.ly}.
2022
2023
2024 @node Analysis brackets
2025 @subsection Analysis brackets
2026 @cindex brackets
2027 @cindex phrasing brackets
2028 @cindex musicological analysis
2029 @cindex note grouping bracket
2030
2031 Brackets are used in musical analysis to indicate structure in musical
2032 pieces. LilyPond supports a simple form of nested horizontal brackets.
2033 To use this, add the @internalsref{Horizontal_bracket_engraver} to
2034 @internalsref{Staff} context.  A bracket is started with
2035 @code{\startGroup} and closed with @code{\stopGroup}
2036
2037 @quotation
2038 @lilypond[raggedright,verbatim]
2039 \score {
2040   \notes \relative c'' {  
2041     c4\startGroup\startGroup
2042     c4\stopGroup
2043     c4\startGroup
2044     c4\stopGroup\stopGroup
2045   }
2046   \paper {
2047     \context {
2048       \StaffContext \consists "Horizontal_bracket_engraver"
2049 }}}
2050 @end lilypond
2051 @end quotation
2052
2053 @seealso
2054
2055 Program reference: @internalsref{HorizontalBracket},
2056 @internalsref{NoteGroupingEvent}.
2057
2058 Examples: @inputfileref{input/regression,note-group-bracket.ly}. 
2059
2060
2061 @node Articulations
2062 @subsection Articulations
2063 @cindex Articulations
2064
2065 @cindex articulations
2066 @cindex scripts
2067 @cindex ornaments
2068
2069 A variety of symbols can appear above and below notes to indicate
2070 different characteristics of the performance. They are added to a note
2071 by adding a dash and  the character signifying the
2072 articulation. They are demonstrated here
2073
2074 @quotation
2075 @lilypondfile[]{script-abbreviations.ly}
2076 @end quotation
2077
2078 The meanings of these shorthands can be changed. See
2079 @file{ly/script-init.ly} for examples.
2080
2081
2082 The script is automatically placed, but if you need to force
2083 directions, you can use @code{_} to force them down, or @code{^} to
2084 put them up
2085 @quotation
2086 @lilypond[fragment,verbatim]
2087   c''4^^ c''4_^
2088 @end lilypond
2089 @end quotation
2090
2091 Other symbols can be added using the syntax
2092 @var{note}@code{\}@var{name}, e.g. @code{c4\fermata}. Again, they
2093 can be forced up or down using @code{^} and @code{_},
2094 e.g.
2095
2096 @quotation
2097 @lilypond[verbatim,fragment,relative=3]
2098   c\fermata c^\fermata c_\fermata
2099 @end lilypond
2100 @end quotation
2101
2102
2103
2104 @cindex accent
2105 @cindex marcato
2106 @cindex staccatissimo
2107 @cindex fermata
2108 @cindex stopped
2109 @cindex staccato
2110 @cindex portato
2111 @cindex tenuto
2112 @cindex upbow
2113 @cindex downbow
2114 @cindex foot marks
2115 @cindex organ pedal marks
2116 @cindex turn
2117 @cindex open
2118 @cindex flageolet
2119 @cindex reverseturn
2120 @cindex trill
2121 @cindex prall
2122 @cindex mordent
2123 @cindex prallprall
2124 @cindex prallmordent
2125 @cindex prall, up
2126 @cindex prall, down
2127 @cindex mordent
2128 @cindex thumb marking
2129 @cindex segno
2130 @cindex coda
2131 @cindex varcoda
2132
2133 @quotation
2134 @lilypondfile[]{script-chart.ly}
2135 @end quotation
2136
2137 @refcommands
2138
2139 @cindex @code{\scriptUp}
2140 @code{\scriptUp}, 
2141 @cindex @code{\scriptDown}
2142 @code{\scriptDown}, 
2143 @cindex @code{\scriptBoth}
2144 @code{\scriptBoth}.
2145
2146 @seealso
2147
2148 Program reference: @internalsref{ScriptEvent}, and @internalsref{Script}.
2149
2150 @refbugs
2151
2152 These note ornaments appear in the printed output but have no
2153 effect on the MIDI rendering of the music.
2154
2155
2156 @node Fingering instructions
2157 @subsection Fingering instructions
2158
2159 @cindex fingering
2160
2161 Fingering instructions can be entered using
2162 @example
2163   @var{note}-@var{digit}
2164 @end example
2165 For finger changes, use markup texts
2166 @c
2167 @quotation
2168 @lilypond[verbatim,raggedright,fragment]
2169 c'4-1 c'4-2 c'4-3 c'4-4
2170 c'^\markup { \finger "2-3" }
2171 @end lilypond
2172 @end quotation
2173
2174 @cindex finger change
2175 @cindex scripts
2176 @cindex superscript
2177 @cindex subscript
2178
2179 You can use the thumb-script to indicate that a note should be
2180 played with the thumb (e.g. in cello music)
2181
2182 @quotation
2183 @lilypond[verbatim,raggedright,fragment]
2184 <a' a''-3>8_\thumb <b' b''-3>_\thumb
2185 @end lilypond
2186 @end quotation
2187
2188 Fingerings for chords can also be added to individual notes
2189 of the chord by adding them after the pitches
2190 @quotation
2191 @lilypond[verbatim,raggedright,fragment,relative=2]
2192 < c-1 e-2 g-3 b-5 >4
2193 @end lilypond
2194 @end quotation
2195
2196 @noindent
2197 In this case, setting @code{fingeringOrientations} will put  fingerings next
2198 to note heads
2199
2200 @quotation
2201 @lilypond[verbatim,raggedright,fragment,relative=2]
2202 \set fingeringOrientations = #'(left down)
2203 <c-1 es-2 g-4 bes-5 > 4
2204 \set fingeringOrientations = #'(up right down)
2205 <c-1 es-2 g-4 bes-5 > 4
2206 \set fingeringOrientations = #'(right)
2207 <es-2>4
2208 @end lilypond
2209 @end quotation
2210
2211 The last note demonstrates how fingering instructions can be put close
2212 to note heads in monophonic music, using this feature.
2213         
2214 @seealso
2215
2216 Program reference: @internalsref{FingerEvent}, and @internalsref{Fingering}.
2217
2218 Examples: @inputfileref{input/regression,finger-chords.ly}.
2219
2220 @node Text scripts
2221 @subsection Text scripts
2222 @cindex Text scripts
2223
2224 @cindex text items, non-empty
2225 @cindex non-empty texts
2226
2227 It is possible to place arbitrary strings of text or markup text (see
2228 @ref{Text markup}) above or below notes by using a string
2229 @code{c^"text"}.  By default, these indications do not influence the
2230 note spacing, but by using the command @code{\fatText}, the widths
2231 will be taken into account
2232 @c
2233 @quotation
2234 @lilypond[fragment,raggedright,verbatim]
2235 \relative c' {
2236   c4^"longtext" \fatText c4_"longlongtext" c4
2237 }
2238 @end lilypond
2239 @end quotation
2240
2241 It is possible to use @TeX{} commands in the strings, but this should
2242 be avoided because the exact dimensions of the string can then no
2243 longer be computed.
2244
2245 @refcommands
2246
2247 @cindex @code{\fatText}
2248 @code{\fatText}, 
2249 @cindex @code{\emptyText}
2250 @code{\emptyText}.
2251
2252 @seealso
2253
2254 In this manual: @ref{Text markup}.
2255
2256 Program reference: @internalsref{TextScriptEvent}, @internalsref{TextScript}.
2257
2258
2259
2260
2261 @node Grace notes
2262 @subsection Grace notes
2263
2264
2265 @c should have blurb about accaciatura / appogiatura
2266
2267 @cindex @code{\grace}
2268 @cindex ornaments
2269 @cindex grace notes
2270
2271 Grace notes are ornaments that are written out.  The most common ones
2272 are acciaccatura, which should be played as very short.  It is denoted
2273 by a slurred small note with a slashed stem.  The appoggiatura is a
2274 grace note that takes a fixed fraction of the main note, is and
2275 denoted as a slurred note in small print without a slash.
2276 They are entered with the commands @code{\acciaccatura} and
2277 @code{\appoggiatura}, as demonstrated in the following example
2278
2279
2280 @cindex appoggiatura
2281 @cindex acciaccatura
2282
2283 @quotation
2284 @lilypond[relative=3,verbatim,fragment]
2285 b4 \acciaccatura d8 c4 \appoggiatura e8 d4
2286 \acciaccatura { g16[ f] } e4
2287 @end lilypond
2288 @end quotation
2289
2290 Both are special forms of the @code{\grace} command. By prefixing this
2291 keyword to a music expression, a new one is formed, which will be
2292 printed in a smaller font and takes up no logical time in a measure.
2293 @quotation
2294 @lilypond[relative=3,verbatim,fragment]
2295 c4 \grace c16 c4
2296 \grace { c16[ d16] } c2 c4
2297 @end lilypond
2298 @end quotation
2299
2300 @noindent
2301 Unlike @code{\acciaccatura} and @code{\appoggiatura}, the
2302 @code{\grace} command does not start a slur.
2303
2304 Internally, timing for grace notes is done using a second, `grace'
2305 time. Every point in time consists of two rational numbers: one
2306 denotes the logical time, one denotes the grace timing. The above
2307 example is shown here with timing tuples
2308
2309 @quotation
2310 @lilypond[raggedright]
2311 <<
2312   \relative c''{ 
2313     c4 \grace c16  c4  \grace {
2314     c16[  d16] } c2 c4
2315   }
2316   \new Lyrics \lyrics {
2317     \markup { (0,0) } 4
2318     \grace { \markup {
2319       ( \fraction 1 4 ,  \fraction -1 16 ) } 16 }
2320     \markup { (\fraction 1 4 , 0 ) } 4
2321     \grace {
2322       \markup { (\fraction 2 4 , \fraction "-1" 8 ) } 16
2323       \markup { (\fraction 2 4 , \fraction "-1" 16 ) } 16
2324     } 
2325     \markup { ( \fraction 2 4 , 0 ) }
2326   }
2327 >>
2328 @end lilypond
2329 @end quotation
2330
2331
2332 The placement of grace notes is synchronized between different staves.
2333 In the following example, there are two sixteenth graces notes for
2334 every eighth grace note
2335
2336 @quotation
2337 @lilypond[relative=3,verbatim,fragment] 
2338 << \new Staff { e4 \grace { c16[ d e f] } e4 }
2339    \new Staff { c'4 \grace { g8[ b] } c4 } >>
2340 @end lilypond
2341 @end quotation
2342
2343
2344
2345 If you want to end a note with a grace, the standard trick is to put
2346 the grace notes after a ``space note''
2347
2348 @quotation
2349 @lilypond[fragment,verbatim,relative=3]
2350 \context Voice {
2351   << { d1^\trill ( }
2352      { s2 \grace { c16[ d] } } >>
2353   c4)
2354 }
2355 @end lilypond
2356 @end quotation
2357
2358 @noindent
2359 By adjusting the duration of the skip note (here it is a half-note),
2360 the space between the main-note and the grace is adjusted.
2361
2362
2363 A @code{\grace} section will introduce special typesetting settings,
2364 for example, to produce smaller type, and set directions. Hence, when
2365 introducing layout tweaks, they should be inside the grace section,
2366 for example,
2367 @quotation
2368 @lilypond[fragment,verbatim,relative=2]
2369 \new Voice {
2370   \acciaccatura {
2371     \override Stem #'direction = #-1
2372     f16->
2373     \revert Stem #'direction
2374   }
2375   g4
2376 }
2377 @end lilypond
2378 @end quotation
2379
2380 @noindent
2381 The overrides should also be reverted inside the grace section.
2382
2383 If the layout of grace sections must be changed throughout the music,
2384 then this can be accomplished through the function
2385 @code{add-grace-property}. The following example undefines the Stem
2386 direction for this grace, so stems do not always point up.
2387
2388 @example
2389 \new Staff @{
2390    #(add-grace-property "Voice" Stem direction '())
2391    @dots{}
2392 @}
2393 @end example
2394
2395 @noindent
2396 Another option is to change the variables @code{startGraceMusic},
2397 @code{stopGraceMusic}, @code{startAccacciaturaMusic},
2398 @code{stopAccacciaturaMusic}, @code{startAppoggiaturaMusic},
2399 @code{stopAppoggiaturaMusic}.  More information is in the file
2400 @file{ly/grace-init.ly}.
2401
2402
2403 @seealso
2404
2405 Program reference: @internalsref{GraceMusic}.
2406
2407 @refbugs
2408
2409 A score that starts with an @code{\grace} section needs an explicit
2410 @code{\context Voice} declaration, otherwise the main note and grace
2411 note end up on different staves.
2412
2413 Grace note synchronization can also lead to surprises. Staff notation,
2414 such as key signatures, bar lines, etc. are also synchronized. Take
2415 care when you mix staves with grace notes and staves without, for example,
2416
2417 @quotation
2418 @lilypond[relative=3,verbatim,fragment]
2419 << \new Staff { e4 \bar "|:" \grace c16 d4 }
2420    \new Staff { c4  \bar "|:"  d4 } >>
2421 @end lilypond
2422 @end quotation
2423
2424 @noindent
2425 This can be remedied by inserting grace skips, for the above example
2426
2427 @example
2428 \new Staff @{ c4  \bar "|:"  \grace s16 d4 @} >>
2429 @end example
2430
2431 Grace sections should only be used within sequential music
2432 expressions.  Nesting or juxtaposing grace sections is not supported,
2433 and might produce crashes or other errors.
2434
2435
2436 @node Glissando
2437 @subsection Glissando
2438 @cindex Glissando 
2439
2440 @cindex @code{\glissando}
2441
2442 A glissando is a smooth change in pitch. It is denoted by a line or a
2443 wavy line between two notes.
2444
2445
2446 A glissando line can be requested by attaching a @code{\glissando} to
2447 a note
2448
2449 @quotation
2450 @lilypond[fragment,relative=1,verbatim]
2451 c'\glissando c'
2452 @end lilypond
2453 @end quotation
2454
2455 @seealso
2456
2457 Program reference: @internalsref{Glissando}, and @internalsref{GlissandoEvent}.
2458
2459 Example files: @file{input/regression,glissando.ly}
2460
2461  
2462
2463 @refbugs
2464
2465 Printing text over the line (such as @emph{gliss.}) is not supported.
2466
2467
2468 @node Dynamics
2469 @subsection Dynamics
2470 @cindex Dynamics
2471
2472
2473
2474 @cindex @code{\ppp}
2475 @cindex @code{\pp}
2476 @cindex @code{\p}
2477 @cindex @code{\mp}
2478 @cindex @code{\mf}
2479 @cindex @code{\f}
2480 @cindex @code{\ff}
2481 @cindex @code{\fff}
2482 @cindex @code{\ffff}
2483 @cindex @code{\fp}
2484 @cindex @code{\sf}
2485 @cindex @code{\sff}
2486 @cindex @code{\sp}
2487 @cindex @code{\spp}
2488 @cindex @code{\sfz}
2489 @cindex @code{\rfz}
2490
2491
2492 Absolute dynamic marks are specified using a command after a note
2493 @code{c4\ff}.  The available dynamic marks are @code{\ppp},
2494 @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
2495 @code{\fff}, @code{\fff}, @code{\fp}, @code{\sf}, @code{\sff},
2496 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}
2497
2498 @quotation
2499 @lilypond[verbatim,raggedright,fragment,relative=1]
2500 c'\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
2501 c2\sf c\rfz
2502 @end lilypond
2503 @end quotation
2504
2505 @cindex @code{\<}
2506 @cindex @code{\>}
2507 @cindex @code{\"!}
2508
2509
2510
2511 A crescendo mark is started with @code{\<} and terminated with
2512 @code{\!}. A decrescendo is started with @code{\>} and also terminated
2513 with @code{\!}.  Because these marks are bound to notes, if you must
2514 use spacer notes if multiple marks during one note are needed
2515
2516 @quotation
2517 @lilypond[fragment,verbatim]
2518 c''\< c''\! d''\> e''\! 
2519 << f''1 { s4 s4\< s4\! \> s4\! } >>
2520 @end lilypond
2521 @end quotation
2522 This may give rise to very short hairpins. Use @code{minimum-length}
2523 in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
2524 example
2525
2526 @example
2527  \override Staff.Hairpin #'minimum-length = #5
2528 @end example
2529
2530 You can also use a text saying @emph{cresc.} instead of hairpins. Here
2531 is an example how to do it
2532
2533 @quotation
2534 @lilypond[fragment,relative=3,verbatim]
2535 \setTextCresc
2536 c \< d e f\!
2537 \setHairpinCresc
2538 e\> d c b\!
2539 @end lilypond
2540 @end quotation
2541
2542 @cindex crescendo
2543 @cindex decrescendo
2544
2545 You can also supply your own texts
2546 @quotation
2547 @lilypond[fragment,relative=1,verbatim]
2548 \context Voice {
2549   \set crescendoText = \markup { \italic "cresc. poco" }
2550   \set crescendoSpanner = #'dashed-line
2551   a'2\< a a a\!\mf
2552 }
2553 @end lilypond
2554 @end quotation
2555
2556 @cindex diminuendo
2557
2558
2559 @refcommands
2560
2561 @cindex @code{\dynamicUp}
2562 @code{\dynamicUp}, 
2563 @cindex @code{\dynamicDown}
2564 @code{\dynamicDown}, 
2565 @cindex @code{\dynamicBoth}
2566 @code{\dynamicBoth}.
2567
2568 @cindex direction, of dynamics
2569
2570 @seealso
2571
2572 Program reference: @internalsref{CrescendoEvent},
2573 @internalsref{DecrescendoEvent}, and
2574 @internalsref{AbsoluteDynamicEvent}.
2575
2576 Dynamics @internalsref{DynamicText} and @internalsref{Hairpin}
2577 objects. Vertical positioning of these symbols is handled by the
2578 @internalsref{DynamicLineSpanner} object.
2579
2580
2581 @node Repeats
2582 @section Repeats
2583
2584
2585 @cindex repeats
2586 @cindex @code{\repeat}
2587
2588
2589 Repetition is a central concept in music, and multiple notations exist
2590 for repetitions. In LilyPond, most of these notations can be captured
2591 in a uniform syntax. One of the advantages is that they can be
2592 rendered in MIDI accurately.
2593
2594 The following types of repetition are supported
2595
2596 @table @code
2597 @item unfold
2598 Repeated music is fully written (played) out.  Useful for MIDI
2599 output, and entering repetitive music.
2600
2601 @item volta
2602 This is the normal notation: Repeats are not written out, but
2603 alternative endings (volte) are printed, left to right.
2604
2605 @ignore
2606 @item fold
2607 Alternative endings are written stacked. This has limited use but may be
2608 used to typeset two lines of lyrics in songs with repeats, see
2609 @inputfileref{input,star-spangled-banner.ly}.
2610 @end ignore
2611
2612 @c tremolo, beamed
2613 @item tremolo
2614 Make tremolo beams.
2615
2616 @item percent
2617 Make beat or measure repeats. These look like percent signs.
2618
2619 @end table  
2620
2621 @menu
2622 * Repeat syntax::               
2623 * Repeats and MIDI::            
2624 * Manual repeat commands::      
2625 * Tremolo repeats::             
2626 * Tremolo subdivisions::        
2627 * Measure repeats::             
2628 @end menu
2629
2630 @node Repeat syntax
2631 @subsection Repeat syntax
2632
2633
2634 LilyPond has one syntactic construct for specifying different types of
2635 repeats.  The syntax is
2636
2637 @example
2638   \repeat @var{variant} @var{repeatcount} @var{repeatbody}
2639 @end example
2640
2641 If you have alternative endings, you may add
2642 @cindex @code{\alternative}
2643 @example
2644  \alternative @code{@{} @var{alternative1}
2645             @var{alternative2}
2646             @var{alternative3} @dots{} @code{@}}
2647 @end example
2648 where each @var{alternative} is a music expression.  If you do not
2649 give enough alternatives for all of the repeats, the first alternative
2650 is assumed to be played more than once.
2651
2652 Normal notation repeats are used like this
2653 @quotation
2654 @lilypond[fragment,verbatim,relative=2]
2655 c1
2656 \repeat volta 2 { c4 d e f }
2657 \repeat volta 2 { f e d c }
2658 @end lilypond
2659 @end quotation
2660
2661 With alternative endings
2662 @quotation
2663 @lilypond[fragment,verbatim,relative=2]
2664 c1
2665 \repeat volta 2 {c4 d e f} 
2666 \alternative { {d2 d} {f f,} }
2667 @end lilypond
2668 @end quotation
2669
2670
2671 @quotation
2672 @lilypond[fragment,verbatim,relative=2]
2673 \context Staff {
2674   \partial 4
2675   \repeat volta 4 { e | c2 d2 | e2 f2 | }
2676   \alternative { { g4 g g } { a | a a a a | b2. } }
2677 }
2678 @end lilypond
2679 @end quotation
2680
2681 @refbugs
2682
2683 A nested repeat like
2684
2685 @example 
2686 \repeat @dots{}
2687 \repeat @dots{}
2688 \alternative 
2689 @end example 
2690
2691 @noindent
2692 is ambiguous, since it is is not clear to which @code{\repeat} the
2693 @code{\alternative} belongs. This ambiguity is resolved by always
2694 having the @code{\alternative} belong to the inner @code{\repeat}.
2695 For clarity, it is advisable to use braces in such situations.
2696 @cindex ambiguity
2697
2698 @node Repeats and MIDI
2699 @subsection Repeats and MIDI
2700
2701 @cindex expanding repeats
2702
2703 For instructions on how to expand repeats for MIDI output, see the
2704 example file @inputfileref{input/test,unfold-all-repeats.ly}.
2705
2706
2707 @refbugs
2708
2709 Timing information is not remembered at the start of an alternative,
2710 so after a repeat timing information must be reset by hand, for
2711 example by setting @code{Score.measurePosition} or entering
2712 @code{\partial}.  Similarly, slurs or ties are also not repeated.
2713
2714
2715 @node Manual repeat commands
2716 @subsection Manual repeat commands
2717
2718 @cindex @code{repeatCommands}
2719
2720 The property @code{repeatCommands} can be used to control the layout of
2721 repeats. Its value is a Scheme list of repeat commands, where each repeat
2722 command can be
2723
2724 @table @asis
2725 @item the symbol @code{start-repeat},
2726   which prints a @code{|:} bar line,
2727 @item the symbol @code{end-repeat},
2728   which prints a @code{:|} bar line,
2729 @item the list @code{(volta @var{text})},
2730   which prints a volta bracket saying @var{text}: The text can be specified as
2731 a text string or as a markup text, see @ref{Text markup}. Do not
2732 forget to change the font, as the default number font does not contain
2733 alphabetic characters. Or,
2734 @item the list @code{(volta #f)}, which 
2735   stops a running volta bracket
2736 @end table
2737
2738 @quotation
2739 @lilypond[verbatim,fragment,relative=3]
2740  c4
2741     \set Score.repeatCommands = #'((volta "93") end-repeat)
2742  c4 c4
2743     \set Score.repeatCommands = #'((volta #f))
2744  c4 c4
2745 @end lilypond
2746 @end quotation
2747
2748
2749 @seealso
2750
2751 Program reference: @internalsref{VoltaBracket}, @internalsref{RepeatedMusic},
2752 @internalsref{VoltaRepeatedMusic},
2753 @internalsref{UnfoldedRepeatedMusic}, and
2754 @internalsref{FoldedRepeatedMusic}.
2755
2756 @node Tremolo repeats
2757 @subsection Tremolo repeats
2758 @cindex tremolo beams
2759
2760 To place tremolo marks between notes, use @code{\repeat} with tremolo
2761 style
2762 @quotation
2763 @lilypond[verbatim,raggedright]
2764 \score { 
2765   \context Voice \notes\relative c' {
2766     \repeat "tremolo" 8 { c16 d16 }
2767     \repeat "tremolo" 4 { c16 d16 }    
2768     \repeat "tremolo" 2 { c16 d16 }
2769   }
2770 }
2771 @end lilypond
2772 @end quotation
2773
2774 Tremolo marks can also be put on a single note.  In this case, the
2775 note should not be surrounded by braces.
2776 @quotation
2777 @lilypond[verbatim,raggedright]
2778     \repeat "tremolo" 4 c'16
2779 @end lilypond
2780 @end quotation
2781
2782 A similar mechanism  is the tremolo subdivision, described in
2783 @ref{Tremolo subdivisions}.
2784
2785 @seealso
2786
2787 In this manual: @ref{Tremolo subdivisions}, @ref{Repeats}.
2788
2789 Program reference: tremolo beams are @internalsref{Beam} objects. Single stem
2790 tremolos are @internalsref{StemTremolo} objects.  The music expression is
2791 @internalsref{TremoloEvent}.
2792
2793 Example files: @inputfileref{input/regression,chord-tremolo.ly},
2794 @inputfileref{input/regression,stem-tremolo.ly}.
2795
2796 @node Tremolo subdivisions
2797 @subsection Tremolo subdivisions
2798 @cindex tremolo marks
2799 @cindex @code{tremoloFlags}
2800
2801 Tremolo marks can be printed on a single note by adding
2802 `@code{:}[@var{length}]' after the note.  The length must be at least
2803 8.  A @var{length} value of 8 gives one line across the note stem.  If
2804 the length is omitted, the last value (stored in @code{tremoloFlags})
2805 is used
2806
2807 @quotation
2808 @lilypond[verbatim,fragment]
2809   c'2:8 c':32 | c': c': |
2810 @end lilypond
2811 @end quotation
2812
2813 @c [TODO : stok is te kort bij 32en]
2814
2815 @refbugs
2816
2817 Tremolos entered in this way do not carry over into the MIDI output.
2818
2819 @seealso
2820
2821 In this manual: @ref{Tremolo repeats}.
2822
2823 Elsewhere: @internalsref{StemTremolo}, @internalsref{TremoloEvent}.
2824
2825 @node Measure repeats
2826 @subsection Measure repeats
2827
2828 @cindex percent repeats
2829 @cindex measure repeats
2830
2831 In the @code{percent} style, a note pattern can be repeated. It is
2832 printed once, and then the pattern is replaced with a special sign.
2833 Patterns of a one and two measures are replaced by percent-like signs,
2834 patterns that divide the measure length are replaced by slashes
2835
2836 @quotation
2837 @lilypond[verbatim,raggedright]
2838  \context Voice { \repeat  "percent" 4  { c'4 }
2839     \repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 }
2840 }
2841 @end lilypond
2842 @end quotation   
2843
2844 @seealso
2845
2846 Program reference: @internalsref{RepeatSlash}, @internalsref{PercentRepeat},
2847 @internalsref{PercentRepeatedMusic}, and
2848 @internalsref{DoublePercentRepeat}.
2849
2850
2851
2852 @node Rhythmic music
2853 @section Rhythmic music
2854
2855
2856 @menu
2857 * Showing melody rhythms::      
2858 * Entering percussion::         
2859 * Percussion staves::           
2860 @end menu
2861
2862
2863 @node Showing melody rhythms
2864 @subsection Showing melody rhythms
2865
2866 Sometimes you might want to show only the rhythm of a melody.  This
2867 can be done with the rhythmic staff. All pitches of notes on such a
2868 staff are squashed, and the staff itself has a single line
2869
2870 @quotation
2871 @lilypond[fragment,relative=1,verbatim]
2872   \context RhythmicStaff {
2873       \time 4/4
2874       c4 e8 f  g2 | r4 g r2 | g1:32 | r1 |
2875   }
2876 @end lilypond
2877 @end quotation
2878
2879 @seealso
2880
2881 Program reference: @internalsref{RhythmicStaff}.
2882
2883 Examples: @inputfileref{input/regression,rhythmic-staff.ly}.
2884
2885
2886 @node Entering percussion
2887 @subsection Entering percussion
2888
2889 @cindex percussion
2890 @cindex drums
2891
2892
2893 Percussion notes may be entered in @code{\drums} mode, which is
2894 similar to @code{notes}.  Each piece of percussion has a full name and
2895 an abbreviated name, and both be used in input files
2896
2897 @example
2898   hihat hh bassdrum bd
2899 @end example
2900 @quotation
2901 @lilypond[raggedright]
2902         \new DrumStaff \drums {   hihat hh bassdrum bd
2903  }
2904 @end lilypond
2905 @end quotation
2906
2907 The complete list of drum names is in the init file
2908 @file{ly/drumpitch-init.ly}.
2909 @c TODO: properly document this.
2910
2911 @seealso
2912
2913 Program reference: @internalsref{DrumNoteEvent}.
2914
2915 @node Percussion staves
2916 @subsection Percussion staves
2917 @cindex percussion
2918 @cindex drums
2919
2920 A percussion part for more than one instrument typically uses a
2921 multiline staff where each position in the staff refers to one piece
2922 of percussion.
2923
2924
2925 To typeset the music, the notes must be interpreted in a
2926 @internalsref{DrumStaff} and @internalsref{DrumVoice} contexts
2927
2928 @c
2929 @quotation
2930 @lilypond[raggedright,verbatim]
2931 up = \drums { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
2932 down = \drums { bassdrum4 snare8 bd r bd sn4 }
2933 \score {
2934     \new DrumStaff
2935         << \new DrumVoice { \voiceOne \up } 
2936            \new DrumVoice { \voiceTwo \down } 
2937 >> }
2938 @end lilypond
2939 @end quotation
2940
2941 The above example shows verbose polyphonic notation. The short
2942 polyphonic notation, described in @ref{Polyphony}, can also be used if
2943 the @internalsref{DrumVoices} are instantiated by hand first. For example, 
2944
2945 @quotation
2946 @lilypond[fragment,verbatim] 
2947 \drums \new DrumStaff <<
2948   \context DrumVoice = "1" {  s1 *2 }
2949   \context DrumVoice = "2" {  s1 *2 }
2950   {
2951     bd4 sn4 bd4 sn4
2952     <<
2953       { \repeat unfold 16 hh16 }
2954       \\
2955       { bd4 sn4 bd4 sn4 }
2956     >>
2957   }   
2958 >>
2959 @end lilypond
2960 @end quotation
2961
2962
2963 There are also other layout possibilities. To use these, set the
2964 property @code{drumStyleTable} in context @internalsref{DrumVoice}.
2965 The following variables have been predefined
2966
2967 @table @code
2968 @item drums-style
2969 is the default. It typesets a typical drum kit on a five-line staff
2970
2971 @quotation
2972 @lilypond[noindent]
2973 nam = \lyrics { cymc cyms cymr hh hhc hho hhho hhp cb hc
2974     bd sn ss tomh tommh tomml toml tomfh tomfl }
2975 mus = \drums  { cymc cyms cymr hh | hhc hho hhho hhp | \break cb hc
2976     bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
2977 \score {
2978     << \new DrumStaff\with {
2979             \remove Bar_engraver
2980             \remove Time_signature_engraver
2981             \override Stem #'transparent = ##t
2982             \override Stem #'Y-extent-callback = ##f
2983             minimumVerticalExtent = #'(-4.0 . 5.0)
2984     } \mus
2985         \context Lyrics \nam 
2986     >>
2987     \paper {
2988     %% need to do this, because of indented @itemize
2989     linewidth= 9 \cm 
2990     \context { \ScoreContext
2991     \override LyricText #'font-family = #'typewriter
2992     \override BarNumber #'transparent =##T
2993 }}}
2994 @end lilypond
2995 @end quotation
2996
2997 The drum scheme supports six different toms.  When there fewer toms, simply
2998 select the toms that produce the desired result, i.e. to get toms on
2999 the three middle lines you use @code{tommh}, @code{tomml} and
3000 @code{tomfh}.
3001
3002 @item timbales-style
3003 to typeset timbales on a two line staff
3004
3005 @quotation
3006 @lilypond[raggedright]
3007 nam = \lyrics { timh ssh timl ssl cb }
3008 mus = \drums  { timh ssh timl ssl cb s16 }
3009 \score {
3010     <<
3011         \context DrumStaff \with {
3012             \remove Bar_engraver
3013             \remove Time_signature_engraver
3014             \override Stem #'transparent = ##t
3015             \override Stem #'Y-extent-callback = ##f
3016             \override StaffSymbol #'line-count = #2
3017             \override StaffSymbol #'staff-space = #2
3018             minimumVerticalExtent = #'(-3.0 . 4.0)
3019             drumStyleTable = #timbales-style
3020         } \mus
3021         \context Lyrics {
3022             \override LyricText #'font-family = #'typewriter
3023
3024         \nam  }
3025     >>
3026 }
3027 @end lilypond
3028 @end quotation
3029 @item congas-style
3030 to typeset congas on a two line staff
3031
3032 @quotation
3033 @lilypond[raggedright]
3034 nam = \lyrics { cgh cgho cghm ssh cgl cglo cglm ssl }
3035 mus = \drums  { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
3036 \score {
3037     <<
3038         \context DrumStaff\with {
3039             \remove Bar_engraver
3040             \remove Time_signature_engraver
3041             drumStyleTable = #congas-style
3042             \override StaffSymbol #'line-count = #2
3043             
3044             %% this sucks; it will lengthen stems.
3045             \override StaffSymbol #'staff-space = #2
3046             \override Stem #'transparent = ##t
3047             \override Stem #'Y-extent-callback = ##f
3048         } \mus
3049         \context Lyrics {
3050                     \override LyricText #'font-family = #'typewriter
3051 \nam  }
3052     >>
3053 }
3054 @end lilypond
3055 @end quotation
3056 @item bongos-style
3057 to typeset bongos on a two line staff
3058
3059 @quotation
3060 @lilypond[raggedright]
3061 nam = \lyrics { boh boho bohm ssh bol bolo bolm ssl }
3062 mus = \drums  { boh boho bohm ssh bol bolo bolm ssl s16 }
3063 \score {
3064     <<
3065         \context DrumStaff\with {
3066             \remove Bar_engraver
3067             \remove Time_signature_engraver
3068             \override StaffSymbol #'line-count = #2
3069             drumStyleTable = #bongos-style
3070            
3071             %% this sucks; it will lengthen stems.
3072             \override StaffSymbol #'staff-space = #2
3073             \override Stem #'transparent = ##t
3074             \override Stem #'Y-extent-callback = ##f
3075         } \mus
3076         \context Lyrics {
3077                     \override LyricText #'font-family = #'typewriter
3078 \nam  }
3079     >>
3080 }
3081 @end lilypond
3082 @end quotation
3083
3084 @item percussion-style
3085 to typeset all kinds of simple percussion on one line staves
3086 @quotation
3087 @lilypond[raggedright]
3088 nam = \lyrics { tri trio trim gui guis guil cb cl tamb cab mar hc }
3089 mus = \drums  { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
3090 \score {
3091     <<
3092         \context DrumStaff\with{
3093             \remove Bar_engraver
3094             drumStyleTable = #percussion-style
3095             \override StaffSymbol #'line-count = #1
3096             \remove Time_signature_engraver
3097             \override Stem #'transparent = ##t
3098             \override Stem #'Y-extent-callback = ##f
3099         } \mus
3100         \context Lyrics {
3101         \nam
3102                     \override LyricText #'font-family = #'typewriter
3103 }
3104     >>
3105 }
3106 @end lilypond
3107 @end quotation
3108 @end table
3109
3110 If you do not like any of the predefined lists you can define your own
3111 list at the top of your file
3112
3113 @quotation
3114 @lilypond[raggedright,verbatim]
3115 #(define mydrums '(
3116         (bassdrum     default   #f        -1)
3117         (snare        default   #f        0)
3118         (hihat        cross     #f        1)
3119         (pedalhihat   xcircle   "stopped" 2)
3120         (lowtom       diamond   #f       3)
3121 ))
3122 up = \drums { hh8 hh hh hh hhp4 hhp }
3123 down = \drums { bd4 sn bd toml8 toml }
3124 \score {
3125     \new DrumStaff <<
3126         \set DrumStaff.drumStyleTable
3127  = #(alist->hash-table mydrums)
3128         \new DrumVoice { \voiceOne \up }
3129         \new DrumVoice { \voiceTwo \down }
3130     >>
3131 }
3132 @end lilypond
3133 @end quotation
3134
3135
3136 @seealso
3137
3138 Init files: @file{ly/drumpitch-init.ly}.
3139
3140 Program reference: @internalsref{DrumStaff}, @internalsref{DrumVoice}.
3141
3142 @refbugs
3143
3144 Because general MIDI does not contain rim shots, the sidestick is used
3145 for this purpose instead.
3146
3147 @node Piano music
3148 @section Piano music
3149
3150 Piano staves are two normal staves coupled with a brace.  The staves
3151 are largely independent, but sometimes voices can cross between the
3152 two staves.  The same notation is also used for harps and other key
3153 instruments.  The @internalsref{PianoStaff} is especially built to
3154 handle this cross-staffing behavior.  In this section we discuss the
3155 @internalsref{PianoStaff} and some other pianistic peculiarities.
3156
3157
3158 @menu
3159 * Automatic staff changes::     
3160 * Manual staff switches::       
3161 * Pedals::                      
3162 * Arpeggio::                    
3163 * Staff switch lines::          
3164 @end menu 
3165
3166 @refbugs
3167
3168 There is no support for putting chords across staves.  You can get
3169 this result by increasing the length of the stem in the lower stave so
3170 it reaches the stem in the upper stave, or vice versa. An example is
3171 included with the distribution as
3172 @inputfileref{input/test,stem-cross-staff.ly}.
3173
3174 Dynamics are not centered, but kludges do exist. See
3175 @inputfileref{input/template,piano-dynamics.ly}.
3176
3177 @cindex cross staff stem
3178 @cindex stem, cross staff
3179 @cindex distance between staves in piano music
3180
3181 The distance between the two staves is normally fixed across the
3182 entire score. It is possible to tune this per system, but it does
3183 require arcane command incantations. See
3184 @inputfileref{input/test,piano-staff-distance.ly}.
3185
3186
3187 @node Automatic staff changes
3188 @subsection Automatic staff changes
3189 @cindex Automatic staff changes
3190
3191 Voices can switch automatically between the top and the bottom
3192 staff. The syntax for this is
3193 @example
3194   \autochange \context Voice @{ @dots{}@var{music}@dots{} @}
3195 @end example
3196 The two staves of the piano staff must be named @code{up} and
3197 @code{down}.
3198
3199 The autochanger switches on basis of pitch (middle C is the turning
3200 point), and it looks ahead skipping over rests to switch in
3201 advance. Here is a practical example
3202         
3203 @quotation
3204 @lilypond[verbatim,raggedright]
3205 \score { \notes \context PianoStaff <<
3206   \context Staff = "up" {
3207     \autochange \new Voice \relative c' {
3208        g4 a  b c d r4 a g } }
3209   \context Staff = "down" {
3210        \clef bass
3211        s1*2
3212 } >> }
3213 @end lilypond
3214 @end quotation
3215
3216 @noindent
3217 In this example, spacer rests are used to prevent the bottom staff from
3218 terminating too soon.
3219
3220
3221 @seealso
3222
3223 In this manual: @ref{Manual staff switches}.
3224
3225 Program reference: @internalsref{AutoChangeMusic}.
3226
3227
3228
3229 @refbugs
3230
3231 The staff switches often do not end up in optimal places. For high
3232 quality output, staff switches should be specified manually.
3233
3234
3235
3236 @node Manual staff switches
3237 @subsection Manual staff switches
3238
3239 @cindex manual staff switches
3240 @cindex staff switch, manual
3241
3242 Voices can be switched between staves manually, using the following command
3243 @example
3244   \change Staff = @var{staffname} @var{music}
3245 @end example
3246
3247 @noindent
3248 The string @var{staffname} is the name of the staff. It switches the
3249 current voice from its current staff to the Staff called
3250 @var{staffname}. Typically @var{staffname} is @code{"up"} or
3251 @code{"down"}.
3252
3253
3254
3255 @node Pedals
3256 @subsection Pedals
3257 @cindex Pedals
3258
3259 Pianos have pedals that alter the way sound are produced. Generally, a
3260 piano has three pedals, sustain, una corda, and sostenuto.
3261
3262
3263 Piano pedal instruction can be expressed by attaching
3264 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
3265 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
3266 note or chord
3267
3268 @quotation
3269 @lilypond[fragment,verbatim]
3270   c'4\sustainDown c'4\sustainUp
3271 @end lilypond
3272 @end quotation
3273
3274 What is printed can be modified by setting @code{pedal@var{X}Strings},
3275 where @var{X} is one of the pedal types: @code{Sustain},
3276 @code{Sostenuto} or @code{UnaCorda}.  Refer to
3277 @internalsref{SustainPedal} in the program reference for more
3278 information.
3279
3280 Pedals can also be indicated by a sequence of brackets, by setting the 
3281 @code{pedalSustainStyle} property to @code{bracket} objects
3282
3283 @quotation
3284 @lilypond[fragment,verbatim,relative=3]
3285  \set Staff.pedalSustainStyle = #'bracket
3286  c\sustainDown d e
3287  b\sustainUp\sustainDown
3288  b g \sustainUp a \sustainDown \bar "|."
3289 @end lilypond
3290 @end quotation
3291
3292 A third style of pedal notation is a mixture of text and brackets,
3293 obtained by setting the @code{pedalSustainStyle} style property to
3294 @code{mixed}
3295
3296 @quotation
3297 @lilypond[fragment,verbatim,relative=3]
3298  \set Staff.pedalSustainStyle = #'mixed
3299  c\sustainDown d e
3300  b\sustainUp\sustainDown
3301  b g \sustainUp a \sustainDown \bar "|."
3302 @end lilypond
3303 @end quotation
3304
3305 The default `*Ped.' style for sustain and damper pedals corresponds to
3306 style @code{#'text}. The sostenuto pedal uses @code{mixed} style by
3307 default.
3308
3309 @quotation
3310 @lilypond[fragment,verbatim,relative=3]
3311   c\sostenutoDown d e c, f g a\sostenutoUp
3312 @end lilypond
3313 @end quotation
3314
3315 For fine-tuning of the appearance of a pedal bracket, the properties
3316 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
3317 @code{PianoPedalBracket} objects (see
3318 @internalsref{PianoPedalBracket} in the Program reference)  can be modified.  For example, the
3319 bracket may be extended to the end of the note head
3320
3321 @quotation
3322 @lilypond[fragment,verbatim]
3323 \override Staff.PianoPedalBracket  
3324    #'shorten-pair = #'(0 . -1.0)
3325   c\sostenutoDown d e c, f g a\sostenutoUp
3326 @end lilypond
3327 @end quotation
3328
3329 @node Arpeggio
3330 @subsection Arpeggio
3331 @cindex Arpeggio
3332
3333 @cindex broken arpeggio
3334 @cindex @code{\arpeggio}
3335
3336 You can specify an arpeggio sign on a chord by attaching an
3337 @code{\arpeggio} to a chord
3338
3339
3340 @quotation
3341 @lilypond[fragment,relative=1,verbatim]
3342   <c e g c>\arpeggio
3343 @end lilypond
3344 @end quotation
3345
3346 When an arpeggio crosses staves, you attach an arpeggio to the chords
3347 in both staves, and set
3348 @internalsref{PianoStaff}.@code{connectArpeggios}
3349
3350 @quotation
3351 @lilypond[fragment,relative=1,verbatim]
3352   \context PianoStaff <<
3353     \set PianoStaff.connectArpeggios = ##t
3354     \new Staff  { <c' e g c>\arpeggio }
3355     \new Staff { \clef bass  <c,, e g>\arpeggio }
3356   >>
3357 @end lilypond
3358 @end quotation
3359
3360 The direction of the arpeggio is sometimes denoted by adding an
3361 arrowhead to the wiggly line
3362
3363 @quotation
3364 @lilypond[fragment,relative=1,verbatim]
3365   \context Voice {
3366      \arpeggioUp
3367      <c e g c>\arpeggio
3368      \arpeggioDown
3369      <c e g c>\arpeggio
3370   }
3371 @end lilypond
3372 @end quotation
3373
3374 A square bracket on the left indicates that the player should not
3375 arpeggiate the chord
3376
3377 @quotation
3378 @lilypond[fragment,relative=1,verbatim]
3379      \arpeggioBracket
3380     <c' e g c>\arpeggio
3381 @end lilypond
3382 @end quotation
3383
3384 @refcommands
3385
3386 @cindex @code{\arpeggio}
3387 @code{\arpeggio},
3388 @cindex @code{\arpeggioUp}
3389 @code{\arpeggioUp},
3390 @cindex @code{\arpeggioDown}
3391 @code{\arpeggioUp},
3392 @cindex @code{\arpeggioBoth}
3393 @code{\arpeggioBoth},
3394 @cindex @code{\arpeggioBracket}
3395 @code{\arpeggioBracket}.
3396
3397 @seealso
3398
3399 Program reference: @internalsref{ArpeggioEvent} music expressions lead to
3400 @internalsref{Arpeggio} objects.  Cross staff arpeggios are
3401 @internalsref{PianoStaff}.@internalsref{Arpeggio}.
3402
3403 @refbugs
3404
3405 It is not possible to mix connected arpeggios and unconnected
3406 arpeggios in one @internalsref{PianoStaff} at the same time.
3407
3408 @node Staff switch lines
3409 @subsection Staff switch lines
3410
3411
3412 @cindex follow voice
3413 @cindex staff switching
3414 @cindex cross staff
3415
3416 @cindex @code{followVoice}
3417
3418 Whenever a voice switches to another staff a line connecting the notes
3419 can be printed automatically. This is enabled if the property
3420 @code{PianoStaff.followVoice} is set to true
3421
3422 @quotation
3423 @lilypond[fragment,relative=1,verbatim]
3424   \context PianoStaff <<
3425     \set PianoStaff.followVoice = ##t
3426     \context Staff \context Voice {
3427       c1
3428       \change Staff=two
3429       b2 a
3430     }
3431     \context Staff=two { \clef bass \skip 1*2 }
3432   >>  
3433 @end lilypond
3434 @end quotation
3435
3436 @seealso
3437
3438 The associated object is @internalsref{VoiceFollower}.
3439
3440 @refcommands
3441
3442 @cindex @code{\showStaffSwitch}
3443 @code{\showStaffSwitch}, 
3444 @cindex @code{\hideStaffSwitch}
3445 @code{\hideStaffSwitch}.
3446
3447
3448 @node Vocal music
3449 @section Vocal music
3450
3451 This section discusses how to enter and print lyrics.
3452
3453 @menu
3454 * Entering lyrics::             
3455 * The Lyrics context::          
3456 * More stanzas::                
3457 * Ambitus::                     
3458 @end menu
3459
3460 @node Entering lyrics
3461 @subsection Entering lyrics
3462
3463
3464 @cindex lyrics
3465 @cindex @code{\lyrics}
3466 @cindex punctuation
3467
3468 Lyrics are entered in a special input mode. This mode is is introduced
3469 by the keyword @code{\lyrics}.  In this mode you can enter lyrics, with
3470 punctuation and accents without any hassle.  Syllables are entered like
3471 notes, but with pitches replaced by text.  For example,
3472 @example
3473   \lyrics @{ Twin-4 kle4 twin- kle litt- le star2 @}
3474 @end example
3475
3476 A word in Lyrics mode begins with: an alphabetic character, @code{_},
3477 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
3478 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
3479 any 8-bit character with ASCII code over 127, or a two-character
3480 combination of a backslash followed by one of @code{`}, @code{'},
3481 @code{"}, or @code{^}.
3482
3483 Subsequent characters of a word can be any character that is not a digit
3484 and not white space.  One important consequence of this is that a word
3485 can end with @code{@}}. The following example is usually a bug. The
3486 syllable includes a @code{@}}, and hence the opening brace is not balanced
3487 @example
3488   \lyrics @{ twinkle@}
3489 @end example
3490
3491 @cindex @code{\property}, in @code{\lyrics}
3492 Similarly, a period following a alphabetic sequence, is included in
3493 the resulting string. As a consequence, spaces must be inserted around
3494 property commands
3495 @example
3496   \override Score . LyricText #'font-shape = #'italic
3497 @end example
3498
3499 @cindex @code{_}
3500 @cindex spaces, in lyrics
3501 @cindex quotes, in lyrics
3502
3503 Any @code{_} character which appears in an unquoted word is converted
3504 to a space.  This provides a mechanism for introducing spaces into words
3505 without using quotes.  Quoted words can also be used in Lyrics mode to
3506 specify words that cannot be written with the above rules
3507
3508 @example
3509   \lyrics @{ He said: "\"Let" my peo ple "go\"" @}
3510 @end example
3511 However, at least for english texts, you should use 
3512 @example
3513   \lyrics @{ He said: ``Let my peo ple go'' @}
3514 @end example
3515 to get the correct shape of the starting and ending quote.
3516
3517 @cindex hyphens
3518
3519 Centered hyphens are entered as `@code{-}@code{-}' between syllables.
3520 The hyphen will have variable length depending on the space between
3521 the syllables and it will be centered between the syllables.
3522
3523 @cindex melisma
3524 @cindex extender
3525
3526 When a lyric is sung over many notes (this is called a melisma), this is
3527 indicated with a horizontal line centered between a syllable and the
3528 next one. Such a line is called an extender line, and it is entered as
3529 @code{__}.
3530
3531 @seealso
3532
3533 Program reference: events @internalsref{LyricEvent},
3534 @internalsref{HyphenEvent}, and @internalsref{ExtenderEvent}. Objects
3535 @internalsref{LyricHyphen}, @internalsref{LyricExtender} and
3536 @internalsref{LyricText}.
3537
3538 Examples: @inputfileref{input/test,lyric-hyphen-retain.ly}.
3539
3540 @refbugs
3541
3542 The definition of lyrics mode is too complex.
3543
3544
3545
3546 @node The Lyrics context
3547 @subsection  The Lyrics context
3548
3549 Lyrics are printed by interpreting them in a @internalsref{Lyrics} context
3550 @example
3551  \context Lyrics \lyrics @dots{}
3552 @end example
3553
3554 @cindex automatic syllable durations
3555 @cindex @code{\lyricsto}
3556 @cindex lyrics and melodies
3557
3558 This will place the lyrics according to the durations that were
3559 entered. The lyrics can also be aligned under a given melody
3560 automatically.  In this case, it is no longer necessary to enter the
3561 correct duration for each syllable.  This is achieved by combining the
3562 melody and the lyrics with the @code{\lyricsto} expression
3563 @example
3564 \lyricsto @var{name} \new Lyrics @dots{} 
3565 @end example
3566
3567 This aligns the lyrics to the
3568 @c
3569 notes of the @internalsref{Voice} context called @var{name}, which has
3570 to exist. Therefore, normally the @code{Voice} is specified first, and
3571 then the lyrics are specified with @code{\lyricsto}.
3572
3573 For different or more complex orderings, the best way is to setup the
3574 hierarchy of staves and lyrics first, e.g.
3575 @example
3576 \context ChoirStaff \notes <<
3577   \context Lyrics = sopranoLyrics @{ s1 @}
3578   \context Voice = soprano @{ @emph{music} @}
3579   \context Lyrics = tenorLyrics @{ s1 @}
3580   \context Voice = tenor @{ @emph{music} @}
3581 >>
3582 @end example
3583 and then combine the appropriate melodies and lyric lines
3584 @example
3585   \lyricsto "soprano" \context Lyrics = sopranoLyrics
3586      @emph{the lyrics}
3587 @end example
3588
3589 @noindent
3590 The final input would resemble
3591
3592 @example
3593   << \context ChoirStaff \notes << @emph{setup the music}  >>
3594      \lyricsto "soprano" @emph{etc}
3595      \lyricsto "alto" @emph{etc}
3596      @emph{etc}
3597   >>
3598 @end example 
3599
3600
3601 The @code{\lyricsto} command detects melismata: it only puts one
3602 syllable under a tied or slurred group of notes. If you want to force
3603 an unslurred group of notes to be a melisma, insert @code{\melisma}
3604 after the first note of the group, and @code{\melismaEnd} after the
3605 last one, e.g.
3606
3607 @quotation
3608 @lilypond[relative=2,raggedright,fragment,verbatim]
3609 <<  \context Voice = "lala" { \time 3/4
3610     f4 g8
3611     \melisma 
3612     f e f
3613     \melismaEnd
3614      e2 }
3615   \lyricsto "lala" \new Lyrics \lyrics {
3616     la di __ daah 
3617   } >>
3618 @end lilypond
3619 @end quotation
3620
3621 In addition, notes are considered a melisma if they are manually
3622 beamed, and automatic beaming (see @ref{Setting automatic beam
3623 behavior}) is switched off.  The criteria for deciding melismata can
3624 be tuned with the property @code{melismaBusyProperties}. See
3625 @internalsref{Melisma_translator} in the program reference for more
3626 information.
3627
3628 When multiple stanzas are put on the same melody, it can happen that
3629 two stanzas have melismata in different locations. This can be
3630 remedied by switching off melismata for one
3631 @internalsref{Lyrics}. This is achieved by setting
3632 the @code{ignoreMelismata} property to @code{#t}. An example is shown
3633 in @inputfileref{input/regression,lyric-combine-new.ly}.
3634
3635 @cindex SATB
3636 @cindex choral score
3637
3638 A complete example of a SATB score setup is in the file
3639 @inputfileref{input/template,satb.ly}.
3640
3641
3642 @refcommands
3643
3644 @code{\melisma}, @code{\melismaEnd}
3645 @cindex @code{\melismaEnd}
3646 @cindex @code{\melisma}
3647
3648 @seealso
3649
3650 Program reference: Music expressions: @internalsref{LyricCombineMusic},
3651 Contexts: @internalsref{Lyrics}, @internalsref{Melisma_translator}.
3652
3653 Examples: @inputfileref{input/template,satb.ly},
3654 @inputfileref{input/regression,lyric-combine-new.ly}.
3655  
3656 @refbugs
3657
3658 Melismata are not detected automatically, and extender lines must be
3659 inserted by hand.
3660
3661
3662 For proper processing of extender lines, the
3663 @internalsref{Lyrics} and @internalsref{Voice} should be
3664 linked. This can be achieved either by using @code{\lyricsto} or by
3665 setting corresponding names for both contexts. The latter is explained
3666 in @ref{More stanzas}.
3667
3668 @node More stanzas
3669 @subsection More stanzas
3670
3671 @cindex phrasing, in lyrics
3672
3673
3674 The lyrics should be aligned with the note heads of the melody. To
3675 achieve this, each line of lyrics should be marked to correspond with
3676 the melodic line. This is done automatically when @code{\lyricsto},
3677 but it can also be done manually. 
3678
3679 To this end, give the @internalsref{Voice} context an identity
3680 @example
3681 \context Voice = duet @{
3682      \time 3/4
3683      g2 e4 a2 f4 g2.  @}
3684 @end example
3685
3686 Then set the @internalsref{Lyrics} contexts to names starting with
3687 that identity followed by a dash.  In the preceding example, the
3688 @internalsref{Voice} identity is @code{duet}, so the identities of the
3689 @internalsref{Lyrics}s are marked @code{duet-1} and @code{duet-2}
3690 @example
3691   \context Lyrics = "duet-1" @{
3692     Hi, my name is Bert. @}
3693   \context Lyrics = "duet-2" @{
3694     Ooooo, ch\'e -- ri, je t'aime. @}
3695 @end example
3696
3697 The complete example is shown here
3698 @quotation
3699 @lilypond[raggedright,verbatim]
3700 \score {
3701   << \notes \relative c'' \context Voice = duet { \time 3/4
3702      g2 e4 a2 f4 g2.  }
3703   \lyrics << \lyricsto "duet" \new Lyrics {
3704     \set vocalName = "Bert"
3705     Hi, my name is Bert. }
3706   \lyricsto "duet" \new Lyrics {
3707     \set vocalName = "Ernie"
3708     Ooooo, ch\'e -- ri, je t'aime.
3709     }
3710   >> >>
3711 }
3712 @end lilypond
3713 @end quotation
3714
3715 @cindex stanza number
3716 @cindex singer's names
3717 @cindex name of singer 
3718
3719 Stanza numbers can be added by setting @code{stanza}, e.g.
3720
3721 @quotation
3722 @lilypond[verbatim,relative=3]
3723 << \context Voice = duet { \time 3/4
3724      g2 e4 a2 f4 g2.  }
3725    \lyrics \lyricsto "duet" \new Lyrics {
3726        \set stanza = "1. "
3727        Hi, my name is Bert.
3728    }
3729 >>
3730 @end lilypond
3731 @end quotation
3732
3733 This example also demonstrates how names of the singers can be added
3734 using @code{vocalName} analogous to instrument annotations for staves.
3735 A short version may be entered as @code{vocNam}.
3736
3737 To make empty spaces in lyrics, use @code{\skip}.
3738
3739
3740 @seealso
3741
3742 Program reference: Layout objects @internalsref{LyricText} and
3743 @internalsref{VocalName}.  Music expressions
3744 @internalsref{LyricEvent}.
3745
3746 @refbugs
3747
3748 @cindex ambiguity
3749
3750 Input for lyrics introduces a syntactical ambiguity
3751  
3752 @example 
3753 foo = bar 
3754 @end example 
3755
3756 @noindent
3757 is interpreted as assigning a string identifier @code{\foo} such that
3758 it contains @code{"bar"}.  However, it could also be interpreted as
3759 making or a music identifier @code{\foo} containing the syllable
3760 `bar'.  The force the latter interpretation, use
3761 @example
3762   foo = \lyrics bar4
3763 @end example
3764
3765
3766 @node Ambitus
3767 @subsection Ambitus
3768 @cindex ambitus
3769
3770 The term @emph{ambitus} denotes a range of pitches for a given voice
3771 in a part of music.  It also may denote the pitch range that a musical
3772 instrument is capable of playing.  Ambituses are printed on vocal
3773 parts, so singers can easily determine if it meets his or her
3774 capabilities.
3775
3776 It denoted at the beginning of a piece near the initial clef.  The
3777 range is graphically specified by two note heads, that represent the
3778 minimum and maximum pitch.  To print such ambituses, add the
3779 @internalsref{Ambitus_engraver} to the @internalsref{Voice} context,
3780 for example,
3781
3782 @example
3783   \paper @{
3784     \context @{
3785       \VoiceContext
3786       \consists Ambitus_engraver
3787     @}
3788   @}
3789 @end example
3790
3791 This results in the following output
3792
3793 @quotation
3794 @lilypond[raggedright]
3795 \score {
3796   \context ChoirStaff 
3797   \notes \relative c' <<
3798     \new Staff {
3799       as'' c e2 cis,2
3800     }
3801     \new Staff  {
3802       es4 b c f as g
3803     }
3804   >>
3805   \paper {
3806     \context {
3807       \StaffContext
3808       \consists Ambitus_engraver
3809     }
3810   }
3811 }
3812 @end lilypond
3813 @end quotation
3814
3815 If you have multiple voices in a single staff, and you want a single
3816 ambitus per staff rather than per each voice, add the
3817 @internalsref{Ambitus_engraver} to the @internalsref{Staff} context
3818 rather than to the @internalsref{Voice} context.
3819
3820 It is possible to tune individual ambituses for multiple voices on a
3821 single staff, for example by erasing or shifting them horizontally. An
3822 example is in @inputfileref{input/test,ambitus-mixed.ly}.
3823
3824 @seealso
3825
3826 Program reference: @internalsref{Ambitus}.
3827
3828 Examples:  @inputfileref{input/regression,ambitus.ly},
3829 @inputfileref{input/test,ambitus-mixed.ly}.
3830
3831 @refbugs
3832
3833 There is no collision handling in the case of multiple per-voice
3834 ambitus.
3835
3836 @node Tablatures
3837 @section Tablatures
3838
3839 Tablature notation is used for notating music for plucked string
3840 instruments.  It notates pitches not by using note heads, but by
3841 indicating on which string and fret a note must be played.  LilyPond
3842 offers limited support for tablature.
3843
3844 @menu
3845 * Tablatures basic::            
3846 * Non-guitar tablatures::       
3847 @end menu
3848
3849 @node Tablatures basic
3850 @subsection Tablatures basic
3851 @cindex Tablatures basic
3852
3853 The string number associated to a note is given as a backslash
3854 followed by a number, e.g. @code{c4\3} for a C quarter on the third
3855 string. By default, string 1 is the highest one, and the tuning
3856 defaults to the standard guitar tuning (with 6 strings).  The notes
3857 are printed as tablature, by using @internalsref{TabStaff} and
3858 @internalsref{TabVoice} contexts
3859
3860 @quotation
3861 @lilypond[fragment,verbatim]
3862 \notes \context TabStaff  {
3863  a,4\5 c'\2 a\3 e'\1
3864  e\4 c'\2 a\3 e'\1
3865 }
3866 @end lilypond
3867 @end quotation
3868
3869 @cindex minimumFret
3870
3871 When no string is specified, the first string that does not give a
3872 fret number less than @code{minimumFret} is selected. The default
3873 value for @code{minimumFret} is 0
3874
3875
3876 @example
3877 e16 fis gis a b4
3878 \set TabStaff.minimumFret = #8
3879 e16 fis gis a b4
3880 @end example
3881 @quotation
3882 @lilypond[noindent,raggedright]
3883 frag = \notes {
3884     \key e \major
3885     e16 fis gis a b4
3886     \set TabStaff.minimumFret = #8
3887     e16 fis gis a b4
3888 }
3889 \score {
3890   \context StaffGroup <<
3891     \context Staff { \clef "G_8" \frag }
3892     \context TabStaff { \frag }
3893   >>
3894 }
3895 @end lilypond
3896 @end quotation
3897
3898 @seealso
3899
3900 Program reference: @internalsref{TabStaff}, @internalsref{TabVoice}, and
3901 @internalsref{StringNumberEvent}.
3902
3903 @refbugs
3904
3905 Chords are not handled in a special way, and hence the automatic
3906 string selector may easily select the same string to two notes in a
3907 chord.
3908
3909
3910 @node Non-guitar tablatures
3911 @subsection Non-guitar tablatures
3912 @cindex Non-guitar tablatures
3913
3914 You can change the number of strings, by setting the number of lines
3915 in the @internalsref{TabStaff}. 
3916
3917 You can change the tuning of the strings. A string tuning is given as
3918 a Scheme list with one integer number for each string, the number
3919 being the pitch (measured in semitones relative to middle C) of an
3920 open string.  The numbers specified for @code{stringTuning} are the
3921 numbers of semitones to subtract or add, starting the specified pitch
3922 by default middle C, in string order. Thus, the notes are e, a, d, and
3923 g
3924
3925 @quotation
3926 @lilypond[fragment,verbatim]
3927   \context TabStaff <<
3928     \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
3929     
3930     \notes {
3931       a,4 c' a e' e c' a e'
3932     }
3933   >> 
3934 @end lilypond
3935 @end quotation
3936
3937 @refbugs
3938
3939 No guitar special effects have been implemented.
3940
3941 @seealso
3942
3943 Program reference: @internalsref{Tab_note_heads_engraver}.
3944
3945
3946 @node Chord names
3947 @section Chord names
3948 @cindex Chords
3949
3950 LilyPond has support for both printing chord names.  Chords may be
3951 entered in musical chord notation, i.e. @code{< .. >}, but they can
3952 also be entered by name. Internally, the chords are represented as a
3953 set of pitches, so they can be transposed
3954
3955
3956 @quotation
3957 @lilypond[verbatim,raggedright]
3958 twoWays = \notes \transpose c c' {
3959   \chords {
3960     c1 f:sus4 bes/f
3961   }
3962   <c e g>
3963   <f bes c'>
3964   <f bes d'>
3965   }
3966
3967 \score {
3968    << \context ChordNames \twoWays
3969      \context Voice \twoWays >> }
3970 @end lilypond
3971 @end quotation
3972
3973 This example also shows that the chord printing routines do not try to
3974 be intelligent. The last chord (@code{f bes d}) is not interpreted as
3975 an inversion.
3976
3977
3978 @menu
3979 * Chords mode::                 
3980 * Printing chord names::        
3981 @end menu
3982
3983
3984 @node Chords mode
3985 @subsection Chords mode
3986 @cindex Chords mode
3987
3988 Chord mode is a mode where you can input sets of pitches using common
3989 names.  It is introduced by the keyword @code{\chords}.
3990 In chords mode,  a  chord is entered by the root, which is entered
3991 like a common pitch
3992 @quotation
3993 @lilypond[fragment,verbatim,relative=2]
3994 \chords { es4.  d8 c2 }
3995 @end lilypond
3996 @end quotation
3997 @cindex chord entry
3998 @cindex chord mode
3999
4000 Other chords may be entered by suffixing a colon, and introducing a
4001 modifier, and optionally, a number
4002 @c
4003 @quotation
4004 @lilypond[fragment,verbatim]
4005 \chords { e1:m e1:7 e1:m7  }
4006 @end lilypond
4007 @end quotation
4008 The first number following the root is taken to be the `type' of the
4009 chord, thirds are added to the root until it reaches the specified
4010 number
4011 @quotation
4012 @lilypond[fragment,verbatim]
4013  \chords { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
4014 @end lilypond
4015 @end quotation
4016
4017 @cindex root of chord
4018 @cindex additions, in chords
4019 @cindex removals, in  chords
4020
4021 More complex chords may also be constructed  adding separate steps
4022 to a chord. Additions are added after the  number following
4023 the colon, and are separated by dots
4024 @c
4025 @quotation
4026 @lilypond[verbatim,fragment]
4027   \chords { c:5.6 c:3.7.8 c:3.6.13 }
4028 @end lilypond
4029 @end quotation
4030 Chord steps can be  altered by suffixing a @code{-} or @code{+} sign
4031 to the number
4032 @quotation
4033 @lilypond[verbatim,fragment]
4034   \chords { c:7+ c:5+.3-  c:3-.5-.7- }
4035 @end lilypond
4036 @end quotation
4037 Removals are specified similarly, and are introduced by a caret.  They
4038 must come after the additions
4039 @quotation
4040 @lilypond[verbatim,fragment]
4041   \chords { c^3 c:7^5 c:9^3.5 }
4042 @end lilypond
4043 @end quotation
4044
4045 Modifiers can be used to change pitches. The following modifiers are
4046 supported
4047 @table @code
4048 @item m
4049   is the minor chord. This modifier lowers the 3rd and (if present) the 7th step.
4050 @item dim
4051   is the   diminished chord. This modifier lowers the 3rd, 5th and (if present)
4052   the 7th step.
4053 @item aug
4054   is the augmented chord. This modifier raises the 5th step.
4055 @item maj
4056   is the major 7th chord. This modifier raises the 7th step if present.  
4057 @item sus
4058   is the suspended 4th or 2nd. This modifier removes the 3rd
4059 step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
4060 the chord.
4061 @end table
4062 Modifiers can be mixed with additions
4063 @quotation
4064 @lilypond[verbatim,fragment]
4065   \chords { c:sus4 c:7sus4 c:dim7 c:m6 } 
4066 @end lilypond
4067 @end quotation
4068
4069 @cindex modifiers, in chords. 
4070 @cindex @code{aug}
4071 @cindex @code{dim}
4072 @cindex @code{maj}
4073 @cindex @code{sus}
4074 @cindex @code{m}
4075
4076 Since an unaltered 11 does not sound good when combined with an
4077 unaltered 13, the 11 is removed in this case (unless it is added
4078 explicitly)
4079 @c
4080 @quotation
4081 @lilypond[fragment,verbatim]
4082   \chords { c:13 c:13.11 c:m13 }
4083 @end lilypond
4084 @end quotation 
4085
4086 @cindex @code{/}
4087
4088 An inversion (putting one pitch of the chord on the bottom), as well
4089 as bass notes, can be specified by appending
4090 @code{/}@var{pitch} to the chord
4091 @quotation
4092 @lilypond[fragment,verbatim]
4093    \chords { c1 c/g c/f }
4094 @end lilypond
4095 @end quotation 
4096 @cindex @code{/+}
4097
4098 A bass note can be added instead of transposed out of the chord,
4099 by using  @code{/+}@var{pitch}.
4100
4101 @quotation
4102 @lilypond[fragment,verbatim]
4103    \chords { c1 c/+g c/+f }
4104 @end lilypond
4105 @end quotation 
4106
4107 Chords is a mode similar to @code{\lyrics}, @code{\notes} etc.  Most
4108 of the commands continue to work, for example, @code{r} and
4109 @code{\skip} can be used to insert rests and spaces, and property
4110 commands may be used to change various settings.
4111
4112
4113
4114 @refbugs
4115
4116 Each step can only be present in a chord once.  The following
4117 simply produces the augmented chord, since @code{5+} is interpreted
4118 last
4119 @cindex clusters
4120 @quotation
4121 @lilypond[verbatim,fragment]
4122   \chords { c:5.5-.5+ }
4123 @end lilypond
4124 @end quotation
4125
4126
4127 @node Printing chord names
4128 @subsection Printing chord names
4129
4130 @cindex printing chord names
4131 @cindex chord names
4132 @cindex chords
4133
4134 For displaying printed chord names, use the @internalsref{ChordNames} context.
4135 The chords may be entered either using the notation
4136 described above, or directly using @code{<} and @code{>}
4137
4138 @quotation
4139 @lilypond[verbatim,raggedright]
4140 scheme = \notes {
4141   \chords {a1 b c} <d' f' a'>  <e' g' b'>
4142 }
4143 \score {
4144   \notes<<
4145     \context ChordNames \scheme
4146     \context Staff \scheme
4147   >>
4148 }
4149 @end lilypond
4150 @end quotation
4151
4152 You can make the chord changes stand out by setting
4153 @internalsref{ChordNames}.@code{chordChanges} to true.  This will only
4154 display chord names when there is a change in the chords scheme and at
4155 the start of a new line
4156
4157 @quotation
4158 @lilypond[verbatim,linewidth=9\cm]
4159 scheme = \chords {
4160   c1:m c:m \break c:m c:m d
4161 }
4162 \score {
4163   \notes <<
4164     \context ChordNames {
4165         \set chordChanges = ##t
4166         \scheme }
4167     \context Staff \transpose c c' \scheme
4168   >>
4169 }
4170 @end lilypond
4171 @end quotation
4172
4173 The default chord name layout is a system for Jazz music, proposed by
4174 Klaus Ignatzek (see @ref{Literature list}).  It can be tuned through the
4175 following properties
4176
4177 @table @code
4178 @cindex chordNameExceptions
4179 @item chordNameExceptions
4180 This is a list that contains the chords that have special formatting.
4181 For an example, see
4182 @inputfileref{input/regression,chord-name-exceptions.ly}.
4183 @cindex exceptions, chord names.
4184
4185
4186 @cindex majorSevenSymbol
4187 @item majorSevenSymbol
4188 This property contains the markup object used for the 7th step, when
4189 it is major. Predefined options are @code{whiteTriangleMarkup} and
4190 @code{blackTriangleMarkup}.  See
4191 @inputfileref{input/regression,chord-name-major7.ly} for an example.
4192
4193 @cindex chordNameSeparator
4194 @item chordNameSeparator
4195 Different parts of a chord name are normally separated by a
4196 slash. By setting @code{chordNameSeparator}, you can specify other
4197 separators, e.g.
4198 @quotation
4199 @lilypond[fragment,verbatim]
4200 \context ChordNames \chords {
4201   c:7sus4
4202   \set chordNameSeparator
4203     = \markup { \typewriter "|" }
4204   c:7sus4
4205 }
4206 @end lilypond
4207 @end quotation
4208
4209 @cindex chordRootNamer
4210 @item chordRootNamer
4211 The root of a chord is usually printed as a letter with an optional
4212 alteration. The transformation from pitch to letter is done by this
4213 function.  Special note names (for example, the German ``H'' for a
4214 B-chord) can be produced by storing a new function in this property.
4215
4216 The predefined variables @code{\germanChords},
4217 @code{\semiGermanChords} set these variables.
4218
4219
4220 @cindex chordNoteNamer
4221 @item chordNoteNamer
4222 The default is to print single pitch, e.g. the bass note, using the
4223 @code{chordRootNamer}.  The @code{chordNoteNamer} property can be set
4224 to a specialized function to change this behavior.  For example, the
4225 base can be printed in lower case.
4226
4227 @end table
4228
4229
4230 There are also two other chord name schemes implemented: an alternate
4231 Jazz chord notation, and a systematic scheme called Banter chords. The
4232 alternate jazz notation is also shown on the chart in @ref{Chord name
4233 chart}.  Turning on these styles is described in the input file
4234 @inputfileref{input/test,chord-names-jazz.ly}.
4235
4236 @cindex Banter
4237 @cindex jazz chords
4238 @cindex chords, jazz  
4239
4240
4241 @refcommands
4242
4243 @cindex @code{\germanChords}
4244 @code{\germanChords}, 
4245 @cindex @code{\semiGermanChords}
4246 @code{\semiGermanChords}.
4247
4248
4249
4250
4251 @seealso
4252
4253 Examples: @inputfileref{input/regression,chord-name-major7.ly},
4254 @inputfileref{input/regression,chord-name-exceptions.ly},
4255 @inputfileref{input/test,chord-names-jazz.ly},
4256 @inputfileref{input/test,chord-names-german.ly}.
4257
4258 Init files: @file{scm/chords-ignatzek.scm}, and @file{scm/chord-entry.scm}.
4259
4260
4261 @refbugs
4262
4263 Chord names are determined solely from the list of pitches. Chord
4264 inversions are not identified, and neither are added bass notes. This
4265 may result in strange chord names when chords are entered with the
4266 @code{< .. >} syntax.
4267
4268
4269
4270
4271 @node Orchestral music
4272 @section Orchestral music
4273
4274 @cindex  Writing parts
4275
4276 Orchestral music involves some special notation, both in the full
4277 score and the individual parts. This section explains how to tackle
4278 some common problems in orchestral music.
4279
4280
4281
4282 @menu
4283 * Multiple staff contexts::     
4284 * Rehearsal marks::             
4285 * Bar numbers::                 
4286 * Instrument names::            
4287 * Transpose::                   
4288 * Instrument transpositions::   
4289 * Multi measure rests::         
4290 * Automatic part combining::    
4291 * Hiding staves::               
4292 * Different editions from one source::  
4293 * Quoting other voices::        
4294 @end menu
4295
4296 @node Multiple staff contexts
4297 @subsection Multiple staff contexts
4298
4299 Polyphonic scores consist of many staves. These staves can be
4300 constructed in three different ways
4301 @itemize @bullet
4302 @item The group is started with a brace at the left, and bar lines are
4303 connected. This is done with the @internalsref{GrandStaff} context.
4304
4305 @item The group is started with a bracket, and bar lines are connected. This is done with the
4306 @internalsref{StaffGroup} context
4307
4308
4309 @item The group is  started with a vertical line. Bar lines are not
4310 connected.  This is the default for the score.
4311
4312 @end itemize
4313
4314 @cindex Staff, multiple
4315 @cindex bracket, vertical
4316 @cindex brace, vertical
4317 @cindex grand staff
4318 @cindex staff group
4319
4320
4321
4322
4323 @node Rehearsal marks
4324 @subsection Rehearsal marks
4325 @cindex Rehearsal marks
4326 @cindex mark
4327 @cindex @code{\mark}
4328
4329 To print a  rehearsal mark, use the @code{\mark} command
4330 @quotation
4331 @lilypond[fragment,verbatim]
4332 \relative c'' {
4333   c1 \mark \default
4334   c1 \mark \default
4335   c1 \mark #8 
4336   c1 \mark \default
4337   c1 \mark \default
4338 }
4339 @end lilypond
4340 @end quotation
4341
4342 @noindent
4343 (The letter I is skipped in accordance with engraving traditions.)
4344
4345 The mark is incremented automatically if you use @code{\mark
4346 \default}, but you can also use an integer argument to set the mark
4347 manually.  The value to use is stored in the property
4348 @code{rehearsalMark}.
4349
4350 The style is defined by the property @code{markFormatter}. It is a
4351 function taking the current mark (an integer) and the current context
4352 as argument. It should return a markup object. In the following
4353 example, @code{markFormatter} is set to a canned procedure. After a
4354 few measures, it is set to function that produces a boxed number. 
4355
4356 @quotation
4357 @lilypond[verbatim,fragment,relative=2]
4358   \set Score.markFormatter = #format-mark-numbers 
4359   c1 \mark \default
4360   c1 \mark \default
4361   \set Score.markFormatter
4362  = #(lambda (mark  context)
4363         (make-bold-markup (make-box-markup (number->string mark))))
4364   c1 \mark \default
4365   c1 \mark \default
4366 @end lilypond
4367 @end quotation
4368
4369 The file @file{scm/translation-functions.scm} contains the definitions
4370 of @code{format-mark-numbers} (the default format) and
4371 @code{format-mark-letters}. They can be used as inspiration for other
4372 formatting functions.
4373
4374
4375 @cindex coda on bar line
4376 @cindex segno on bar line
4377 @cindex fermata on bar line
4378 @cindex bar lines, symbols on
4379
4380 The @code{\mark} command can also be used to put signs like coda,
4381 segno and fermatas on a bar line. Use @code{\markup} to
4382 to access the appropriate symbol
4383
4384 @quotation
4385 @lilypond[fragment,verbatim,relative=2]
4386   c1 \mark \markup { \musicglyph #"scripts-ufermata" }
4387   c1
4388 @end lilypond
4389 @end quotation
4390
4391 In the case of a line break, marks must also be printed at the end of
4392 the line, and not at the beginning. Use the following to force that
4393 behavior
4394 @example
4395 \override Score.RehearsalMark  
4396   #'break-visibility = #begin-of-line-invisible
4397 @end example
4398
4399 @cindex fermatas
4400 @cindex coda
4401 @cindex segno
4402 @cindex bar lines, putting symbols on 
4403
4404 @seealso
4405
4406 Program reference: @internalsref{MarkEvent}, @internalsref{RehearsalMark}.
4407
4408 Init files: @file{scm/translation-functions.scm} contains the
4409 definition of @code{format-mark-numbers} and
4410 @code{format-mark-letters}. They can be used as inspiration for other
4411 formatting functions.
4412
4413 Examples: @inputfileref{input/regression,rehearsal-mark-letter.ly},
4414 @inputfileref{input/regression,rehearsal-mark-number.ly}.
4415
4416
4417 @node Bar numbers
4418 @subsection Bar numbers
4419
4420
4421 @cindex bar numbers
4422 @cindex measure numbers
4423 @cindex currentBarNumber
4424
4425 Bar numbers are printed by default at the start of the line.  The
4426 number itself is stored in the 
4427 @code{currentBarNumber} property,
4428 which is normally updated automatically for every measure.
4429
4430 Bar numbers can be typeset at regular intervals instead of at the
4431 beginning of each line. This is illustrated in the following example,
4432 whose source is available as
4433 @inputfileref{input/test,bar-number-regular-interval.ly}
4434
4435 @quotation
4436 @lilypondfile[]{bar-number-regular-interval.ly}
4437 @end quotation
4438
4439 @seealso
4440
4441 Program reference: @internalsref{BarNumber}.
4442
4443 Examples: @inputfileref{input/test,bar-number-every-five-reset.ly},
4444 and @inputfileref{input/test,bar-number-regular-interval.ly}.
4445
4446 @refbugs
4447
4448 Bar numbers can collide with the @internalsref{StaffGroup} bracket, if
4449 there is one at the top. To solve this, the
4450 @code{padding} property of @internalsref{BarNumber} can be
4451 used to position the number correctly.
4452
4453 @node Instrument names
4454 @subsection Instrument names
4455
4456 In an orchestral score, instrument names are printed left side of the
4457 staves.
4458
4459 This can be achieved by setting @internalsref{Staff}.@code{instrument}
4460 and @internalsref{Staff}.@code{instr}. This will print a string before
4461 the start of the staff. For the first start, @code{instrument} is
4462 used, for the next ones @code{instr} is used.
4463
4464 @quotation
4465 @lilypond[verbatim,raggedright,relative=3]
4466 \set Staff.instrument = "Ploink "
4467 \set Staff.instr = "Plk "
4468 c1
4469 \break
4470 c''
4471 @end lilypond
4472 @end quotation
4473
4474 You can also use markup texts to construct more complicated instrument
4475 names, for example
4476
4477 @quotation
4478 @lilypond[fragment,verbatim,raggedright]
4479 \notes {
4480   \set Staff.instrument = \markup {
4481       \column < "Clarinetti"
4482         { "in B"
4483           \smaller \flat
4484         }
4485         >
4486    }
4487    { c''1 }
4488 }
4489 @end lilypond
4490 @end quotation
4491
4492 @seealso
4493
4494 Program reference: @internalsref{InstrumentName}.
4495
4496 @refbugs
4497
4498 When you put a name on a grand staff or piano staff the width of the
4499 brace is not taken into account. You must add extra spaces to the end of
4500 the name to avoid a collision.
4501
4502 @node Transpose
4503 @subsection Transpose
4504 @cindex Transpose
4505 @cindex transposition of pitches
4506 @cindex @code{\transpose}
4507
4508 A music expression can be transposed with @code{\transpose}.  The syntax
4509 is
4510 @example
4511   \transpose @var{from} @var{to} @var{musicexpr}
4512 @end example
4513
4514 This means that @var{musicexpr} is transposed by the interval between
4515 the pitches @var{from} and @var{to}: any note with pitch @code{from}
4516 is changed to @code{to}.
4517
4518
4519 For example, consider  a piece written in the key of  D major.  If
4520 this piece is a  little too low for its performer, it can be
4521 transposed up to E major with
4522 @example
4523  \transpose d e @dots{}
4524 @end example
4525
4526 Consider a part  written for violin (a C instrument). If
4527 this part is to be played on the A clarinet, the following
4528 transposition will produce the appropriate part
4529
4530 @example
4531   \transpose a c @dots{}
4532 @end example   
4533
4534 Since @var{from} and @var{to} are pitches, so @code{\transpose} must be
4535 inside a @code{\notes} section.  @code{\transpose} distinguishes
4536 between enharmonic pitches: both @code{\transpose c cis} or
4537 @code{\transpose c des} will transpose up half a tone.  The first
4538 version will print sharps and the second version will print flats
4539
4540 @quotation
4541 @lilypond[raggedright,verbatim]
4542 mus =\notes { \key d \major cis d fis g }
4543 \score { \notes \context Staff {
4544   \clef "F" \mus
4545   \clef "G"
4546   \transpose c g' \mus
4547   \transpose c f' \mus
4548 }}
4549 @end lilypond
4550 @end quotation
4551
4552
4553 @seealso
4554
4555 Program reference: @internalsref{TransposedMusic}, and
4556 @internalsref{UntransposableMusic}.
4557
4558 @refbugs
4559
4560 If you want to use both @code{\transpose} and @code{\relative},
4561 you must put @code{\transpose} outside of @code{\relative}, since
4562 @code{\relative} will have no effect music that appears inside a
4563 @code{\transpose}.
4564
4565 @node Instrument transpositions
4566 @subsection Instrument transpositions
4567
4568 The key of a transposing instrument can also be specified.  This
4569 applies to many wind instruments, for example, clarinets (B-flat, A and
4570 E-flat), horn (F) and trumpet (B-flat, C, D and E-flat).
4571
4572
4573 The transposition is entered after the keyword @code{\transposition}
4574
4575 @example
4576   \transposition bes   %%  B-flat clarinet
4577 @end example
4578
4579 This command sets the property @code{instrumentTuning}. The value of
4580 this property is used for MIDI output and quotations.  It does not
4581 affect how notes are printed in the current staff.
4582
4583 @cindex transposition, MIDI
4584 @cindex transposition, instrument
4585
4586
4587 @node Multi measure rests
4588 @subsection Multi measure rests
4589 @cindex multi measure rests
4590 @cindex Rests, multi measure
4591
4592 @cindex @code{R}
4593
4594 Multi measure rests are entered using `@code{R}'. It is specifically
4595 meant for full bar rests and for entering parts: the rest can expand
4596 to fill a score with rests, or it can be printed as a single
4597 multimeasure rest. This expansion is controlled by the property
4598 @code{Score.skipBars}. If this is set to true, empty measures will not
4599 be expanded, and the appropriate number is added automatically
4600
4601 @quotation
4602 @lilypond[fragment,verbatim]
4603  \time 4/4 r1 | R1 | R1*2
4604  \set Score.skipBars = ##t R1*17  R1*4
4605 @end lilypond
4606 @end quotation
4607
4608 The @code{1} in @code{R1} is similar to the duration notation used for
4609 notes. Hence, for time signatures other than 4/4, you must enter other
4610 durations.  This can be done with augmentation dots or fractions
4611
4612 @quotation
4613 @lilypond[fragment,verbatim]
4614  \set Score.skipBars = ##t
4615  \time 3/4
4616   R2. | R2.*2
4617  \time 13/8
4618  R1*13/8
4619  R1*13/8*12
4620 @end lilypond
4621 @end quotation
4622
4623 An @code{R} spanning a single measure is printed as either a whole rest
4624 or a breve, centered in the measure regardless of the time signature.
4625
4626 @cindex text on multi-measure rest
4627 @cindex script on multi-measure rest
4628 @cindex fermata on multi-measure rest
4629
4630 Texts can be added to multi-measure rests by using the
4631 @var{note}-@code{markup} syntax (see @ref{Text markup}).  In this case, the number is
4632 replaced. If you need both texts and the number, you must add the
4633 number by hand. A variable (@code{\fermataMarkup}) is provided for
4634 adding fermatas
4635
4636
4637 @quotation
4638 @lilypond[verbatim,fragment]
4639   \time 3/4
4640   R2._\markup { "Ad lib" }
4641   R2.^\fermataMarkup
4642 @end lilypond
4643 @end quotation
4644
4645 If you want to have a text on the left end of a multi-measure rest,
4646 attach the text to a zero-length skip note, i.e.
4647
4648 @example
4649   s1*0^"Allegro"
4650   R1*4 
4651 @end example
4652
4653
4654 @cindex whole rests for a full measure 
4655
4656 @seealso
4657
4658 Program reference: @internalsref{MultiMeasureRestEvent},
4659 @internalsref{MultiMeasureTextEvent},
4660 @internalsref{MultiMeasureRestMusicGroup}, and
4661 @internalsref{MultiMeasureRest}.
4662
4663 The layout object @internalsref{MultiMeasureRestNumber} is for the
4664 default number, and @internalsref{MultiMeasureRestText} for user
4665 specified texts.
4666
4667 @refbugs
4668
4669 It is not possible to use fingerings (e.g. @code{R1-4}) to put numbers
4670 over multi-measure rests.
4671
4672 @cindex condensing rests
4673
4674 There is no way to automatically condense multiple rests into a single
4675 multimeasure rest. Multi measure rests do not take part in rest
4676 collisions.
4677
4678 Be careful when entering multimeasure rests followed by whole
4679 notes. The following will enter two notes lasting four measures each
4680 @example
4681  R1*4 cis cis 
4682 @end example
4683 When @code{skipBars} is set, the result will look OK, but the bar
4684 numbering will be off.
4685
4686 @node Automatic part combining
4687 @subsection Automatic part combining
4688 @cindex automatic part combining
4689 @cindex part combiner
4690
4691
4692 Automatic part combining is used to merge two parts of music onto a
4693 staff.  It is aimed at typesetting orchestral scores.  When the two
4694 parts are identical for a period of time, only one is shown.  In
4695 places where the two parts differ, they are typeset as separate
4696 voices, and stem directions are set automatically.  Also, solo and
4697 @emph{a due} parts are identified and can be marked.
4698
4699
4700 The syntax for part combining is
4701
4702 @example
4703   \partcombine @var{musicexpr1} @var{musicexpr2}
4704 @end example
4705
4706 The music expressions will be interpreted as @internalsref{Voice} contexts.
4707
4708 The following example demonstrates the basic functionality of the part
4709 combiner: putting parts on one staff, and setting stem directions and
4710 polyphony
4711
4712 @quotation
4713 @lilypond[verbatim,raggedright,fragment,relative=2]
4714   \new Staff \partcombine 
4715       {
4716         g g a( b) c c r r
4717       }
4718       {
4719         g g r4 r  e e g g 
4720       }
4721 @end lilypond
4722 @end quotation
4723
4724 The first @code{g} appears only once, although it was
4725 specified twice (once in each part).  Stem, slur and tie directions are
4726 set automatically, depending whether there is a solo or unisono. The
4727 first part (with context called @code{one}) always gets up stems, and
4728 `solo', while the second (called @code{two}) always gets down stems and
4729 `Solo II'.
4730
4731 If you just want the merging parts, and not the textual markings, you
4732 may set the property @var{soloADue} to false
4733
4734 @quotation
4735 @lilypond[verbatim,raggedright,fragment,relative=2]
4736    \new Staff <<
4737     \set Staff.soloADue = ##f
4738     \partcombine 
4739       {
4740         g a( b) r
4741       }
4742       {
4743         g r4 r f
4744       } >>
4745 @end lilypond
4746 @end quotation
4747
4748 @seealso
4749
4750 Program reference: @internalsref{PartCombineMusic},
4751 @internalsref{SoloOneEvent}, and
4752 @internalsref{SoloTwoEvent}, and
4753 @internalsref{UnisonoEvent}.
4754
4755 @refbugs
4756
4757 In @code{soloADue} mode, when the two voices play the same notes on and
4758 off, the part combiner may typeset @code{a2} more than once in a
4759 measure.
4760
4761 @code{\partcombine} can not be inside @code{\times}. 
4762
4763 Internally, the @code{\partcombine} interprets both arguments as
4764 @code{Voice}s named @code{one} and @code{two}, and then decides when
4765 the parts can be combined. Consequently, if the arguments switch to
4766 differently named @internalsref{Voice} contexts, the events in those
4767 will be ignored.
4768
4769 @node Hiding staves
4770 @subsection Hiding staves
4771
4772 @cindex Frenched scores
4773 @cindex Hiding staves
4774
4775 In orchestral scores, staff lines that only have rests are usually
4776 removed.  This saves some space. This style is called `French Score'.
4777 For @internalsref{Lyrics}, 
4778 @internalsref{ChordNames} and @internalsref{FiguredBass}, this is
4779 switched on by default.  When these line of these contexts turn out
4780 empty after the line-breaking process, they are removed.
4781
4782 For normal staves, a specialized @internalsref{Staff} context is
4783 available, which does the same: staves containing nothing (or only
4784 multi measure rests) are removed. The context definition is stored in
4785 @code{\RemoveEmptyStaffContext} variable. Observe how the second staff
4786 in this example disappears in the second line
4787
4788
4789 @quotation
4790 @lilypond[verbatim]
4791 \score  {
4792   \notes \relative c' <<
4793     \new Staff { e4 f g a \break c1 }
4794     \new Staff { c4 d e f \break R1 }
4795   >>
4796   \paper {
4797     linewidth = 6.\cm 
4798     \context { \RemoveEmptyStaffContext }
4799   }
4800 }
4801 @end lilypond
4802 @end quotation
4803
4804 The first page shows all staves in full. If empty staves should be
4805 removed from the first page too, set @code{remove-first} to false in
4806 @internalsref{RemoveEmptyVerticalGroup}.
4807
4808 Another application is making ossia sections, i.e. alternative
4809 melodies on a separate piece of staff, with help of a Frenched
4810 staff. See @inputfileref{input/test,ossia.ly} for an example.
4811
4812
4813 @node Different editions from one source
4814 @subsection Different editions from one source
4815
4816 The @code{\tag} command marks music expressions with a name. These
4817 tagged expressions can be filtered out later.  With this mechanism it
4818 is possible to make different versions of the same music source.
4819
4820 In the following example, we see two versions of a piece of music, one
4821 for the full score, and one with cue notes for the instrumental part
4822
4823 @example
4824     c1
4825     \relative c' <<
4826         \tag #'part <<
4827           R1 \\
4828           @{
4829               \set fontSize = #-1
4830               c4_"cue" f2 g4 @} 
4831         >>
4832         \tag #'score R1
4833      >>
4834      c1
4835 @end example
4836
4837 The same can be applied to articulations, texts, etc.: they are
4838 made by prepending
4839 @example
4840         -\tag #@var{your-tag} 
4841 @end example
4842 to an articulation, for example, 
4843 @example
4844     c1-\tag #'part ^4
4845 @end example
4846
4847 This defines a note with a conditional fingering indication.
4848
4849 By applying the @code{remove-tag} function, tagged expressions can be
4850 filtered. For example,
4851 @example
4852 \simultaneous @{
4853         @var{the music}
4854         \apply #(remove-tag 'score) @var{the music}
4855         \apply #(remove-tag 'part) @var{the music}
4856 @}
4857 @end example
4858 would yield
4859
4860 @quotation
4861 @lilypondfile[]{tag-filter.ly}
4862 @end quotation
4863
4864 The argument of the @code{\tag} command should be a symbol, or a list
4865 of symbols, for example,
4866 @example
4867   \tag #'(original-part transposed-part) @dots{}
4868 @end example
4869
4870 @seealso
4871
4872 Examples: @inputfileref{input/regression,tag-filter.ly}.
4873
4874
4875 @node Quoting other voices
4876 @subsection Quoting other voices
4877
4878 With quotations, fragments of other parts can be inserted into a part
4879 directly. Before a part can be quoted, it must be marked especially as
4880 quotable. This is done with code @code{\addquote} command. The
4881 quotation may then be done with @code{\quote}
4882
4883 @example
4884   \addquote @var{name} @var{music}
4885   \quote @var{name} @var{duration}  
4886 @end example
4887
4888 @noindent
4889
4890 Here, @var{name} is an identifying string. The @var{music} is any kind
4891 of music.  This is an example of @code{\addquote}
4892
4893 @verbatim
4894 \addquote clarinet \notes\relative c' {
4895   f4 fis g gis
4896 }
4897 @end verbatim
4898
4899 During a part, a piece of music can be quoted with the @code{\quote}
4900 command. 
4901   
4902 @verbatim
4903   \quote clarinet 2.
4904 @end verbatim
4905
4906 This would cite 3 quarter notes (a dotted half note) of the previously
4907 added clarinet voice.
4908
4909 Quotations take into account the transposition both source and target
4910 instruments, if they are specified using the @code{\transposition} command.
4911
4912 @quotation
4913 @lilypond[verbatim,fragment] 
4914 \addquote clarinet \notes\relative c' {
4915   \transposition bes
4916   f4 fis g gis
4917 }
4918 \score {
4919   \notes {
4920   e'8 f'8 \quote clarinet 2
4921 } }
4922 @end lilypond
4923 @end quotation
4924
4925 @refbugs
4926
4927 Only the contents of the first @internalsref{Voice} occurring in an
4928 @code{\addquote} command will be considered for quotation, so
4929 @var{music} can not contain @code{\new} and @code{\context Voice}
4930 statements that would switch to a different Voice.
4931
4932
4933 @seealso
4934
4935 In this manual: @ref{Instrument transpositions}.
4936
4937 Examples: @inputfileref{input/regression,quote.ly}
4938 @inputfileref{input/regression,quote-transposition.ly}
4939
4940 Program reference: @internalsref{QuoteMusic}.
4941
4942 @node Ancient notation
4943 @section Ancient notation
4944
4945 @cindex Vaticana, Editio
4946 @cindex Medicaea, Editio
4947 @cindex hufnagel
4948 @cindex Petrucci
4949 @cindex mensural
4950
4951 Support for ancient notation includes features for mensural notation
4952 and Gregorian Chant notation.  There is also limited support for
4953 figured bass notation.
4954
4955 Many graphical objects provide a @code{style} property, see
4956 @ref{Ancient note heads}, @ref{Ancient accidentals}, @ref{Ancient
4957 rests}, @ref{Ancient clefs}, @ref{Ancient flags} and @ref{Ancient time
4958 signatures}.  By manipulating such a grob property, the typographical
4959 appearance of the affected graphical objects can be accommodated for a
4960 specific notation flavor without need for introducing any new
4961 notational concept.
4962
4963 Other aspects of ancient notation can not that easily be expressed as
4964 in terms of just changing a style property of a graphical object.
4965 Therefore, some notational concepts are introduced specifically for
4966 ancient notation, see @ref{Custodes}, @ref{Divisiones},
4967 @ref{Ligatures}, and @ref{Figured bass}.
4968
4969
4970 @menu
4971 * Ancient note heads::          
4972 * Ancient accidentals::         
4973 * Ancient rests::               
4974 * Ancient clefs::               
4975 * Ancient flags::               
4976 * Ancient time signatures::     
4977 * Custodes::                    
4978 * Divisiones::                  
4979 * Ligatures::                   
4980 * Figured bass::                
4981 * Vaticana style contexts::     
4982 @end menu
4983
4984 If this all is way too much of documentation for you, and you just
4985 want to dive into typesetting without worrying too much about the
4986 details on how to customize a context, you may have a look at the
4987 predefined contexts (see @ref{Vaticana style contexts}).  Use them to
4988 set up predefined style-specific voice and staff contexts, and
4989 directly go ahead with the note entry.
4990
4991 @refbugs
4992
4993 Ligatures need special spacing that has not yet been implemented.  As
4994 a result, there is too much space between ligatures most of the time,
4995 and line breaking often is unsatisfactory.  Also, lyrics do not
4996 correctly align with ligatures.
4997
4998 Accidentals must not be printed within a ligature, but instead need to
4999 be collected and printed in front of it.
5000
5001 Augmentum dots within ligatures are  not handled correctly.
5002
5003
5004 @node Ancient note heads
5005 @subsection Ancient note heads
5006
5007 @cindex note heads
5008
5009
5010 For ancient notation, a note head style other than the @code{default}
5011 style may be chosen.  This is accomplished by setting the @code{style}
5012 property of the NoteHead object to the desired value (@code{baroque},
5013 @code{neo_mensural} or @code{mensural}).  The @code{baroque} style
5014 differs from the @code{default} style only in using a square shape for
5015 @code{\breve} note heads.  The @code{neo_mensural} style differs from
5016 the @code{baroque} style in that it uses rhomboidal heads for whole
5017 notes and all smaller durations.  Stems are centered on the note
5018 heads.  This style is in particular useful when transcribing mensural
5019 music, e.g. for the incipit.  The @code{mensural} style finally
5020 produces note heads that mimic the look of note heads in historic
5021 printings of the 16th century.
5022
5023 The following example demonstrates the @code{neo_mensural} style
5024
5025 @quotation
5026 @lilypond[fragment,raggedright,verbatim]
5027   \override NoteHead #'style = #'neo_mensural
5028   a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
5029 @end lilypond
5030 @end quotation
5031
5032 When typesetting a piece in Gregorian Chant notation, a Gregorian
5033 ligature engraver will automatically select the proper note heads,
5034 such there is no need to explicitly set the note head style.  Still,
5035 the note head style can be set e.g. to @code{vaticana_punctum} to
5036 produce punctum neumes.  Similarly, a mensural ligature engraver is
5037 used to automatically assemble mensural ligatures.  See
5038 @ref{Ligatures} for how ligature engravers work.
5039
5040 @seealso
5041
5042 In this manual
5043 @ref{Percussion staves} use note head styles of their own that are
5044 frequently used in contemporary music notation.
5045
5046 Examples: @inputfileref{input/regression,note-head-style.ly} gives an
5047 overview over all available note head styles.
5048
5049
5050 @node Ancient accidentals
5051 @subsection Ancient accidentals
5052
5053 @cindex accidentals
5054
5055
5056 Use the @code{style} property of grob @internalsref{Accidental} to
5057 select ancient accidentals.   Supported styles are
5058 @code{mensural}, @code{vaticana}, @code{hufnagel} and @code{medicaea}.
5059
5060 @quotation
5061 @lilypond[raggedright,staffsize=26]
5062 \score {
5063     \notes {
5064         \fatText
5065         s
5066         ^\markup {
5067             \column <
5068                 "vaticana" 
5069                 { " " \musicglyph #"accidentals-vaticana-1"
5070                   " " \musicglyph #"accidentals-vaticana0" }
5071             >
5072             \column <
5073                 "medicaea"
5074                 { " " \musicglyph #"accidentals-medicaea-1" }
5075             >
5076             \column <
5077                 "hufnagel"
5078                 { " " \musicglyph #"accidentals-hufnagel-1" }
5079             >
5080             \column <
5081                 "mensural"
5082                 { " " \musicglyph #"accidentals-mensural-1"
5083                   " " \musicglyph #"accidentals-mensural1" }
5084             >
5085         }
5086     }
5087     \paper {
5088         raggedright = ##t 
5089         interscoreline = 1
5090         \context {
5091             \ScoreContext
5092             \remove "Bar_number_engraver"
5093         }
5094         \context{
5095             \StaffContext
5096             \remove "Clef_engraver"
5097             \remove "Key_engraver"
5098             \remove "Time_signature_engraver"
5099             \remove "Staff_symbol_engraver"
5100             minimumVerticalExtent = ##f
5101         }
5102     }
5103 }
5104 @end lilypond
5105 @end quotation
5106
5107 As shown, not all accidentals are supported by each style.  When
5108 trying to access an unsupported accidental, LilyPond will switch to a
5109 different style, as demonstrated in
5110 @inputfileref{input/test,ancient-accidentals.ly}.
5111
5112 Similarly to local accidentals, the style of the key signature can be
5113 controlled by the @code{style} property of the
5114 @internalsref{KeySignature} grob.
5115
5116 @seealso
5117
5118 In this manual: @ref{Pitches}, @ref{Chromatic alterations} and
5119 @ref{Accidentals} give a general introduction into the use of
5120 accidentals.  @ref{Key signature} gives a general introduction into
5121 the use of key signatures.
5122
5123 Program reference: @internalsref{KeySignature}.
5124
5125 Examples: @inputfileref{input/test,ancient-accidentals.ly}.
5126
5127 @node Ancient rests
5128 @subsection Ancient rests
5129
5130 @cindex rests
5131
5132
5133 Use the @code{style} property of grob @internalsref{Rest} to select
5134 ancient accidentals.   Supported styles are @code{classical},
5135 @code{neo_mensural} and @code{mensural}.  @code{classical} differs
5136 from the @code{default} style only in that the quarter rest looks like
5137 a horizontally mirrored 8th rest.  The @code{neo_mensural} style suits
5138 well for e.g. the incipit of a transcribed mensural piece of music.
5139 The @code{mensural} style finally mimics the appearance of rests as
5140 in historic prints of the 16th century.
5141
5142 The following example demonstrates the @code{neo_mensural} style
5143
5144 @quotation
5145 @lilypond[fragment,raggedright,verbatim]
5146   \override Rest #'style = #'neo_mensural
5147   r\longa r\breve r1 r2 r4 r8 r16
5148 @end lilypond
5149 @end quotation
5150
5151 There are no 32th and 64th rests specifically for the mensural or
5152 neo-mensural style.  Instead, the rests from the default style will be
5153 taken.  See @inputfileref{input/test,rests.ly} for a chart of all
5154 rests.
5155
5156 There are no rests in Gregorian Chant notation; instead, it uses
5157 @ref{Divisiones}.
5158
5159 @seealso
5160
5161 In this manual: @ref{Rests} gives a general introduction into the use of rests.
5162
5163
5164 @node Ancient clefs
5165 @subsection Ancient clefs
5166
5167 @cindex clefs
5168
5169
5170 LilyPond supports a variety of clefs, many of them ancient.
5171
5172 The following table shows all ancient clefs that are supported via the
5173 @code{\clef} command.  Some of the clefs use the same glyph, but
5174 differ only with respect to the line they are printed on.  In such
5175 cases, a trailing number in the name is used to enumerate these clefs.
5176 Still, you can manually force a clef glyph to be typeset on an
5177 arbitrary line, as described in @ref{Clef}.  The note printed to the
5178 right side of each clef in the example column denotes the @code{c'}
5179 with respect to that clef.
5180
5181 @multitable @columnfractions  .3 .3 .3 .1
5182
5183 @item
5184 @b{Glyph Name} @tab
5185 @b{Description} @tab
5186 @b{Supported Clefs} @tab
5187 @b{Example}
5188
5189 @item
5190 @code{clefs-neo_mensural_c} @tab
5191 modern style mensural C clef @tab
5192 @code{neo_mensural_c1}, @code{neo_mensural_c2},
5193 @code{neo_mensural_c3}, @code{neo_mensural_c4} @tab
5194 @quotation
5195 @lilypond[relative=1,notime]
5196 \override Staff.TimeSignature   #'transparent = ##t
5197 \clef "neo_mensural_c2" c
5198 @end lilypond
5199 @end quotation
5200
5201 @item
5202 @code{clefs-petrucci_c1}
5203 @code{clefs-petrucci_c2}
5204 @code{clefs-petrucci_c3}
5205 @code{clefs-petrucci_c4}
5206 @code{clefs-petrucci_c5}
5207
5208 @tab
5209 petrucci style mensural C clefs, for use  on different  staff lines
5210 (the examples shows the 2nd staff line C clef).
5211
5212 @tab
5213 @code{petrucci_c1}
5214 @code{petrucci_c2}
5215 @code{petrucci_c3}
5216 @code{petrucci_c4}
5217 @code{petrucci_c5}
5218
5219 @tab
5220 @quotation
5221 @lilypond[relative=1,notime]
5222 \override Staff.TimeSignature   #'transparent = ##t
5223 \clef "petrucci_c2" c
5224 @end lilypond
5225 @end quotation
5226
5227 @item
5228 @code{clefs-petrucci_f} @tab
5229 petrucci style mensural F clef @tab
5230 @code{petrucci_f} @tab
5231 @quotation
5232 @lilypond[relative=1,notime]
5233 \override Staff.TimeSignature   #'transparent = ##t
5234 \clef "petrucci_f" c
5235 @end lilypond
5236 @end quotation
5237
5238 @item
5239 @code{clefs-petrucci_g} @tab
5240 petrucci style mensural G clef @tab
5241 @code{petrucci_g} @tab
5242 @quotation
5243 @lilypond[relative=1,notime]
5244 \override Staff.TimeSignature   #'transparent = ##t
5245 \clef "petrucci_g" c
5246 @end lilypond
5247 @end quotation
5248
5249 @item
5250 @code{clefs-mensural_c} @tab
5251 historic style mensural C clef @tab
5252 @code{mensural_c1}, @code{mensural_c2}, @code{mensural_c3},
5253 @code{mensural_c4} @tab
5254 @quotation
5255 @lilypond[relative=1,notime]
5256 \override Staff.TimeSignature   #'transparent = ##t
5257 \clef "mensural_c2" c
5258 @end lilypond
5259 @end quotation
5260
5261 @item
5262 @code{clefs-mensural_f} @tab
5263 historic style mensural F clef @tab
5264 @code{mensural_f} @tab
5265 @quotation
5266 @lilypond[relative=1,notime]
5267 \override Staff.TimeSignature   #'transparent = ##t
5268 \clef "mensural_f" c
5269 @end lilypond
5270 @end quotation
5271
5272 @item
5273 @code{clefs-mensural_g} @tab
5274 historic style mensural G clef @tab
5275 @code{mensural_g} @tab
5276 @quotation
5277 @lilypond[relative=1,notime]
5278 \override Staff.TimeSignature   #'transparent = ##t
5279 \clef "mensural_g" c
5280 @end lilypond
5281 @end quotation
5282
5283 @item
5284 @code{clefs-vaticana_do} @tab
5285 Editio Vaticana style do clef @tab
5286 @code{vaticana_do1}, @code{vaticana_do2}, @code{vaticana_do3} @tab
5287 @quotation
5288 @lilypond[relative=1,notime]
5289     \override Staff.StaffSymbol   #'line-count = #4
5290 \override Staff.TimeSignature   #'transparent = ##t
5291 \clef "vaticana_do2" c
5292 @end lilypond
5293 @end quotation
5294
5295 @item
5296 @code{clefs-vaticana_fa} @tab
5297 Editio Vaticana style fa clef @tab
5298 @code{vaticana_fa1}, @code{vaticana_fa2} @tab
5299 @quotation
5300 @lilypond[relative=1,notime]
5301     \override Staff.StaffSymbol   #'line-count = #4
5302 \override Staff.TimeSignature   #'transparent = ##t
5303 \clef "vaticana_fa2" c
5304 @end lilypond
5305 @end quotation
5306
5307 @item
5308 @code{clefs-medicaea_do} @tab
5309 Editio Medicaea style do clef @tab
5310 @code{medicaea_do1}, @code{medicaea_do2}, @code{medicaea_do3} @tab
5311 @quotation
5312 @lilypond[relative=1,notime]
5313     \override Staff.StaffSymbol   #'line-count = #4
5314 \override Staff.TimeSignature   #'transparent = ##t
5315 \clef "medicaea_do2" c
5316 @end lilypond
5317 @end quotation
5318
5319 @item
5320 @code{clefs-medicaea_fa} @tab
5321 Editio Medicaea style fa clef @tab
5322 @code{medicaea_fa1}, @code{medicaea_fa2} @tab
5323 @quotation
5324 @lilypond[relative=1,notime]
5325     \override Staff.StaffSymbol   #'line-count = #4
5326 \override Staff.TimeSignature   #'transparent = ##t
5327 \clef "medicaea_fa2" c
5328 @end lilypond
5329 @end quotation
5330
5331 @item
5332 @code{clefs-hufnagel_do} @tab
5333 historic style hufnagel do clef @tab
5334 @code{hufnagel_do1}, @code{hufnagel_do2}, @code{hufnagel_do3} @tab
5335 @quotation
5336 @lilypond[relative=1,notime]
5337     \override Staff.StaffSymbol   #'line-count = #4
5338 \override Staff.TimeSignature   #'transparent = ##t
5339 \clef "hufnagel_do2" c
5340 @end lilypond
5341 @end quotation
5342
5343 @item
5344 @code{clefs-hufnagel_fa} @tab
5345 historic style hufnagel fa clef @tab
5346 @code{hufnagel_fa1}, @code{hufnagel_fa2} @tab
5347 @quotation
5348 @lilypond[relative=1,notime]
5349     \override Staff.StaffSymbol   #'line-count = #4
5350 \override Staff.TimeSignature   #'transparent = ##t
5351 \clef "hufnagel_fa2" c
5352 @end lilypond
5353 @end quotation
5354
5355 @item
5356 @code{clefs-hufnagel_do_fa} @tab
5357 historic style hufnagel combined do/fa clef @tab
5358 @code{hufnagel_do_fa} @tab
5359 @quotation
5360 @lilypond[relative=1,notime]
5361 \override Staff.TimeSignature   #'transparent = ##t
5362 \clef "hufnagel_do_fa" c
5363 @end lilypond
5364 @end quotation
5365
5366 @end multitable
5367
5368
5369
5370 @emph{Modern style} means ``as is typeset in contemporary editions of
5371 transcribed mensural music''.
5372
5373 @emph{Petrucci style} means ``inspired by printings published by the
5374 famous engraver Petrucci (1466-1539)''.
5375
5376 @emph{Historic style} means ``as was typeset or written in historic
5377 editions (other than those of Petrucci)''.
5378
5379 @emph{Editio XXX style} means ``as is/was printed in Editio XXX''.
5380
5381 Petrucci used C clefs with differently balanced left-side vertical
5382 beams, depending on which staff line it is printed.
5383
5384 @seealso
5385
5386 In this manual: see @ref{Clef}.
5387
5388 @refbugs
5389
5390 The mensural g clef is mapped to the Petrucci g clef, until a new
5391 mensural g clef is implemented.
5392
5393
5394
5395 @node Ancient flags
5396 @subsection Ancient flags
5397
5398 @cindex flags
5399
5400
5401 Use the @code{flag-style} property of grob @internalsref{Stem} to
5402 select ancient flags.  Besides the @code{default} flag style,
5403  only @code{mensural} style is supported
5404
5405 @quotation
5406 @lilypond[fragment,raggedright,verbatim]
5407   \override Stem #'flag-style = #'mensural
5408   \override Stem #'thickness = #1.0
5409   \override NoteHead #'style = #'mensural
5410   \autoBeamOff
5411   c'8 d'8 e'8 f'8 c'16 d'16 e'16 f'16 c'32 d'32 e'32 f'32 s8
5412   c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5413 @end lilypond
5414 @end quotation
5415
5416 Note that the innermost flare of each mensural flag always is
5417 vertically aligned with a staff line.  If you do not like this
5418 behavior, you can set the @code{adjust-if-on-staffline} property of
5419 grob @internalsref{Stem} to @code{##f}.  Then, the vertical position
5420 of the end of each flare is different between notes on staff lines and
5421 notes between staff lines
5422
5423 @quotation
5424 @lilypond[fragment,raggedright]
5425   \override Stem #'flag-style = #'mensural
5426   \override Stem #'thickness = #1.0
5427   \override Stem #'adjust-if-on-staffline = ##f
5428   \override NoteHead #'style = #'mensural
5429   \autoBeamOff
5430   c'8 d'8 e'8 f'8 c'16 d'16 e'16 f'16 c'32 d'32 e'32 f'32 s8
5431   c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5432 @end lilypond
5433 @end quotation
5434
5435 There is no particular flag style for neo-mensural notation.  Hence,
5436 when typesetting e.g. the incipit of a transcribed piece of mensural
5437 music, the default flag style should be used.  There are no flags in
5438 Gregorian Chant notation.
5439
5440
5441 @node Ancient time signatures
5442 @subsection Ancient time signatures
5443
5444 @cindex time signatures
5445
5446
5447 There is limited support for mensural time signatures.   The
5448 glyphs are hard-wired to particular time fractions.  In other words,
5449 to get a particular mensural signature glyph with the @code{\time n/m}
5450 command, @code{n} and @code{m} have to be chosen according to the
5451 following table
5452
5453 @quotation
5454 @lilypond
5455 \score {
5456     \notes {
5457         \set Score.timing = ##f
5458         \set Score.barAlways = ##t
5459         s_\markup { "$\\backslash$time 4/4" }
5460          ^\markup { "       " \musicglyph #"timesig-neo_mensural4/4" }
5461         s
5462         s_\markup { "$\\backslash$time 2/2" }
5463          ^\markup { "       " \musicglyph #"timesig-neo_mensural2/2" }
5464         s
5465         s_\markup { "$\\backslash$time 6/4" }
5466          ^\markup { "       " \musicglyph #"timesig-neo_mensural6/4" }
5467         s
5468         s_\markup { "$\\backslash$time 6/8" }
5469          ^\markup { "       " \musicglyph #"timesig-neo_mensural6/8" }
5470         \break
5471         s_\markup { "$\\backslash$time 3/2" }
5472          ^\markup { "       " \musicglyph #"timesig-neo_mensural3/2" }
5473         s
5474         s_\markup { "$\\backslash$time 3/4" }
5475          ^\markup { "       " \musicglyph #"timesig-neo_mensural3/4" }
5476         s
5477         s_\markup { "$\\backslash$time 9/4" }
5478          ^\markup { "       " \musicglyph #"timesig-neo_mensural9/4" }
5479         s
5480         s_\markup { "$\\backslash$time 9/8" }
5481          ^\markup { "       " \musicglyph #"timesig-neo_mensural9/8" }
5482         \break
5483         s_\markup { "$\\backslash$time 4/8" }
5484          ^\markup { "       " \musicglyph #"timesig-neo_mensural4/8" }
5485         s
5486         s_\markup { "$\\backslash$time 2/4" }
5487          ^\markup { "       " \musicglyph #"timesig-neo_mensural2/4" }
5488         \break
5489     }
5490     \paper {
5491         indent = 0.0
5492         raggedright = ##t
5493         \context {
5494             \StaffContext
5495             \remove Staff_symbol_engraver
5496             \remove Clef_engraver
5497             \remove Time_signature_engraver
5498         }
5499     }
5500 }
5501 @end lilypond
5502 @end quotation
5503
5504 Use the @code{style} property of grob @internalsref{TimeSignature} to
5505 select ancient time signatures.  Supported styles are
5506 @code{neo_mensural} and @code{mensural}.  The above table uses the
5507 @code{neo_mensural} style.  This style is appropriate e.g. for the
5508 incipit of transcriptions of mensural pieces.  The @code{mensural}
5509 style mimics the look of historical printings of the 16th century.
5510
5511 @inputfileref{input/test,time.ly} gives an overview over all available
5512 ancient and modern styles.
5513
5514 @seealso
5515
5516 Program reference: @ref{Time signature} gives a general introduction into the use of time
5517 signatures.
5518
5519 @refbugs
5520
5521 Mensural signature glyphs are mapped to time fractions in a hard-wired
5522 way.  This mapping is sensible, but still arbitrary: given a mensural
5523 time signature, the time fraction represents a modern meter that
5524 usually will be a good choice when transcribing a mensural piece of
5525 music.  For a particular piece of mensural music, however, the mapping
5526 may be unsatisfactory.  In particular, the mapping assumes a fixed
5527 transcription of durations (e.g. brevis = half note in 2/2, i.e. 4:1).
5528 Some glyphs (such as the alternate glyph for 6/8 meter) are not at all
5529 accessible through the @code{\time} command.
5530
5531 Mensural time signatures are supported typographically, but not yet
5532 musically.  The internal representation of durations is 
5533 based on a purely binary system; a ternary division such as 1 brevis =
5534 3 semibrevis (tempus perfectum) or 1 semibrevis = 3 minima (cum
5535 prolatione maiori) is not correctly handled: event times in ternary
5536 modes will be badly computed, resulting e.g. in horizontally
5537 misaligned note heads, and bar checks are likely to erroneously fail.
5538
5539 The syntax and semantics of the @code{\time} command for mensural
5540 music is subject to change.
5541
5542 @node Custodes
5543 @subsection Custodes
5544
5545 @cindex custos
5546 @cindex custodes
5547
5548 A @emph{custos} (plural: @emph{custodes}; Latin word for `guard') is a
5549 symbol that appears at the end of a staff.  It anticipates the pitch
5550 of the first note(s) of the following line and thus helps the player
5551 or singer to manage line breaks during performance, thus enhancing
5552 readability of a score.
5553
5554 Custodes were frequently used in music notation until the 17th
5555 century.  Nowadays, they have survived only in a few particular forms
5556 of musical notation such as contemporary editions of Gregorian chant
5557 like the @emph{editio vaticana}.  There are different custos glyphs
5558 used in different flavors of notational style.
5559
5560 For typesetting custodes, just put a @internalsref{Custos_engraver} into the
5561 @internalsref{Staff} context when declaring the @code{\paper} block,
5562 as shown in the following example
5563
5564 @example
5565 \paper @{
5566   \context @{
5567      \StaffContext
5568      \consists Custos_engraver
5569      Custos \override #'style = #'mensural
5570   @}
5571 @}
5572 @end example
5573
5574 The result looks like this
5575
5576 @quotation
5577 @lilypond[raggedright]
5578 \score {
5579     \notes {
5580         a'1
5581         \override Staff.Custos #'style = #'mensural
5582         \break
5583         g'
5584     }
5585     \paper {
5586         \context {
5587             \StaffContext
5588             \consists Custos_engraver
5589         }
5590     }
5591 }
5592 @end lilypond
5593 @end quotation
5594
5595 The custos glyph is selected by the @code{style} property. The styles
5596 supported are @code{vaticana}, @code{medicaea}, @code{hufnagel} and
5597 @code{mensural}.  They are demonstrated in the following fragment
5598
5599 @quotation
5600 @lilypond
5601 \score {
5602        \new Lyrics    \lyrics {
5603         \markup {
5604             \column <
5605                 "vaticana" 
5606                 { " " \musicglyph #"custodes-vaticana-u0" }
5607             > }
5608         \markup {    \column <
5609                 "medicaea"
5610                 { " " \musicglyph #"custodes-medicaea-u0" }
5611             >}
5612             \markup {
5613             \column <
5614                 "hufnagel"
5615                 { " " \musicglyph #"custodes-hufnagel-u0" }
5616             >}
5617             \markup {
5618             \column <
5619                 "mensural"
5620                 { " " \musicglyph #"custodes-mensural-u0" }
5621             >}
5622         }
5623     
5624     \paper {
5625         raggedright = ##t 
5626         }      
5627 }
5628 @end lilypond
5629 @end quotation
5630
5631 @seealso
5632
5633 Program reference: @internalsref{Custos}.
5634
5635 Examples: @inputfileref{input/regression,custos.ly}.
5636
5637
5638 @node Divisiones
5639 @subsection Divisiones
5640
5641 @cindex divisio
5642 @cindex divisiones
5643 @cindex finalis
5644
5645 A @emph{divisio} (plural: @emph{divisiones}; Latin word for
5646 `division') is a staff context symbol that is used to structure
5647 Gregorian music into phrases and sections.  The musical meaning of
5648 @emph{divisio minima}, @emph{divisio maior} and @emph{divisio maxima}
5649 can be characterized as short, medium and long pause, somewhat like
5650 @ref{Breath marks}.  The @emph{finalis} sign not only marks the end of
5651 a chant, but is also frequently used within a single
5652 antiphonal/responsorial chant to mark the end of each section.
5653
5654
5655 To use divisiones, include the file @code{gregorian-init.ly}.  It
5656 contains definitions that you can apply by just inserting
5657 @code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
5658 and @code{\finalis} at proper places in the input.  Some editions use
5659 @emph{virgula} or @emph{caesura} instead of divisio minima.
5660 Therefore, @code{gregorian-init.ly} also defines @code{\virgula} and
5661 @code{\caesura}
5662
5663 @quotation
5664 @lilypondfile[]{divisiones.ly}
5665 @end quotation
5666
5667 @refcommands
5668
5669 @cindex @code{\virgula}
5670 @code{\virgula},
5671 @cindex @code{\caesura}
5672 @code{\caesura},
5673 @cindex @code{\divisioMinima}
5674 @code{\divisioMinima},
5675 @cindex @code{\divisioMaior}
5676 @code{\divisioMaior},
5677 @cindex @code{\divisioMaxima}
5678 @code{\divisioMaxima},
5679 @cindex @code{\finalis}
5680 @code{\finalis}.
5681
5682 @seealso
5683
5684 In this manual: @ref{Breath marks}.
5685
5686 Program reference: @internalsref{BreathingSign}, @internalsref{BreathingSignEvent}.
5687
5688 Examples: @inputfileref{input/test,divisiones.ly}.
5689
5690 @node Ligatures
5691 @subsection Ligatures
5692
5693 @cindex Ligatures
5694
5695 @c TODO: Should double check if I recalled things correctly when I wrote
5696 @c down the following paragraph by heart.
5697
5698 A ligature is a coherent graphical symbol that represents at least two
5699 distinct notes.  Ligatures originally appeared in the manuscripts of
5700 Gregorian chant notation roughly since the 9th century to denote
5701 ascending or descending sequences of notes.  
5702
5703 Ligatures are entered by enclosing them in @code{\[} and @code{\]}.
5704 Some ligature styles may need additional input syntax specific for
5705 this particular type of ligature.  By default, the
5706 @internalsref{LigatureBracket} engraver just puts a square bracket
5707 above the ligature
5708
5709 @quotation
5710 @lilypond[raggedright,verbatim]
5711 \score {
5712     \notes \transpose c c' {
5713         \[ g c a f d' \]
5714         a g f
5715         \[ e f a g \]
5716     }
5717 }
5718 @end lilypond
5719 @end quotation
5720
5721 To select a specific style of ligatures, a proper ligature engraver
5722 has to be added to the @internalsref{Voice} context, as explained in
5723 the following subsections.   Only white mensural ligatures
5724 are supported with certain limitations.
5725
5726 @menu
5727 * White mensural ligatures::    
5728 * Gregorian square neumes ligatures::  
5729 @end menu
5730
5731 @node White mensural ligatures
5732 @subsubsection White mensural ligatures
5733
5734 @cindex Mensural ligatures
5735 @cindex White mensural ligatures
5736
5737 There is limited support for white mensural ligatures.  
5738
5739 To engrave white mensural ligatures, in the paper block the
5740 @internalsref{Mensural_ligature_engraver} has to be put into the
5741 @internalsref{Voice} context, and remove the
5742 @internalsref{Ligature_bracket_engraver}
5743
5744 @example
5745     \paper @{
5746         \context @{
5747             \VoiceContext
5748             \remove Ligature_bracket_engraver
5749             \consists Mensural_ligature_engraver
5750         @}
5751     @}
5752 @end example
5753
5754 There is no additional input language to describe the shape of a
5755 white mensural ligature.  The shape is rather determined solely from
5756 the pitch and duration of the enclosed notes.  While this approach may
5757 take a new user a while to get accustomed, it has the great advantage
5758 that the full musical information of the ligature is known internally.
5759 This is not only required for correct MIDI output, but also allows for
5760 automatic transcription of the ligatures.
5761
5762 For example,
5763
5764 @example
5765         \set Score.timing = ##f
5766         \set Score.defaultBarType = "empty"
5767         \override NoteHead #'style = #'neo_mensural
5768         \override Staff.TimeSignature   #'style = #'neo_mensural
5769         \clef "petrucci_g"
5770         \[ g\longa c\breve a\breve f\breve d'\longa \]
5771         s4
5772         \[ e1 f1 a\breve g\longa \]
5773 @end example
5774 @quotation
5775 @lilypond[raggedright]
5776 \score {
5777     \notes \transpose c c' {
5778         \set Score.timing = ##f
5779         \set Score.defaultBarType = "empty"
5780         \override NoteHead #'style = #'neo_mensural
5781         \override Staff.TimeSignature   #'style = #'neo_mensural
5782         \clef "petrucci_g"
5783         \[ g\longa c\breve a\breve f\breve d'\longa \]
5784         s4
5785         \[ e1 f1 a\breve g\longa \]
5786     }
5787     \paper {
5788         \context {
5789             \VoiceContext
5790             \remove Ligature_bracket_engraver
5791             \consists Mensural_ligature_engraver
5792         }
5793     }
5794 }
5795 @end lilypond
5796 @end quotation
5797
5798 Without replacing @internalsref{Ligature_bracket_engraver} with
5799 @internalsref{Mensural_ligature_engraver}, the same music transcribes
5800 to the following
5801
5802 @quotation
5803 @lilypond[raggedright]
5804 \score {
5805     \notes \transpose c c' {
5806         \set Score.timing = ##f
5807         \set Score.defaultBarType = "empty"
5808         \override NoteHead #'style = #'neo_mensural
5809         \override Staff.TimeSignature   #'style = #'neo_mensural
5810         \clef "petrucci_g"
5811         \[ g\longa c\breve a\breve f\breve d'\longa \]
5812         s4
5813         \[ e1 f1 a\breve g\longa \]
5814     }
5815 }
5816 @end lilypond
5817 @end quotation
5818
5819 @refbugs
5820
5821 The implementation is experimental; it may output strange warnings or
5822 even crash in some cases or produce weird results on more complex
5823 ligatures.
5824
5825 @node Gregorian square neumes ligatures
5826 @subsubsection Gregorian square neumes ligatures
5827
5828 @cindex Square neumes ligatures
5829 @cindex Gregorian square neumes ligatures
5830
5831 Gregorian square neumes notation (following the style of the Editio
5832 Vaticana) is under heavy development, but not yet really usable for
5833 production purposes.  Core ligatures can already be typeset, but
5834 essential issues for serious typesetting are still under development,
5835 such as (among others) horizontal alignment of multiple ligatures,
5836 lyrics alignment and proper accidentals handling.  Still, this section
5837 gives a sneak preview of what Gregorian chant may look like once it
5838 will work.
5839
5840 The following table contains the extended neumes table of the 2nd
5841 volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
5842 1983 by the monks of Solesmes.
5843
5844 @multitable @columnfractions .4 .2 .2 .2
5845
5846 @item
5847 @b{Neuma aut@*Neumarum Elementa} @tab
5848 @b{Figurae@*Rectae} @tab
5849 @b{Figurae@*Liquescentes Auctae} @tab
5850 @b{Figurae@*Liquescentes Deminutae}
5851
5852 @c TODO: \paper block is identical in all of the below examples.
5853 @c Therefore, it should somehow be included rather than duplicated all
5854 @c the time. --jr
5855
5856 @c why not make identifiers in ly/engraver-init.ly? --hwn
5857
5858 @c Because it's just used to typeset plain notes without
5859 @c a staff for demonstration purposes rather than something
5860 @c special of Gregorian chant notation. --jr
5861
5862 @item
5863 @code{1. Punctum}
5864 @tab
5865 @quotation
5866 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.5\cm]
5867 \include "gregorian-init.ly"
5868 \score {
5869     \notes \transpose c c' {
5870         % Punctum
5871         \[ b \]
5872         \noBreak s^\markup {"a"} \noBreak
5873
5874         % Punctum Inclinatum
5875         \[ \inclinatum b \]
5876         \noBreak s^\markup {"b"}
5877     }
5878     \paper {
5879         interscoreline = 1
5880         \context {
5881             \ScoreContext
5882             \remove "Bar_number_engraver"
5883         }
5884         \context {
5885             \StaffContext
5886             \remove "Clef_engraver"
5887             \remove "Key_engraver"
5888             \override StaffSymbol #'transparent = ##t
5889             \remove "Time_signature_engraver"
5890             \remove "Bar_engraver"
5891             minimumVerticalExtent = ##f
5892         }
5893         \context {
5894             \VoiceContext
5895             \remove Ligature_bracket_engraver
5896             \consists Vaticana_ligature_engraver
5897             \override NoteHead #'style = #'vaticana_punctum
5898             \override Stem #'transparent = ##t
5899         }
5900     }
5901 }
5902 @end lilypond
5903 @end quotation
5904 @tab
5905 @quotation
5906 @lilypond[noindent,staffsize=26,nofragment,linewidth=2.5\cm]
5907 \include "gregorian-init.ly"
5908 \score {
5909     \notes \transpose c c' {
5910         % Punctum Auctum Ascendens
5911         \[ \auctum \ascendens b \]
5912         \noBreak s^\markup {"c"} \noBreak
5913
5914         % Punctum Auctum Descendens
5915         \[ \auctum \descendens b \]
5916         \noBreak s^\markup {"d"} \noBreak
5917
5918         % Punctum Inclinatum Auctum
5919         \[ \inclinatum \auctum b \]
5920         \noBreak s^\markup {"e"}
5921     }
5922     \paper {
5923         interscoreline = 1
5924         \context {
5925             \ScoreContext
5926             \remove "Bar_number_engraver"
5927         }
5928         \context {
5929             \StaffContext
5930             \remove "Clef_engraver"
5931             \remove "Key_engraver"
5932             \override StaffSymbol #'transparent = ##t
5933             \remove "Time_signature_engraver"
5934             \remove "Bar_engraver"
5935             minimumVerticalExtent = ##f
5936         }
5937         \context {
5938             \VoiceContext
5939             \remove Ligature_bracket_engraver
5940             \consists Vaticana_ligature_engraver
5941             \override NoteHead #'style = #'vaticana_punctum
5942             \override Stem #'transparent = ##t
5943         }
5944     }
5945 }
5946 @end lilypond
5947 @end quotation
5948 @tab
5949 @quotation
5950 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5951 \include "gregorian-init.ly"
5952 \score {
5953     \notes \transpose c c' {
5954         % Punctum Inclinatum Parvum
5955         \[ \inclinatum \deminutum b \]
5956         \noBreak s^\markup {"f"}
5957     }
5958     \paper {
5959         interscoreline = 1
5960         \context {
5961             \ScoreContext
5962             \remove "Bar_number_engraver"
5963         }
5964         \context {
5965             \StaffContext
5966             \remove "Clef_engraver"
5967             \remove "Key_engraver"
5968             \override StaffSymbol #'transparent = ##t
5969             \remove "Time_signature_engraver"
5970             \remove "Bar_engraver"
5971             minimumVerticalExtent = ##f
5972         }
5973         \context {
5974             \VoiceContext
5975             \remove Ligature_bracket_engraver
5976             \consists Vaticana_ligature_engraver
5977             \override NoteHead #'style = #'vaticana_punctum
5978             \override Stem #'transparent = ##t
5979         }
5980     }
5981 }
5982 @end lilypond
5983 @end quotation
5984
5985 @item
5986 @code{2. Virga}
5987 @tab
5988 @quotation
5989 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5990 \include "gregorian-init.ly"
5991 \score {
5992     \notes \transpose c c' {
5993         % Virga
5994         \[ \virga b \]
5995         \noBreak s^\markup {"g"}
5996     }
5997     \paper {
5998         interscoreline = 1
5999         \context {
6000             \ScoreContext
6001             \remove "Bar_number_engraver"
6002         }
6003         \context {
6004             \StaffContext
6005             \remove "Clef_engraver"
6006             \remove "Key_engraver"
6007             \override StaffSymbol #'transparent = ##t
6008             \remove "Time_signature_engraver"
6009             \remove "Bar_engraver"
6010             minimumVerticalExtent = ##f
6011         }
6012         \context {
6013             \VoiceContext
6014             \remove Ligature_bracket_engraver
6015             \consists Vaticana_ligature_engraver
6016             \override NoteHead #'style = #'vaticana_punctum
6017             \override Stem #'transparent = ##t
6018         }
6019     }
6020 }
6021 @end lilypond
6022 @end quotation
6023 @tab
6024 @tab
6025
6026 @item
6027 @code{3. Apostropha vel Stropha}
6028 @tab
6029 @quotation
6030 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6031 \include "gregorian-init.ly"
6032 \score {
6033     \notes \transpose c c' {
6034         % Stropha
6035         \[ \stropha b \]
6036         \noBreak s^\markup {"h"}
6037     }
6038     \paper {
6039         interscoreline = 1
6040         \context {
6041             \ScoreContext
6042             \remove "Bar_number_engraver"
6043         }
6044         \context {
6045             \StaffContext
6046             \remove "Clef_engraver"
6047             \remove "Key_engraver"
6048             \override StaffSymbol #'transparent = ##t
6049             \remove "Time_signature_engraver"
6050             \remove "Bar_engraver"
6051             minimumVerticalExtent = ##f
6052         }
6053         \context {
6054             \VoiceContext
6055             \remove Ligature_bracket_engraver
6056             \consists Vaticana_ligature_engraver
6057             \override NoteHead #'style = #'vaticana_punctum
6058             \override Stem #'transparent = ##t
6059         }
6060     }
6061 }
6062 @end lilypond
6063 @end quotation
6064 @tab
6065 @quotation
6066 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6067 \include "gregorian-init.ly"
6068 \score {
6069     \notes \transpose c c' {
6070         % Stropha Aucta
6071         \[ \stropha \auctum b \]
6072         \noBreak s^\markup {"i"}
6073     }
6074     \paper {
6075         interscoreline = 1
6076         \context {
6077             \ScoreContext
6078             \remove "Bar_number_engraver"
6079         }
6080         \context {
6081             \StaffContext
6082             \remove "Clef_engraver"
6083             \remove "Key_engraver"
6084             \override StaffSymbol #'transparent = ##t
6085             \remove "Time_signature_engraver"
6086             \remove "Bar_engraver"
6087             minimumVerticalExtent = ##f
6088         }
6089         \context {
6090             \VoiceContext
6091             \remove Ligature_bracket_engraver
6092             \consists Vaticana_ligature_engraver
6093             \override NoteHead #'style = #'vaticana_punctum
6094             \override Stem #'transparent = ##t
6095         }
6096     }
6097 }
6098 @end lilypond
6099 @end quotation
6100 @tab
6101
6102 @item
6103 @code{4. Oriscus}
6104 @tab
6105 @quotation
6106 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6107 \include "gregorian-init.ly"
6108 \score {
6109     \notes \transpose c c' {
6110         % Oriscus
6111         \[ \oriscus b \]
6112         \noBreak s^\markup {"j"}
6113     }
6114     \paper {
6115         interscoreline = 1
6116         \context {
6117             \ScoreContext
6118             \remove "Bar_number_engraver"
6119         }
6120         \context {
6121             \StaffContext
6122             \remove "Clef_engraver"
6123             \remove "Key_engraver"
6124             \override StaffSymbol #'transparent = ##t
6125             \remove "Time_signature_engraver"
6126             \remove "Bar_engraver"
6127             minimumVerticalExtent = ##f
6128         }
6129         \context {
6130             \VoiceContext
6131             \remove Ligature_bracket_engraver
6132             \consists Vaticana_ligature_engraver
6133             \override NoteHead #'style = #'vaticana_punctum
6134             \override Stem #'transparent = ##t
6135         }
6136     }
6137 }
6138 @end lilypond
6139 @end quotation
6140 @tab
6141 @tab
6142
6143 @item
6144 @code{5. Clivis vel Flexa}
6145 @tab
6146 @quotation
6147 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6148 \include "gregorian-init.ly"
6149 \score {
6150     \notes \transpose c c' {
6151         % Clivis vel Flexa
6152         \[ b \flexa g \]
6153         s^\markup {"k"}
6154     }
6155     \paper {
6156         interscoreline = 1
6157         \context {
6158             \ScoreContext
6159             \remove "Bar_number_engraver"
6160         }
6161         \context {
6162             \StaffContext
6163             \remove "Clef_engraver"
6164             \remove "Key_engraver"
6165             \override StaffSymbol #'transparent = ##t
6166             \remove "Time_signature_engraver"
6167             \remove "Bar_engraver"
6168             minimumVerticalExtent = ##f
6169         }
6170         \context {
6171             \VoiceContext
6172             \remove Ligature_bracket_engraver
6173             \consists Vaticana_ligature_engraver
6174             \override NoteHead #'style = #'vaticana_punctum
6175             \override Stem #'transparent = ##t
6176         }
6177     }
6178 }
6179 @end lilypond
6180 @end quotation
6181 @tab
6182 @quotation
6183 @lilypond[noindent,staffsize=26,nofragment,linewidth=2.0\cm]
6184 \include "gregorian-init.ly"
6185 \score {
6186     \notes \transpose c c' {
6187         % Clivis Aucta Descendens
6188         \[ b \flexa \auctum \descendens g \]
6189         \noBreak s^\markup {"l"} \noBreak
6190
6191         % Clivis Aucta Ascendens
6192         \[ b \flexa \auctum \ascendens g \]
6193         \noBreak s^\markup {"m"}
6194     }
6195     \paper {
6196         interscoreline = 1
6197         \context {
6198             \ScoreContext
6199             \remove "Bar_number_engraver"
6200         }
6201         \context {
6202             \StaffContext
6203             \remove "Clef_engraver"
6204             \remove "Key_engraver"
6205             \override StaffSymbol #'transparent = ##t
6206             \remove "Time_signature_engraver"
6207             \remove "Bar_engraver"
6208             minimumVerticalExtent = ##f
6209         }
6210         \context {
6211             \VoiceContext
6212             \remove Ligature_bracket_engraver
6213             \consists Vaticana_ligature_engraver
6214             \override NoteHead #'style = #'vaticana_punctum
6215             \override Stem #'transparent = ##t
6216         }
6217     }
6218 }
6219 @end lilypond
6220 @end quotation
6221 @tab
6222 @quotation
6223 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6224 \include "gregorian-init.ly"
6225 \score {
6226     \notes \transpose c c' {
6227         % Cephalicus
6228         \[ b \flexa \deminutum g \]
6229         s^\markup {"n"}
6230     }
6231     \paper {
6232         interscoreline = 1
6233         \context {
6234             \ScoreContext
6235             \remove "Bar_number_engraver"
6236         }
6237         \context {
6238             \StaffContext
6239             \remove "Clef_engraver"
6240             \remove "Key_engraver"
6241             \override StaffSymbol #'transparent = ##t
6242             \remove "Time_signature_engraver"
6243             \remove "Bar_engraver"
6244             minimumVerticalExtent = ##f
6245         }
6246         \context {
6247             \VoiceContext
6248             \remove Ligature_bracket_engraver
6249             \consists Vaticana_ligature_engraver
6250             \override NoteHead #'style = #'vaticana_punctum
6251             \override Stem #'transparent = ##t
6252         }
6253     }
6254 }
6255 @end lilypond
6256 @end quotation
6257
6258 @item
6259 @code{6. Podatus vel Pes}
6260 @tab
6261 @quotation
6262 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6263 \include "gregorian-init.ly"
6264 \score {
6265     \notes \transpose c c' {
6266         % Podatus vel Pes
6267         \[ g \pes b \]
6268         s^\markup {"o"}
6269     }
6270     \paper {
6271         interscoreline = 1
6272         \context {
6273             \ScoreContext
6274             \remove "Bar_number_engraver"
6275         }
6276         \context {
6277             \StaffContext
6278             \remove "Clef_engraver"
6279             \remove "Key_engraver"
6280             \override StaffSymbol #'transparent = ##t
6281             \remove "Time_signature_engraver"
6282             \remove "Bar_engraver"
6283             minimumVerticalExtent = ##f
6284         }
6285         \context {
6286             \VoiceContext
6287             \remove Ligature_bracket_engraver
6288             \consists Vaticana_ligature_engraver
6289             \override NoteHead #'style = #'vaticana_punctum
6290             \override Stem #'transparent = ##t
6291         }
6292     }
6293 }
6294 @end lilypond
6295 @end quotation
6296 @tab
6297 @quotation
6298 @lilypond[noindent,staffsize=26,nofragment,linewidth=2.0\cm]
6299 \include "gregorian-init.ly"
6300 \score {
6301     \notes \transpose c c' {
6302         % Pes Auctus Descendens
6303         \[ g \pes \auctum \descendens b \]
6304         \noBreak s^\markup {"p"} \noBreak
6305
6306         % Pes Auctus Ascendens
6307         \[ g \pes \auctum \ascendens b \]
6308         \noBreak s^\markup {"q"}
6309     }
6310     \paper {
6311         interscoreline = 1
6312         \context {
6313             \ScoreContext
6314             \remove "Bar_number_engraver"
6315         }
6316         \context {
6317             \StaffContext
6318             \remove "Clef_engraver"
6319             \remove "Key_engraver"
6320             \override StaffSymbol #'transparent = ##t
6321             \remove "Time_signature_engraver"
6322             \remove "Bar_engraver"
6323             minimumVerticalExtent = ##f
6324         }
6325         \context {
6326             \VoiceContext
6327             \remove Ligature_bracket_engraver
6328             \consists Vaticana_ligature_engraver
6329             \override NoteHead #'style = #'vaticana_punctum
6330             \override Stem #'transparent = ##t
6331         }
6332     }
6333 }
6334 @end lilypond
6335 @end quotation
6336 @tab
6337 @quotation
6338 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6339 \include "gregorian-init.ly"
6340 \score {
6341     \notes \transpose c c' {
6342         % Epiphonus
6343         \[ g \pes \deminutum b \]
6344         s^\markup {"r"}
6345     }
6346     \paper {
6347         interscoreline = 1
6348         \context {
6349             \ScoreContext
6350             \remove "Bar_number_engraver"
6351         }
6352         \context {
6353             \StaffContext
6354             \remove "Clef_engraver"
6355             \remove "Key_engraver"
6356             \override StaffSymbol #'transparent = ##t
6357             \remove "Time_signature_engraver"
6358             \remove "Bar_engraver"
6359             minimumVerticalExtent = ##f
6360         }
6361         \context {
6362             \VoiceContext
6363             \remove Ligature_bracket_engraver
6364             \consists Vaticana_ligature_engraver
6365             \override NoteHead #'style = #'vaticana_punctum
6366             \override Stem #'transparent = ##t
6367         }
6368     }
6369 }
6370 @end lilypond
6371 @end quotation
6372
6373 @item
6374 @code{7. Pes Quassus}
6375 @tab
6376 @quotation
6377 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6378 \include "gregorian-init.ly"
6379 \score {
6380     \notes \transpose c c' {
6381         % Pes Quassus
6382         \[ \oriscus g \pes \virga b \]
6383         s^\markup {"s"}
6384     }
6385     \paper {
6386         interscoreline = 1
6387         \context {
6388             \ScoreContext
6389             \remove "Bar_number_engraver"
6390         }
6391         \context {
6392             \StaffContext
6393             \remove "Clef_engraver"
6394             \remove "Key_engraver"
6395             \override StaffSymbol #'transparent = ##t
6396             \remove "Time_signature_engraver"
6397             \remove "Bar_engraver"
6398             minimumVerticalExtent = ##f
6399         }
6400         \context {
6401             \VoiceContext
6402             \remove Ligature_bracket_engraver
6403             \consists Vaticana_ligature_engraver
6404             \override NoteHead #'style = #'vaticana_punctum
6405             \override Stem #'transparent = ##t
6406         }
6407     }
6408 }
6409 @end lilypond
6410 @end quotation
6411 @tab
6412 @quotation
6413 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6414 \include "gregorian-init.ly"
6415 \score {
6416     \notes \transpose c c' {
6417         % Pes Quassus Auctus Descendens
6418         \[ \oriscus g \pes \auctum \descendens b \]
6419         s^\markup {"t"}
6420     }
6421     \paper {
6422         interscoreline = 1
6423         \context {
6424             \ScoreContext
6425             \remove "Bar_number_engraver"
6426         }
6427         \context {
6428             \StaffContext
6429             \remove "Clef_engraver"
6430             \remove "Key_engraver"
6431             \override StaffSymbol #'transparent = ##t
6432             \remove "Time_signature_engraver"
6433             \remove "Bar_engraver"
6434             minimumVerticalExtent = ##f
6435         }
6436         \context {
6437             \VoiceContext
6438             \remove Ligature_bracket_engraver
6439             \consists Vaticana_ligature_engraver
6440             \override NoteHead #'style = #'vaticana_punctum
6441             \override Stem #'transparent = ##t
6442         }
6443     }
6444 }
6445 @end lilypond
6446 @end quotation
6447 @tab
6448
6449 @item
6450 @code{8. Quilisma Pes}
6451 @tab
6452 @quotation
6453 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6454 \include "gregorian-init.ly"
6455 \score {
6456     \notes \transpose c c' {
6457         % Quilisma Pes
6458         \[ \quilisma g \pes b \]
6459         s^\markup {"u"}
6460     }
6461     \paper {
6462         interscoreline = 1
6463         \context {
6464             \ScoreContext
6465             \remove "Bar_number_engraver"
6466         }
6467         \context {
6468             \StaffContext
6469             \remove "Clef_engraver"
6470             \remove "Key_engraver"
6471             \override StaffSymbol #'transparent = ##t
6472             \remove "Time_signature_engraver"
6473             \remove "Bar_engraver"
6474             minimumVerticalExtent = ##f
6475         }
6476         \context {
6477             \VoiceContext
6478             \remove Ligature_bracket_engraver
6479             \consists Vaticana_ligature_engraver
6480             \override NoteHead #'style = #'vaticana_punctum
6481             \override Stem #'transparent = ##t
6482         }
6483     }
6484 }
6485 @end lilypond
6486 @end quotation
6487 @tab
6488 @quotation
6489 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6490 \include "gregorian-init.ly"
6491 \score {
6492     \notes \transpose c c' {
6493         % Quilisma Pes Auctus Descendens
6494         \[ \quilisma g \pes \auctum \descendens b \]
6495         s^\markup {"v"}
6496     }
6497     \paper {
6498         interscoreline = 1
6499         \context {
6500             \ScoreContext
6501             \remove "Bar_number_engraver"
6502         }
6503         \context {
6504             \StaffContext
6505             \remove "Clef_engraver"
6506             \remove "Key_engraver"
6507             \override StaffSymbol #'transparent = ##t
6508             \remove "Time_signature_engraver"
6509             \remove "Bar_engraver"
6510             minimumVerticalExtent = ##f
6511         }
6512         \context {
6513             \VoiceContext
6514             \remove Ligature_bracket_engraver
6515             \consists Vaticana_ligature_engraver
6516             \override NoteHead #'style = #'vaticana_punctum
6517             \override Stem #'transparent = ##t
6518         }
6519     }
6520 }
6521 @end lilypond
6522 @end quotation
6523 @tab
6524
6525 @item
6526 @code{9. Podatus Initio Debilis}
6527 @tab
6528 @quotation
6529 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6530 \include "gregorian-init.ly"
6531 \score {
6532     \notes \transpose c c' {
6533         % Pes Initio Debilis
6534         \[ \deminutum g \pes b \]
6535         s^\markup {"w"}
6536     }
6537     \paper {
6538         interscoreline = 1
6539         \context {
6540             \ScoreContext
6541             \remove "Bar_number_engraver"
6542         }
6543         \context {
6544             \StaffContext
6545             \remove "Clef_engraver"
6546             \remove "Key_engraver"
6547             \override StaffSymbol #'transparent = ##t
6548             \remove "Time_signature_engraver"
6549             \remove "Bar_engraver"
6550             minimumVerticalExtent = ##f
6551         }
6552         \context {
6553             \VoiceContext
6554             \remove Ligature_bracket_engraver
6555             \consists Vaticana_ligature_engraver
6556             \override NoteHead #'style = #'vaticana_punctum
6557             \override Stem #'transparent = ##t
6558         }
6559     }
6560 }
6561 @end lilypond
6562 @end quotation
6563 @tab
6564 @quotation
6565 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6566 \include "gregorian-init.ly"
6567 \score {
6568     \notes \transpose c c' {
6569         % Pes Auctus Descendens Initio Debilis
6570         \[ \deminutum g \pes \auctum \descendens b \]
6571         s^\markup {"x"}
6572     }
6573     \paper {
6574         interscoreline = 1
6575         \context {
6576             \ScoreContext
6577             \remove "Bar_number_engraver"
6578         }
6579         \context {
6580             \StaffContext
6581             \remove "Clef_engraver"
6582             \remove "Key_engraver"
6583             \override StaffSymbol #'transparent = ##t
6584             \remove "Time_signature_engraver"
6585             \remove "Bar_engraver"
6586             minimumVerticalExtent = ##f
6587         }
6588         \context {
6589             \VoiceContext
6590             \remove Ligature_bracket_engraver
6591             \consists Vaticana_ligature_engraver
6592             \override NoteHead #'style = #'vaticana_punctum
6593             \override Stem #'transparent = ##t
6594         }
6595     }
6596 }
6597 @end lilypond
6598 @end quotation
6599 @tab
6600
6601 @item
6602 @code{10. Torculus}
6603 @tab
6604 @quotation
6605 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6606 \include "gregorian-init.ly"
6607 \score {
6608     \notes \transpose c c' {
6609         % Torculus
6610         \[ a \pes b \flexa g \]
6611         s^\markup {"y"}
6612     }
6613     \paper {
6614         interscoreline = 1
6615         \context {
6616             \ScoreContext
6617             \remove "Bar_number_engraver"
6618         }
6619         \context {
6620             \StaffContext
6621             \remove "Clef_engraver"
6622             \remove "Key_engraver"
6623             \override StaffSymbol #'transparent = ##t
6624             \remove "Time_signature_engraver"
6625             \remove "Bar_engraver"
6626             minimumVerticalExtent = ##f
6627         }
6628         \context {
6629             \VoiceContext
6630             \remove Ligature_bracket_engraver
6631             \consists Vaticana_ligature_engraver
6632             \override NoteHead #'style = #'vaticana_punctum
6633             \override Stem #'transparent = ##t
6634         }
6635     }
6636 }
6637 @end lilypond
6638 @end quotation
6639 @tab
6640 @quotation
6641 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6642 \include "gregorian-init.ly"
6643 \score {
6644     \notes \transpose c c' {
6645         % Torculus Auctus Descendens
6646         \[ a \pes b \flexa \auctum \descendens g \]
6647         s^\markup {"z"}
6648     }
6649     \paper {
6650         interscoreline = 1
6651         \context {
6652             \ScoreContext
6653             \remove "Bar_number_engraver"
6654         }
6655         \context {
6656             \StaffContext
6657             \remove "Clef_engraver"
6658             \remove "Key_engraver"
6659             \override StaffSymbol #'transparent = ##t
6660             \remove "Time_signature_engraver"
6661             \remove "Bar_engraver"
6662             minimumVerticalExtent = ##f
6663         }
6664         \context {
6665             \VoiceContext
6666             \remove Ligature_bracket_engraver
6667             \consists Vaticana_ligature_engraver
6668             \override NoteHead #'style = #'vaticana_punctum
6669             \override Stem #'transparent = ##t
6670         }
6671     }
6672 }
6673 @end lilypond
6674 @end quotation
6675 @tab
6676 @quotation
6677 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6678 \include "gregorian-init.ly"
6679 \score {
6680     \notes \transpose c c' {
6681         % Torculus Deminutus
6682         \[ a \pes b \flexa \deminutum g \]
6683         s^\markup {"A"}
6684     }
6685     \paper {
6686         interscoreline = 1
6687         \context {
6688             \ScoreContext
6689             \remove "Bar_number_engraver"
6690         }
6691         \context {
6692             \StaffContext
6693             \remove "Clef_engraver"
6694             \remove "Key_engraver"
6695             \override StaffSymbol #'transparent = ##t
6696             \remove "Time_signature_engraver"
6697             \remove "Bar_engraver"
6698             minimumVerticalExtent = ##f
6699         }
6700         \context {
6701             \VoiceContext
6702             \remove Ligature_bracket_engraver
6703             \consists Vaticana_ligature_engraver
6704             \override NoteHead #'style = #'vaticana_punctum
6705             \override Stem #'transparent = ##t
6706         }
6707     }
6708 }
6709 @end lilypond
6710 @end quotation
6711
6712 @item
6713 @code{11. Torculus Initio Debilis}
6714 @tab
6715 @quotation
6716 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6717 \include "gregorian-init.ly"
6718 \score {
6719     \notes \transpose c c' {
6720         % Torculus Initio Debilis
6721         \[ \deminutum a \pes b \flexa g \]
6722         s^\markup {"B"}
6723     }
6724     \paper {
6725         interscoreline = 1
6726         \context {
6727             \ScoreContext
6728             \remove "Bar_number_engraver"
6729         }
6730         \context {
6731             \StaffContext
6732             \remove "Clef_engraver"
6733             \remove "Key_engraver"
6734             \override StaffSymbol #'transparent = ##t
6735             \remove "Time_signature_engraver"
6736             \remove "Bar_engraver"
6737             minimumVerticalExtent = ##f
6738         }
6739         \context {
6740             \VoiceContext
6741             \remove Ligature_bracket_engraver
6742             \consists Vaticana_ligature_engraver
6743             \override NoteHead #'style = #'vaticana_punctum
6744             \override Stem #'transparent = ##t
6745         }
6746     }
6747 }
6748 @end lilypond
6749 @end quotation
6750 @tab
6751 @quotation
6752 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6753 \include "gregorian-init.ly"
6754 \score {
6755     \notes \transpose c c' {
6756         % Torculus Auctus Descendens Initio Debilis
6757         \[ \deminutum a \pes b \flexa \auctum \descendens g \]
6758         s^\markup {"C"}
6759     }
6760     \paper {
6761         interscoreline = 1
6762         \context {
6763             \ScoreContext
6764             \remove "Bar_number_engraver"
6765         }
6766         \context {
6767             \StaffContext
6768             \remove "Clef_engraver"
6769             \remove "Key_engraver"
6770             \override StaffSymbol #'transparent = ##t
6771             \remove "Time_signature_engraver"
6772             \remove "Bar_engraver"
6773             minimumVerticalExtent = ##f
6774         }
6775         \context {
6776             \VoiceContext
6777             \remove Ligature_bracket_engraver
6778             \consists Vaticana_ligature_engraver
6779             \override NoteHead #'style = #'vaticana_punctum
6780             \override Stem #'transparent = ##t
6781         }
6782     }
6783 }
6784 @end lilypond
6785 @end quotation
6786 @tab
6787 @quotation
6788 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6789 \include "gregorian-init.ly"
6790 \score {
6791     \notes \transpose c c' {
6792         % Torculus Deminutus Initio Debilis
6793         \[ \deminutum a \pes b \flexa \deminutum g \]
6794         s^\markup {"D"}
6795     }
6796     \paper {
6797         interscoreline = 1
6798         \context {
6799             \ScoreContext
6800             \remove "Bar_number_engraver"
6801         }
6802         \context {
6803             \StaffContext
6804             \remove "Clef_engraver"
6805             \remove "Key_engraver"
6806             \override StaffSymbol #'transparent = ##t
6807             \remove "Time_signature_engraver"
6808             \remove "Bar_engraver"
6809             minimumVerticalExtent = ##f
6810         }
6811         \context {
6812             \VoiceContext
6813             \remove Ligature_bracket_engraver
6814             \consists Vaticana_ligature_engraver
6815             \override NoteHead #'style = #'vaticana_punctum
6816             \override Stem #'transparent = ##t
6817         }
6818     }
6819 }
6820 @end lilypond
6821 @end quotation
6822
6823 @item
6824 @code{12. Porrectus}
6825 @tab
6826 @quotation
6827 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6828 \include "gregorian-init.ly"
6829 \score {
6830     \notes \transpose c c' {
6831         % Porrectus
6832         \[ a \flexa g \pes b \]
6833         s^\markup {"E"}
6834     }
6835     \paper {
6836         interscoreline = 1
6837         \context {
6838             \ScoreContext
6839             \remove "Bar_number_engraver"
6840         }
6841         \context {
6842             \StaffContext
6843             \remove "Clef_engraver"
6844             \remove "Key_engraver"
6845             \override StaffSymbol #'transparent = ##t
6846             \remove "Time_signature_engraver"
6847             \remove "Bar_engraver"
6848             minimumVerticalExtent = ##f
6849         }
6850         \context {
6851             \VoiceContext
6852             \remove Ligature_bracket_engraver
6853             \consists Vaticana_ligature_engraver
6854             \override NoteHead #'style = #'vaticana_punctum
6855             \override Stem #'transparent = ##t
6856         }
6857     }
6858 }
6859 @end lilypond
6860 @end quotation
6861 @tab
6862 @quotation
6863 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6864 \include "gregorian-init.ly"
6865 \score {
6866     \notes \transpose c c' {
6867         % Porrectus Auctus Descendens
6868         \[ a \flexa g \pes \auctum \descendens b \]
6869         s^\markup {"F"}
6870     }
6871     \paper {
6872         interscoreline = 1
6873         \context {
6874             \ScoreContext
6875             \remove "Bar_number_engraver"
6876         }
6877         \context {
6878             \StaffContext
6879             \remove "Clef_engraver"
6880             \remove "Key_engraver"
6881             \override StaffSymbol #'transparent = ##t
6882             \remove "Time_signature_engraver"
6883             \remove "Bar_engraver"
6884             minimumVerticalExtent = ##f
6885         }
6886         \context {
6887             \VoiceContext
6888             \remove Ligature_bracket_engraver
6889             \consists Vaticana_ligature_engraver
6890             \override NoteHead #'style = #'vaticana_punctum
6891             \override Stem #'transparent = ##t
6892         }
6893     }
6894 }
6895 @end lilypond
6896 @end quotation
6897 @tab
6898 @quotation
6899 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6900 \include "gregorian-init.ly"
6901 \score {
6902     \notes \transpose c c' {
6903         % Porrectus Deminutus
6904         \[ a \flexa g \pes \deminutum b \]
6905         s^\markup {"G"}
6906     }
6907     \paper {
6908         interscoreline = 1
6909         \context {
6910             \ScoreContext
6911             \remove "Bar_number_engraver"
6912         }
6913         \context {
6914             \StaffContext
6915             \remove "Clef_engraver"
6916             \remove "Key_engraver"
6917             \override StaffSymbol #'transparent = ##t
6918             \remove "Time_signature_engraver"
6919             \remove "Bar_engraver"
6920             minimumVerticalExtent = ##f
6921         }
6922         \context {
6923             \VoiceContext
6924             \remove Ligature_bracket_engraver
6925             \consists Vaticana_ligature_engraver
6926             \override NoteHead #'style = #'vaticana_punctum
6927             \override Stem #'transparent = ##t
6928         }
6929     }
6930 }
6931 @end lilypond
6932 @end quotation
6933
6934 @item
6935 @code{13. Climacus}
6936 @tab
6937 @quotation
6938 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6939 \include "gregorian-init.ly"
6940 \score {
6941     \notes \transpose c c' {
6942         % Climacus
6943         \[ \virga b \inclinatum a \inclinatum g \]
6944         s^\markup {"H"}
6945     }
6946     \paper {
6947         interscoreline = 1
6948         \context {
6949             \ScoreContext
6950             \remove "Bar_number_engraver"
6951         }
6952         \context {
6953             \StaffContext
6954             \remove "Clef_engraver"
6955             \remove "Key_engraver"
6956             \override StaffSymbol #'transparent = ##t
6957             \remove "Time_signature_engraver"
6958             \remove "Bar_engraver"
6959             minimumVerticalExtent = ##f
6960         }
6961         \context {
6962             \VoiceContext
6963             \remove Ligature_bracket_engraver
6964             \consists Vaticana_ligature_engraver
6965             \override NoteHead #'style = #'vaticana_punctum
6966             \override Stem #'transparent = ##t
6967         }
6968     }
6969 }
6970 @end lilypond
6971 @end quotation
6972 @tab
6973 @quotation
6974 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6975 \include "gregorian-init.ly"
6976 \score {
6977     \notes \transpose c c' {
6978         % Climacus Auctus
6979         \[ \virga b \inclinatum a \inclinatum \auctum g \]
6980         s^\markup {"I"}
6981     }
6982     \paper {
6983         interscoreline = 1
6984         \context {
6985             \ScoreContext
6986             \remove "Bar_number_engraver"
6987         }
6988         \context {
6989             \StaffContext
6990             \remove "Clef_engraver"
6991             \remove "Key_engraver"
6992             \override StaffSymbol #'transparent = ##t
6993             \remove "Time_signature_engraver"
6994             \remove "Bar_engraver"
6995             minimumVerticalExtent = ##f
6996         }
6997         \context {
6998             \VoiceContext
6999             \remove Ligature_bracket_engraver
7000             \consists Vaticana_ligature_engraver
7001             \override NoteHead #'style = #'vaticana_punctum
7002             \override Stem #'transparent = ##t
7003         }
7004     }
7005 }
7006 @end lilypond
7007 @end quotation
7008 @tab
7009 @quotation
7010 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
7011 \include "gregorian-init.ly"
7012 \score {
7013     \notes \transpose c c' {
7014         % Climacus Deminutus
7015         \[ \virga b \inclinatum a \inclinatum \deminutum g \]
7016         s^\markup {"J"}
7017     }
7018     \paper {
7019         interscoreline = 1
7020         \context {
7021             \ScoreContext
7022             \remove "Bar_number_engraver"
7023         }
7024         \context {
7025             \StaffContext
7026             \remove "Clef_engraver"
7027             \remove "Key_engraver"
7028             \override StaffSymbol #'transparent = ##t
7029             \remove "Time_signature_engraver"
7030             \remove "Bar_engraver"
7031             minimumVerticalExtent = ##f
7032         }
7033         \context {
7034             \VoiceContext
7035             \remove Ligature_bracket_engraver
7036             \consists Vaticana_ligature_engraver
7037             \override NoteHead #'style = #'vaticana_punctum
7038             \override Stem #'transparent = ##t
7039         }
7040     }
7041 }
7042 @end lilypond
7043 @end quotation
7044
7045 @item
7046 @code{14. Scandicus}
7047 @tab
7048 @quotation
7049 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
7050 \include "gregorian-init.ly"
7051 \score {
7052     \notes \transpose c c' {
7053         % Scandicus
7054         \[ g \pes a \virga b \]
7055         s^\markup {"K"}
7056     }
7057     \paper {
7058         interscoreline = 1
7059         \context {
7060             \ScoreContext
7061             \remove "Bar_number_engraver"
7062         }
7063         \context {
7064             \StaffContext
7065             \remove "Clef_engraver"
7066             \remove "Key_engraver"
7067             \override StaffSymbol #'transparent = ##t
7068             \remove "Time_signature_engraver"
7069             \remove "Bar_engraver"
7070             minimumVerticalExtent = ##f
7071         }
7072         \context {
7073             \VoiceContext
7074             \remove Ligature_bracket_engraver
7075             \consists Vaticana_ligature_engraver
7076             \override NoteHead #'style = #'vaticana_punctum
7077             \override Stem #'transparent = ##t
7078         }
7079     }
7080 }
7081 @end lilypond
7082 @end quotation
7083 @tab
7084 @quotation
7085 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
7086 \include "gregorian-init.ly"
7087 \score {
7088     \notes \transpose c c' {
7089         % Scandicus Auctus Descendens
7090         \[ g \pes a \pes \auctum \descendens b \]
7091         s^\markup {"L"}
7092     }
7093     \paper {
7094         interscoreline = 1
7095         \context {
7096             \ScoreContext
7097             \remove "Bar_number_engraver"
7098         }
7099         \context {
7100             \StaffContext
7101             \remove "Clef_engraver"
7102             \remove "Key_engraver"
7103             \override StaffSymbol #'transparent = ##t
7104             \remove "Time_signature_engraver"
7105             \remove "Bar_engraver"
7106             minimumVerticalExtent = ##f
7107         }
7108         \context {
7109             \VoiceContext
7110             \remove Ligature_bracket_engraver
7111             \consists Vaticana_ligature_engraver
7112             \override NoteHead #'style = #'vaticana_punctum
7113             \override Stem #'transparent = ##t
7114         }
7115     }
7116 }
7117 @end lilypond
7118 @end quotation
7119 @tab
7120 @quotation
7121 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
7122 \include "gregorian-init.ly"
7123 \score {
7124     \notes \transpose c c' {
7125         % Scandicus Deminutus
7126         \[ g \pes a \pes \deminutum b \]
7127         s^\markup {"M"}
7128     }
7129     \paper {
7130         interscoreline = 1
7131         \context {
7132             \ScoreContext
7133             \remove "Bar_number_engraver"
7134         }
7135         \context {
7136             \StaffContext
7137             \remove "Clef_engraver"
7138             \remove "Key_engraver"
7139             \override StaffSymbol #'transparent = ##t
7140             \remove "Time_signature_engraver"
7141             \remove "Bar_engraver"
7142             minimumVerticalExtent = ##f
7143         }
7144         \context {
7145             \VoiceContext
7146             \remove Ligature_bracket_engraver
7147             \consists Vaticana_ligature_engraver
7148             \override NoteHead #'style = #'vaticana_punctum
7149             \override Stem #'transparent = ##t
7150         }
7151     }
7152 }
7153 @end lilypond
7154 @end quotation
7155
7156 @item
7157 @code{15. Salicus}
7158 @tab
7159 @quotation
7160 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
7161 \include "gregorian-init.ly"
7162 \score {
7163     \notes \transpose c c' {
7164         % Salicus
7165         \[ g \oriscus a \pes \virga b \]
7166         s^\markup {"N"}
7167     }
7168     \paper {
7169         interscoreline = 1
7170         \context {
7171             \ScoreContext
7172             \remove "Bar_number_engraver"
7173         }
7174         \context {
7175             \StaffContext
7176             \remove "Clef_engraver"
7177             \remove "Key_engraver"
7178             \override StaffSymbol #'transparent = ##t
7179             \remove "Time_signature_engraver"
7180             \remove "Bar_engraver"
7181             minimumVerticalExtent = ##f
7182         }
7183         \context {
7184             \VoiceContext
7185             \remove Ligature_bracket_engraver
7186             \consists Vaticana_ligature_engraver
7187             \override NoteHead #'style = #'vaticana_punctum
7188             \override Stem #'transparent = ##t
7189         }
7190     }
7191 }
7192 @end lilypond
7193 @end quotation
7194 @tab
7195 @quotation
7196 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
7197 \include "gregorian-init.ly"
7198 \score {
7199     \notes \transpose c c' {
7200         % Salicus Auctus Descendens
7201         \[ g \oriscus a \pes \auctum \descendens b \]
7202         s^\markup {"O"}
7203     }
7204     \paper {
7205         interscoreline = 1
7206         \context {
7207             \ScoreContext
7208             \remove "Bar_number_engraver"
7209         }
7210         \context {
7211             \StaffContext
7212             \remove "Clef_engraver"
7213             \remove "Key_engraver"
7214             \override StaffSymbol #'transparent = ##t
7215             \remove "Time_signature_engraver"
7216             \remove "Bar_engraver"
7217             minimumVerticalExtent = ##f
7218         }
7219         \context {
7220             \VoiceContext
7221             \remove Ligature_bracket_engraver
7222             \consists Vaticana_ligature_engraver
7223             \override NoteHead #'style = #'vaticana_punctum
7224             \override Stem #'transparent = ##t
7225         }
7226     }
7227 }
7228 @end lilypond
7229 @end quotation
7230 @tab
7231
7232 @item
7233 @code{16. Trigonus}
7234 @tab
7235 @quotation
7236 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
7237 \include "gregorian-init.ly"
7238 \score {
7239   \notes \transpose c c' {
7240     % Trigonus
7241     \[ \stropha b \stropha b \stropha a \]
7242     s^\markup {"P"}
7243   }
7244   \paper {
7245     interscoreline = 1
7246     \context {
7247       \ScoreContext
7248       \remove "Bar_number_engraver"
7249     }
7250     \context {
7251       \StaffContext
7252       \remove "Clef_engraver"
7253       \remove "Key_engraver"
7254       \override StaffSymbol #'transparent = ##t
7255       \remove "Time_signature_engraver"
7256       \remove "Bar_engraver"
7257       minimumVerticalExtent = ##f
7258     }
7259     \context {
7260       \VoiceContext
7261       \remove Ligature_bracket_engraver
7262       \consists Vaticana_ligature_engraver
7263       \override NoteHead #'style = #'vaticana_punctum
7264       \override Stem #'transparent = ##t
7265     }
7266   }
7267 }
7268 @end lilypond
7269 @end quotation
7270 @tab
7271 @tab
7272
7273 @end multitable
7274
7275
7276 Unlike most other neumes notation systems, the input language for
7277 neumes does not necessarily reflect directly the typographical
7278 appearance, but is designed to solely focuse on musical meaning.  For
7279 example, @code{\[ a \pes b \flexa g \]} produces a Torculus consisting
7280 of three Punctum heads, while @code{\[ a \flexa g \pes b \]} produces
7281 a Porrectus with a curved flexa shape and only a single Punctum head.
7282 There is no command to explicitly typeset the curved flexa shape; the
7283 decision of when to typeset a curved flexa shape is purely taken from
7284 the musical input.  The idea of this approach is to separate the
7285 musical aspects of the input from the notation style of the output.
7286 This way, the same input can be reused to typeset the same music in a
7287 different style of Gregorian chant notation.
7288
7289 The following table shows the code fragments that produce the
7290 ligatures in the above neumes table.  The letter in the first column
7291 in each line of the below table indicates to which ligature in the
7292 above table it refers.  The second column gives the name of the
7293 ligature.  The third column shows the code fragment that produces this
7294 ligature, using @code{g}, @code{a} and @code{b} as example pitches.
7295
7296 @multitable @columnfractions .1 .4 .5
7297
7298 @item
7299 @b{#} @tab
7300 @b{Name} @tab
7301 @b{Input Language}
7302
7303 @item
7304 a @tab
7305 Punctum @tab
7306 @code{\[ b \]}
7307
7308 @item
7309 b @tab
7310 Punctum Inclinatum @tab
7311 @code{\[ \inclinatum b \]}
7312
7313 @item
7314 c @tab
7315 Punctum Auctum Ascendens @tab
7316 @code{\[ \auctum \ascendens b \]}
7317
7318 @item
7319 d @tab
7320 Punctum Auctum Descendens @tab
7321 @code{\[ \auctum \descendens b \]}
7322
7323 @item
7324 e @tab
7325 Punctum Inclinatum Auctum @tab
7326 @code{\[ \inclinatum \auctum b \]}
7327
7328 @item
7329 f @tab
7330 Punctum Inclinatum Parvum @tab
7331 @code{\[ \inclinatum \deminutum b \]}
7332
7333 @item
7334 g @tab
7335 Virga @tab
7336 @code{\[ \virga b \]}
7337
7338 @item
7339 h @tab
7340 Stropha @tab
7341 @code{\[ \stropha b \]}
7342
7343 @item
7344 i @tab
7345 Stropha Aucta @tab
7346 @code{\[ \stropha \auctum b \]}
7347
7348 @item
7349 j @tab
7350 Oriscus @tab
7351 @code{\[ \oriscus b \]}
7352
7353 @item
7354 k @tab
7355 Clivis vel Flexa @tab
7356 @code{\[ b \flexa g \]}
7357
7358 @item
7359 l @tab
7360 Clivis Aucta Descendens @tab
7361 @code{\[ b \flexa \auctum \descendens g \]}
7362
7363 @item
7364 m @tab
7365 Clivis Aucta Ascendens @tab
7366 @code{\[ b \flexa \auctum \ascendens g \]}
7367
7368 @item
7369 n @tab
7370 Cephalicus @tab
7371 @code{\[ b \flexa \deminutum g \]}
7372
7373 @item
7374 o @tab
7375 Podatus vel Pes @tab
7376 @code{\[ g \pes b \]}
7377
7378 @item
7379 p @tab
7380 Pes Auctus Descendens @tab
7381 @code{\[ g \pes \auctum \descendens b \]}
7382
7383 @item
7384 q @tab
7385 Pes Auctus Ascendens @tab
7386 @code{\[ g \pes \auctum \ascendens b \]}
7387
7388 @item
7389 r @tab
7390 Epiphonus @tab
7391 @code{\[ g \pes \deminutum b \]}
7392
7393 @item
7394 s @tab
7395 Pes Quassus @tab
7396 @code{\[ \oriscus g \pes \virga b \]}
7397
7398 @item
7399 t @tab
7400 Pes Quassus Auctus Descendens @tab
7401 @code{\[ \oriscus g \pes \auctum \descendens b \]}
7402
7403 @item
7404 u @tab
7405 Quilisma Pes @tab
7406 @code{\[ \quilisma g \pes b \]}
7407
7408 @item
7409 v @tab
7410 Quilisma Pes Auctus Descendens @tab
7411 @code{\[ \quilisma g \pes \auctum \descendens b \]}
7412
7413 @item
7414 w @tab
7415 Pes Initio Debilis @tab
7416 @code{\[ \deminutum g \pes b \]}
7417
7418 @item
7419 x @tab
7420 Pes Auctus Descendens Initio Debilis @tab
7421 @code{\[ \deminutum g \pes \auctum \descendens b \]}
7422
7423 @item
7424 y @tab
7425 Torculus @tab
7426 @code{\[ a \pes b \flexa g \]}
7427
7428 @item
7429 z @tab
7430 Torculus Auctus Descendens @tab
7431 @code{\[ a \pes b \flexa \auctum \descendens g \]}
7432
7433 @item
7434 A @tab
7435 Torculus Deminutus @tab
7436 @code{\[ a \pes b \flexa \deminutum g \]}
7437
7438 @item
7439 B @tab
7440 Torculus Initio Debilis @tab
7441 @code{\[ \deminutum a \pes b \flexa g \]}
7442
7443 @item
7444 C @tab
7445 Torculus Auctus Descendens Initio Debilis @tab
7446 @code{\[ \deminutum a \pes b \flexa \auctum \descendens g \]}
7447
7448 @item
7449 D @tab
7450 Torculus Deminutus Initio Debilis @tab
7451 @code{\[ \deminutum a \pes b \flexa \deminutum g \]}
7452
7453 @item
7454 E @tab
7455 Porrectus @tab
7456 @code{\[ a \flexa g \pes b \]}
7457
7458 @item
7459 F @tab
7460 Porrectus Auctus Descendens @tab
7461 @code{\[ a \flexa g \pes \auctum \descendens b \]}
7462
7463 @item
7464 G @tab
7465 Porrectus Deminutus @tab
7466 @code{\[ a \flexa g \pes \deminutum b \]}
7467
7468 @item
7469 H @tab
7470 Climacus @tab
7471 @code{\[ \virga b \inclinatum a \inclinatum g \]}
7472
7473 @item
7474 I @tab
7475 Climacus Auctus @tab
7476 @code{\[ \virga b \inclinatum a \inclinatum \auctum g \]}
7477
7478 @item
7479 J @tab
7480 Climacus Deminutus @tab
7481 @code{\[ \virga b \inclinatum a \inclinatum \deminutum g \]}
7482
7483 @item
7484 K @tab
7485 Scandicus @tab
7486 @code{\[ g \pes a \virga b \]}
7487
7488 @item
7489 L @tab
7490 Scandicus Auctus Descendens @tab
7491 @code{\[ g \pes a \pes \auctum \descendens b \]}
7492
7493 @item
7494 M @tab
7495 Scandicus Deminutus @tab
7496 @code{\[ g \pes a \pes \deminutum b \]}
7497
7498 @item
7499 N @tab
7500 Salicus @tab
7501 @code{\[ g \oriscus a \pes \virga b \]}
7502
7503 @item
7504 O @tab
7505 Salicus Auctus Descendens @tab
7506 @code{\[ g \oriscus a \pes \auctum \descendens b \]}
7507
7508 @item
7509 P @tab
7510 Trigonus @tab
7511 @code{\[ \stropha b \stropha b \stropha a \]}
7512
7513 @end multitable
7514
7515 @refcommands
7516
7517 The following head prefixes are supported
7518
7519 @cindex @code{\virga}
7520 @code{\virga},
7521 @cindex @code{\stropha}
7522 @code{\stropha},
7523 @cindex @code{\inclinatum}
7524 @code{\inclinatum},
7525 @cindex @code{\auctum}
7526 @code{\auctum},
7527 @cindex @code{\descendens}
7528 @code{\descendens},
7529 @cindex @code{\ascendens}
7530 @code{\ascendens},
7531 @cindex @code{\oriscus}
7532 @code{\oriscus},
7533 @cindex @code{\quilisma}
7534 @code{\quilisma},
7535 @cindex @code{\deminutum}
7536 @code{\deminutum}.
7537
7538 Head prefixes can be accumulated, though restrictions apply.  For
7539 example, either @code{\descendens} or @code{\ascendens} can be applied
7540 to a head, but not both to the same head.
7541
7542 @cindex @code{\pes}
7543 @cindex @code{\flexa}
7544 Two adjacent heads can be tied together with the @code{\pes} and
7545 @code{\flexa} infix commands for a rising and falling line of melody,
7546 respectively.
7547
7548
7549
7550 @node Vaticana style contexts
7551 @subsection Vaticana style contexts
7552
7553 @cindex VaticanaVoiceContext
7554 @cindex VaticanaStaffContext
7555
7556 The predefined @code{VaticanaVoiceContext} and
7557 @code{VaticanaStaffContext} can be used to easily engrave a piece of
7558 Gregorian Chant in the style of the Editio Vaticana.  These contexts
7559 initialize all relevant context properties and grob properties to
7560 proper values.  With these contexts, you can immediately go ahead
7561 entering the chant, as the following short excerpt demonstrates
7562
7563 @quotation
7564 @lilypond[raggedright,verbatim,noindent]
7565 \include "gregorian-init.ly"
7566 \score {
7567   <<
7568     \context VaticanaVoice = "cantus" {
7569       \override Score.BarNumber #'transparent = ##t
7570       \notes {
7571         \[ c'\melisma c' \flexa a \]
7572         \[ a \flexa \deminutum g\melismaEnd \]
7573         f \divisioMinima
7574         \[ f\melisma \pes a c' c' \pes d'\melismaEnd \]
7575         c' \divisioMinima \break
7576         \[ c'\melisma c' \flexa a \]
7577         \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
7578       }
7579     }
7580     \lyricsto "cantus" \new Lyrics \lyrics {
7581       San- ctus, San- ctus, San- ctus
7582     }
7583   >>
7584 }
7585 @end lilypond
7586 @end quotation
7587
7588 @node Figured bass
7589 @subsection Figured bass
7590
7591 @cindex Basso continuo
7592
7593 @c TODO: musicological blurb about FB
7594
7595
7596 LilyPond has limited support for figured bass
7597
7598 @quotation
7599 @lilypond[verbatim,fragment]
7600 <<
7601   \context Voice \notes { \clef bass dis4  c d ais }
7602   \context FiguredBass \figures {
7603     < 6 >4 < 7 >8 < 6+ [_!] >
7604     < 6 >4 <6 5 [3+] >
7605   }
7606 >>
7607 @end lilypond
7608 @end quotation
7609
7610 The support for figured bass consists of two parts: there is an input
7611 mode, introduced by @code{\figures}, where you can enter bass figures
7612 as numbers, and there is a context called @internalsref{FiguredBass} that
7613 takes care of making @internalsref{BassFigure} objects.
7614
7615 In figures input mode, a group of bass figures is delimited by
7616 @code{<} and @code{>}. The duration is entered after the @code{>>}
7617 @example
7618 <4 6>
7619 @end example
7620 @quotation
7621 @lilypond[fragment]
7622 \context FiguredBass
7623 \figures { <4 6> }
7624 @end lilypond
7625 @end quotation
7626
7627 Accidentals are added when you append @code{-}, @code{!}  and @code{+}
7628 to the numbers
7629
7630 @example
7631 <4- 6+ 7!>
7632 @end example
7633 @quotation
7634 @lilypond[fragment]
7635 \context FiguredBass
7636 \figures { <4- 6+ 7!> }
7637 @end lilypond
7638 @end quotation
7639
7640 Spaces or dashes may be inserted by using @code{_}. Brackets are
7641 introduced with @code{[} and @code{]}
7642
7643 @example
7644 < [4 6] 8 [_! 12]>
7645 @end example
7646 @quotation
7647 @lilypond[fragment]
7648 \context FiguredBass
7649 \figures { < [4 6] 8 [_! 12]> }
7650 @end lilypond
7651 @end quotation
7652
7653 Although the support for figured bass may superficially resemble chord
7654 support, it works much simpler.  The @code{\figures} mode simply
7655 stores the numbers , and @internalsref{FiguredBass} context prints
7656 them as entered. There is no conversion to pitches, and no
7657 realizations of the bass are played in the MIDI file.
7658
7659 Internally, the code produces markup texts. You can use any of the
7660 markup text properties to override formatting. For example, the
7661 vertical spacing of the figures may be set with @code{baseline-skip}.
7662
7663 @seealso
7664
7665 Program reference: @internalsref{BassFigureEvent} music, @internalsref{BassFigure} object, 
7666 and @internalsref{FiguredBass} context.
7667
7668 @refbugs
7669
7670 Slash notation for alterations is not supported.
7671
7672 @node Contemporary notation
7673 @section Contemporary notation
7674
7675 In the 20th century, composers have greatly expanded the musical
7676 vocabulary. With this expansion, many innovations in musical notation
7677 have been tried. The book by Stone (1980) gives a comprehensive
7678 overview (see @ref{Literature list}). In general, the use of new,
7679 innovative notation makes a piece harder to understand and perform and
7680 its use should therefore be avoided if possible.  For this reason,
7681 support for contemporary notation in LilyPond is limited.
7682
7683
7684 @menu
7685 * Clusters::                    
7686 * Fermatas::                    
7687 @end menu
7688
7689 @node Clusters
7690 @subsection Clusters
7691
7692 @cindex cluster
7693
7694 A cluster indicates a continuous range of pitches to be played.  They
7695 can be denoted as the envelope of a set of notes.  They are entered by
7696 applying the function @code{notes-to-clusters} to a sequence of
7697 chords, e.g.
7698 @c
7699 @quotation
7700 @lilypond[relative=2,verbatim]
7701 \apply #notes-to-clusters {  <c e > <b f'>  }
7702 @end lilypond
7703 @end quotation
7704
7705 The following example (from
7706 @inputfileref{input/regression,cluster.ly}) shows what the result
7707 looks like
7708
7709 @quotation
7710 @lilypondfile[]{cluster.ly}
7711 @end quotation
7712
7713 Ordinary notes and clusters can be put together in the same staff,
7714 even simultaneously.  In such a case no attempt is made to
7715 automatically avoid collisions between ordinary notes and clusters.
7716
7717 @seealso
7718
7719 Program reference: @internalsref{ClusterSpanner},
7720 @internalsref{ClusterSpannerBeacon},
7721 @internalsref{Cluster_spanner_engraver}, and
7722 @internalsref{ClusterNoteEvent}.
7723
7724 Examples: @inputfileref{input/regression,cluster.ly}.
7725
7726 @refbugs
7727
7728 Music expressions like @code{<< @{ g8 e8 @} a4 >>} are not printed
7729 accurately.  Use @code{<g a>8 <e a>8} instead.
7730
7731
7732
7733 @node Fermatas
7734 @subsection Fermatas
7735
7736 @cindex fermatas
7737
7738
7739
7740 Contemporary music notation frequently uses special fermata symbols to
7741 indicate fermatas of differing lengths.  The following fermatas are
7742 supported
7743
7744 @quotation
7745 @lilypond[raggedright]
7746 \score {
7747   <<
7748     \addlyrics \notes {
7749       b'
7750       ^\shortfermata
7751       _\shortfermata
7752       r
7753       b'
7754       ^\fermata
7755       _\fermata
7756
7757       r
7758       b'
7759       ^\longfermata
7760       _\longfermata
7761
7762       r
7763       b'
7764       ^\verylongfermata
7765       _\verylongfermata
7766     r
7767     }
7768     \context Lyrics \lyrics {
7769       \override LyricText #'font-family = #'typewriter
7770       "shortfermata" "fermata"  "longfermata" "verylongfermata"
7771     }
7772   >>
7773 }
7774 @end lilypond
7775 @end quotation
7776
7777 See @ref{Articulations} for general instructions how to apply scripts
7778 such as fermatas to a @code{\notes@{@}} block.
7779
7780
7781 @node Special notation
7782 @section Special notation
7783
7784 @menu
7785 * Balloon help::                
7786 * Easy Notation note heads::    
7787 @end menu
7788
7789 @node Balloon help
7790 @subsection Balloon help
7791
7792 Elements of notation can be marked and named with the help of a square
7793 balloon.  The primary purpose of this feature is to explain notation.
7794
7795 The following example demonstrates its use.
7796
7797 @quotation
7798 @lilypond[verbatim,fragment,raggedright,relative=2]
7799 \context Voice
7800 \applyoutput
7801    #(add-balloon-text 'NoteHead "heads, or tails?"
7802     '(1 . -3))
7803 c8
7804 @end lilypond
7805 @end quotation
7806
7807 @noindent
7808 The function @code{add-balloon-text} takes the name of a grob, the
7809 label to print and where to put the label relative to the object. In
7810 the above example, the text ``heads or tails?'' ends 3 spaces below
7811 the `balloon.' 
7812
7813 @cindex balloon
7814 @cindex notation, explaining
7815
7816 @seealso
7817
7818 Program reference: @internalsref{text-balloon-interface}.
7819
7820 Examples: @inputfileref{input/regression,balloon.ly}.
7821
7822 @node Easy Notation note heads
7823 @subsection Easy Notation note heads
7824
7825 @cindex easy notation
7826 @cindex Hal Leonard
7827
7828 The `easy play' note head includes a  name inside the head.  It is
7829 used in music for beginners
7830
7831 @quotation
7832 @lilypond[raggedright,verbatim,staffsize=26]
7833 \setEasyHeads
7834 c'2 e'4 f' | g'1
7835 @end lilypond
7836 @end quotation
7837
7838 The command @code{\setEasyHeads} overrides settings for the
7839 @internalsref{NoteHead} object.  To make the letters readable, it has
7840 to be printed in a large font size.  To print with a larger font, see
7841 @ref{Setting global staff size}.
7842
7843 @cindex Xdvi
7844 @cindex ghostscript
7845
7846 If you view the result with Xdvi, staff lines may show through the
7847 letters.  Printing the PostScript file obtained does produce the
7848 correct result.
7849
7850 @refcommands
7851
7852 @cindex \setEasyHeads
7853 @code{\setEasyHeads}
7854
7855 @node Sound
7856 @section Sound
7857 @cindex Sound
7858
7859 Entered music can also be converted to MIDI output.  The performance
7860 is intended for proof-hearing the music for errors.
7861
7862 Ties, dynamics and tempo changes are interpreted.  Dynamic marks,
7863 crescendi and decrescendi translate into MIDI volume levels.  Dynamic
7864 marks translate to a fixed fraction of the available MIDI volume
7865 range, crescendi and decrescendi make the volume vary linearly between
7866 their two extremities.  The fractions can be adjusted by
7867 @code{dynamicAbsoluteVolumeFunction} in @internalsref{Voice} context.
7868 For each type of MIDI instrument, a volume range can be defined.  This
7869 gives a basic equalizer control, which can enhance the quality of
7870 the MIDI output remarkably.  The equalizer can be controlled by
7871 setting @code{instrumentEqualizer}.
7872
7873 @refbugs
7874
7875 Many musically interesting effects, such as swing, articulation,
7876 slurring, etc., are not translated to MIDI.
7877
7878 The MIDI output allocates a channel for each Staff, and one for global
7879 settings.  Hence, the MIDI file should not have more than 15 staves
7880 (or 14 if you do not use drums). Other staves will remain silent.
7881
7882
7883 @menu
7884 * MIDI block::                  
7885 * MIDI instrument names::       
7886 @end menu
7887
7888
7889 @node MIDI block
7890 @subsection MIDI block
7891 @cindex MIDI block
7892
7893
7894 The MIDI block is analogous to the paper block, but it is somewhat
7895 simpler.  The @code{\midi} block can contain
7896 @cindex MIDI block
7897
7898 @itemize @bullet
7899   @item a @code{\tempo} definition, and
7900   @item context definitions.
7901 @end itemize
7902
7903 A number followed by a period is interpreted as a real number, so
7904 for setting the tempo for dotted notes, an extra space should be
7905 inserted, for example
7906
7907 @example
7908   \midi @{ \tempo 4 . = 120 @} 
7909 @end example
7910
7911
7912 @cindex context definition
7913
7914 Context definitions follow precisely the same syntax as within the
7915 \paper block.  Translation modules for sound are called performers.
7916 The contexts for MIDI output are defined in @file{ly/performer-init.ly}.
7917
7918
7919 @node MIDI instrument names
7920 @subsection MIDI instrument names
7921
7922 @cindex instrument names
7923 @cindex @code{Staff.midiInstrument}
7924
7925 The MIDI instrument name is set by the @code{Staff.midiInstrument}
7926 property.  The instrument name should be chosen from the list in
7927 @ref{MIDI instruments}.
7928
7929 @refbugs
7930
7931 If the selected string does not exactly match, the default is used,
7932 which is the Grand Piano.