]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/notation.itely
* Documentation/user/introduction.itely:
[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
3180 The distance between the two staves is normally fixed across the
3181 entire score. It is possible to tune this per system, but it does
3182 require arcane command incantations. See
3183 @inputfileref{input/test,piano-staff-distance.ly}.
3184  
3185
3186
3187
3188
3189
3190 @node Automatic staff changes
3191 @subsection Automatic staff changes
3192 @cindex Automatic staff changes
3193
3194 Voices can switch automatically between the top and the bottom
3195 staff. The syntax for this is
3196 @example
3197   \autochange \context Voice @{ @dots{}@var{music}@dots{} @}
3198 @end example
3199 The two staves of the piano staff must be named @code{up} and
3200 @code{down}.
3201
3202 The autochanger switches on basis of pitch (middle C is the turning
3203 point), and it looks ahead skipping over rests to switch in
3204 advance. Here is a practical example
3205         
3206 @quotation
3207 @lilypond[verbatim,raggedright]
3208 \score { \notes \context PianoStaff <<
3209   \context Staff = "up" {
3210     \autochange \new Voice \relative c' {
3211        g4 a  b c d r4 a g } }
3212   \context Staff = "down" {
3213        \clef bass
3214        s1*2
3215 } >> }
3216 @end lilypond
3217 @end quotation
3218
3219 @noindent
3220 In this example, spacer rests are used to prevent the bottom staff from
3221 terminating too soon.
3222
3223
3224 @seealso
3225
3226 In this manual: @ref{Manual staff switches}.
3227
3228 Program reference: @internalsref{AutoChangeMusic}.
3229
3230
3231
3232 @refbugs
3233
3234 The staff switches often do not end up in optimal places. For high
3235 quality output, staff switches should be specified manually.
3236
3237
3238
3239 @node Manual staff switches
3240 @subsection Manual staff switches
3241
3242 @cindex manual staff switches
3243 @cindex staff switch, manual
3244
3245 Voices can be switched between staves manually, using the following command
3246 @example
3247   \change Staff = @var{staffname} @var{music}
3248 @end example
3249
3250 @noindent
3251 The string @var{staffname} is the name of the staff. It switches the
3252 current voice from its current staff to the Staff called
3253 @var{staffname}. Typically @var{staffname} is @code{"up"} or
3254 @code{"down"}.
3255
3256
3257
3258 @node Pedals
3259 @subsection Pedals
3260 @cindex Pedals
3261
3262 Pianos have pedals that alter the way sound are produced. Generally, a
3263 piano has three pedals, sustain, una corda, and sostenuto.
3264
3265
3266 Piano pedal instruction can be expressed by attaching
3267 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
3268 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
3269 note or chord
3270
3271 @quotation
3272 @lilypond[fragment,verbatim]
3273   c'4\sustainDown c'4\sustainUp
3274 @end lilypond
3275 @end quotation
3276
3277 What is printed can be modified by setting @code{pedal@var{X}Strings},
3278 where @var{X} is one of the pedal types: @code{Sustain},
3279 @code{Sostenuto} or @code{UnaCorda}.  Refer to
3280 @internalsref{SustainPedal} in the program reference for more
3281 information.
3282
3283 Pedals can also be indicated by a sequence of brackets, by setting the 
3284 @code{pedalSustainStyle} property to @code{bracket} objects
3285
3286 @quotation
3287 @lilypond[fragment,verbatim,relative=3]
3288  \set Staff.pedalSustainStyle = #'bracket
3289  c\sustainDown d e
3290  b\sustainUp\sustainDown
3291  b g \sustainUp a \sustainDown \bar "|."
3292 @end lilypond
3293 @end quotation
3294
3295 A third style of pedal notation is a mixture of text and brackets,
3296 obtained by setting the @code{pedalSustainStyle} style property to
3297 @code{mixed}
3298
3299 @quotation
3300 @lilypond[fragment,verbatim,relative=3]
3301  \set Staff.pedalSustainStyle = #'mixed
3302  c\sustainDown d e
3303  b\sustainUp\sustainDown
3304  b g \sustainUp a \sustainDown \bar "|."
3305 @end lilypond
3306 @end quotation
3307
3308 The default `*Ped.' style for sustain and damper pedals corresponds to
3309 style @code{#'text}. The sostenuto pedal uses @code{mixed} style by
3310 default.
3311
3312 @quotation
3313 @lilypond[fragment,verbatim,relative=3]
3314   c\sostenutoDown d e c, f g a\sostenutoUp
3315 @end lilypond
3316 @end quotation
3317
3318 For fine-tuning of the appearance of a pedal bracket, the properties
3319 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
3320 @code{PianoPedalBracket} objects (see
3321 @internalsref{PianoPedalBracket} in the Program reference)  can be modified.  For example, the
3322 bracket may be extended to the end of the note head
3323
3324 @quotation
3325 @lilypond[fragment,verbatim]
3326 \override Staff.PianoPedalBracket  
3327    #'shorten-pair = #'(0 . -1.0)
3328   c\sostenutoDown d e c, f g a\sostenutoUp
3329 @end lilypond
3330 @end quotation
3331
3332 @node Arpeggio
3333 @subsection Arpeggio
3334 @cindex Arpeggio
3335
3336 @cindex broken arpeggio
3337 @cindex @code{\arpeggio}
3338
3339 You can specify an arpeggio sign on a chord by attaching an
3340 @code{\arpeggio} to a chord
3341
3342
3343 @quotation
3344 @lilypond[fragment,relative=1,verbatim]
3345   <c e g c>\arpeggio
3346 @end lilypond
3347 @end quotation
3348
3349 When an arpeggio crosses staves, you attach an arpeggio to the chords
3350 in both staves, and set
3351 @internalsref{PianoStaff}.@code{connectArpeggios}
3352
3353 @quotation
3354 @lilypond[fragment,relative=1,verbatim]
3355   \context PianoStaff <<
3356     \set PianoStaff.connectArpeggios = ##t
3357     \new Staff  { <c' e g c>\arpeggio }
3358     \new Staff { \clef bass  <c,, e g>\arpeggio }
3359   >>
3360 @end lilypond
3361 @end quotation
3362
3363 The direction of the arpeggio is sometimes denoted by adding an
3364 arrowhead to the wiggly line
3365
3366 @quotation
3367 @lilypond[fragment,relative=1,verbatim]
3368   \context Voice {
3369      \arpeggioUp
3370      <c e g c>\arpeggio
3371      \arpeggioDown
3372      <c e g c>\arpeggio
3373   }
3374 @end lilypond
3375 @end quotation
3376
3377 A square bracket on the left indicates that the player should not
3378 arpeggiate the chord
3379
3380 @quotation
3381 @lilypond[fragment,relative=1,verbatim]
3382      \arpeggioBracket
3383     <c' e g c>\arpeggio
3384 @end lilypond
3385 @end quotation
3386
3387 @refcommands
3388
3389 @cindex @code{\arpeggio}
3390 @code{\arpeggio},
3391 @cindex @code{\arpeggioUp}
3392 @code{\arpeggioUp},
3393 @cindex @code{\arpeggioDown}
3394 @code{\arpeggioUp},
3395 @cindex @code{\arpeggioBoth}
3396 @code{\arpeggioBoth},
3397 @cindex @code{\arpeggioBracket}
3398 @code{\arpeggioBracket}.
3399
3400 @seealso
3401
3402 Program reference: @internalsref{ArpeggioEvent} music expressions lead to
3403 @internalsref{Arpeggio} objects.  Cross staff arpeggios are
3404 @internalsref{PianoStaff}.@internalsref{Arpeggio}.
3405
3406 @refbugs
3407
3408 It is not possible to mix connected arpeggios and unconnected
3409 arpeggios in one @internalsref{PianoStaff} at the same time.
3410
3411 @node Staff switch lines
3412 @subsection Staff switch lines
3413
3414
3415 @cindex follow voice
3416 @cindex staff switching
3417 @cindex cross staff
3418
3419 @cindex @code{followVoice}
3420
3421 Whenever a voice switches to another staff a line connecting the notes
3422 can be printed automatically. This is enabled if the property
3423 @code{PianoStaff.followVoice} is set to true
3424
3425 @quotation
3426 @lilypond[fragment,relative=1,verbatim]
3427   \context PianoStaff <<
3428     \set PianoStaff.followVoice = ##t
3429     \context Staff \context Voice {
3430       c1
3431       \change Staff=two
3432       b2 a
3433     }
3434     \context Staff=two { \clef bass \skip 1*2 }
3435   >>  
3436 @end lilypond
3437 @end quotation
3438
3439 @seealso
3440
3441 The associated object is @internalsref{VoiceFollower}.
3442
3443 @refcommands
3444
3445 @cindex @code{\showStaffSwitch}
3446 @code{\showStaffSwitch}, 
3447 @cindex @code{\hideStaffSwitch}
3448 @code{\hideStaffSwitch}.
3449
3450
3451 @node Vocal music
3452 @section Vocal music
3453
3454 This section discusses how to enter and print lyrics.
3455
3456 @menu
3457 * Entering lyrics::             
3458 * The Lyrics context::          
3459 * More stanzas::                
3460 * Ambitus::                     
3461 @end menu
3462
3463 @node Entering lyrics
3464 @subsection Entering lyrics
3465
3466
3467 @cindex lyrics
3468 @cindex @code{\lyrics}
3469 @cindex punctuation
3470
3471 Lyrics are entered in a special input mode. This mode is is introduced
3472 by the keyword @code{\lyrics}.  In this mode you can enter lyrics, with
3473 punctuation and accents without any hassle.  Syllables are entered like
3474 notes, but with pitches replaced by text.  For example,
3475 @example
3476   \lyrics @{ Twin-4 kle4 twin- kle litt- le star2 @}
3477 @end example
3478
3479 A word in Lyrics mode begins with: an alphabetic character, @code{_},
3480 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
3481 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
3482 any 8-bit character with ASCII code over 127, or a two-character
3483 combination of a backslash followed by one of @code{`}, @code{'},
3484 @code{"}, or @code{^}.
3485
3486 Subsequent characters of a word can be any character that is not a digit
3487 and not white space.  One important consequence of this is that a word
3488 can end with @code{@}}. The following example is usually a bug. The
3489 syllable includes a @code{@}}, and hence the opening brace is not balanced
3490 @example
3491   \lyrics @{ twinkle@}
3492 @end example
3493
3494 @cindex @code{\property}, in @code{\lyrics}
3495 Similarly, a period following a alphabetic sequence, is included in
3496 the resulting string. As a consequence, spaces must be inserted around
3497 property commands
3498 @example
3499   \override Score . LyricText #'font-shape = #'italic
3500 @end example
3501
3502 @cindex @code{_}
3503 @cindex spaces, in lyrics
3504 @cindex quotes, in lyrics
3505
3506 Any @code{_} character which appears in an unquoted word is converted
3507 to a space.  This provides a mechanism for introducing spaces into words
3508 without using quotes.  Quoted words can also be used in Lyrics mode to
3509 specify words that cannot be written with the above rules
3510
3511 @example
3512   \lyrics @{ He said: "\"Let" my peo ple "go\"" @}
3513 @end example
3514 However, at least for english texts, you should use 
3515 @example
3516   \lyrics @{ He said: ``Let my peo ple go'' @}
3517 @end example
3518 to get the correct shape of the starting and ending quote.
3519
3520 @cindex hyphens
3521
3522 Centered hyphens are entered as `@code{-}@code{-}' between syllables.
3523 The hyphen will have variable length depending on the space between
3524 the syllables and it will be centered between the syllables.
3525
3526 @cindex melisma
3527 @cindex extender
3528
3529 When a lyric is sung over many notes (this is called a melisma), this is
3530 indicated with a horizontal line centered between a syllable and the
3531 next one. Such a line is called an extender line, and it is entered as
3532 @code{__}.
3533
3534 @seealso
3535
3536 Program reference: events @internalsref{LyricEvent},
3537 @internalsref{HyphenEvent}, and @internalsref{ExtenderEvent}. Objects
3538 @internalsref{LyricHyphen}, @internalsref{LyricExtender} and
3539 @internalsref{LyricText}.
3540
3541 Examples: @inputfileref{input/test,lyric-hyphen-retain.ly}.
3542
3543 @refbugs
3544
3545 The definition of lyrics mode is too complex.
3546
3547
3548
3549 @node The Lyrics context
3550 @subsection  The Lyrics context
3551
3552 Lyrics are printed by interpreting them in a @internalsref{Lyrics} context
3553 @example
3554  \context Lyrics \lyrics @dots{}
3555 @end example
3556
3557 @cindex automatic syllable durations
3558 @cindex @code{\lyricsto}
3559 @cindex lyrics and melodies
3560
3561 This will place the lyrics according to the durations that were
3562 entered. The lyrics can also be aligned under a given melody
3563 automatically.  In this case, it is no longer necessary to enter the
3564 correct duration for each syllable.  This is achieved by combining the
3565 melody and the lyrics with the @code{\lyricsto} expression
3566 @example
3567 \lyricsto @var{name} \new Lyrics @dots{} 
3568 @end example
3569
3570 This aligns the lyrics to the
3571 @c
3572 notes of the @internalsref{Voice} context called @var{name}, which has
3573 to exist. Therefore, normally the @code{Voice} is specified first, and
3574 then the lyrics are specified with @code{\lyricsto}.
3575
3576 For different or more complex orderings, the best way is to setup the
3577 hierarchy of staves and lyrics first, e.g.
3578 @example
3579 \context ChoirStaff \notes <<
3580   \context Lyrics = sopranoLyrics @{ s1 @}
3581   \context Voice = soprano @{ @emph{music} @}
3582   \context Lyrics = tenorLyrics @{ s1 @}
3583   \context Voice = tenor @{ @emph{music} @}
3584 >>
3585 @end example
3586 and then combine the appropriate melodies and lyric lines
3587 @example
3588   \lyricsto "soprano" \context Lyrics = sopranoLyrics
3589      @emph{the lyrics}
3590 @end example
3591
3592 @noindent
3593 The final input would resemble
3594
3595 @example
3596   << \context ChoirStaff \notes << @emph{setup the music}  >>
3597      \lyricsto "soprano" @emph{etc}
3598      \lyricsto "alto" @emph{etc}
3599      @emph{etc}
3600   >>
3601 @end example 
3602
3603
3604 The @code{\lyricsto} command detects melismata: it only puts one
3605 syllable under a tied or slurred group of notes. If you want to force
3606 an unslurred group of notes to be a melisma, insert @code{\melisma}
3607 after the first note of the group, and @code{\melismaEnd} after the
3608 last one, e.g.
3609
3610 @quotation
3611 @lilypond[relative=2,raggedright,fragment,verbatim]
3612 <<  \context Voice = "lala" { \time 3/4
3613     f4 g8
3614     \melisma 
3615     f e f
3616     \melismaEnd
3617      e2 }
3618   \lyricsto "lala" \new Lyrics \lyrics {
3619     la di __ daah 
3620   } >>
3621 @end lilypond
3622 @end quotation
3623
3624 In addition, notes are considered a melisma if they are manually
3625 beamed, and automatic beaming (see @ref{Setting automatic beam
3626 behavior}) is switched off.  The criteria for deciding melismata can
3627 be tuned with the property @code{melismaBusyProperties}. See
3628 @internalsref{Melisma_translator} in the program reference for more
3629 information.
3630
3631 When multiple stanzas are put on the same melody, it can happen that
3632 two stanzas have melismata in different locations. This can be
3633 remedied by switching off melismata for one
3634 @internalsref{Lyrics}. This is achieved by setting
3635 the @code{ignoreMelismata} property to @code{#t}. An example is shown
3636 in @inputfileref{input/regression,lyric-combine-new.ly}.
3637
3638 @cindex SATB
3639 @cindex choral score
3640
3641 A complete example of a SATB score setup is in the file
3642 @inputfileref{input/template,satb.ly}.
3643
3644
3645 @refcommands
3646
3647 @code{\melisma}, @code{\melismaEnd}
3648 @cindex @code{\melismaEnd}
3649 @cindex @code{\melisma}
3650
3651 @seealso
3652
3653 Program reference: Music expressions: @internalsref{LyricCombineMusic},
3654 Contexts: @internalsref{Lyrics}, @internalsref{Melisma_translator}.
3655
3656 Examples: @inputfileref{input/template,satb.ly},
3657 @inputfileref{input/regression,lyric-combine-new.ly}.
3658  
3659 @refbugs
3660
3661 Melismata are not detected automatically, and extender lines must be
3662 inserted by hand.
3663
3664
3665 For proper processing of extender lines, the
3666 @internalsref{Lyrics} and @internalsref{Voice} should be
3667 linked. This can be achieved either by using @code{\lyricsto} or by
3668 setting corresponding names for both contexts. The latter is explained
3669 in @ref{More stanzas}.
3670
3671 @node More stanzas
3672 @subsection More stanzas
3673
3674 @cindex phrasing, in lyrics
3675
3676
3677 The lyrics should be aligned with the note heads of the melody. To
3678 achieve this, each line of lyrics should be marked to correspond with
3679 the melodic line. This is done automatically when @code{\lyricsto},
3680 but it can also be done manually. 
3681
3682 To this end, give the @internalsref{Voice} context an identity
3683 @example
3684 \context Voice = duet @{
3685      \time 3/4
3686      g2 e4 a2 f4 g2.  @}
3687 @end example
3688
3689 Then set the @internalsref{Lyrics} contexts to names starting with
3690 that identity followed by a dash.  In the preceding example, the
3691 @internalsref{Voice} identity is @code{duet}, so the identities of the
3692 @internalsref{Lyrics}s are marked @code{duet-1} and @code{duet-2}
3693 @example
3694   \context Lyrics = "duet-1" @{
3695     Hi, my name is Bert. @}
3696   \context Lyrics = "duet-2" @{
3697     Ooooo, ch\'e -- ri, je t'aime. @}
3698 @end example
3699
3700 The complete example is shown here
3701 @quotation
3702 @lilypond[raggedright,verbatim]
3703 \score {
3704   << \notes \relative c'' \context Voice = duet { \time 3/4
3705      g2 e4 a2 f4 g2.  }
3706   \lyrics << \lyricsto "duet" \new Lyrics {
3707     \set vocalName = "Bert"
3708     Hi, my name is Bert. }
3709   \lyricsto "duet" \new Lyrics {
3710     \set vocalName = "Ernie"
3711     Ooooo, ch\'e -- ri, je t'aime.
3712     }
3713   >> >>
3714 }
3715 @end lilypond
3716 @end quotation
3717
3718 @cindex stanza number
3719 @cindex singer's names
3720 @cindex name of singer 
3721
3722 Stanza numbers can be added by setting @code{stanza}, e.g.
3723
3724 @quotation
3725 @lilypond[verbatim,relative=3]
3726 << \context Voice = duet { \time 3/4
3727      g2 e4 a2 f4 g2.  }
3728    \lyrics \lyricsto "duet" \new Lyrics {
3729        \set stanza = "1. "
3730        Hi, my name is Bert.
3731    }
3732 >>
3733 @end lilypond
3734 @end quotation
3735
3736 This example also demonstrates how names of the singers can be added
3737 using @code{vocalName} analogous to instrument annotations for staves.
3738 A short version may be entered as @code{vocNam}.
3739
3740 To make empty spaces in lyrics, use @code{\skip}.
3741
3742
3743 @seealso
3744
3745 Program reference: Layout objects @internalsref{LyricText} and
3746 @internalsref{VocalName}.  Music expressions
3747 @internalsref{LyricEvent}.
3748
3749 @refbugs
3750
3751 @cindex ambiguity
3752
3753 Input for lyrics introduces a syntactical ambiguity
3754  
3755 @example 
3756 foo = bar 
3757 @end example 
3758
3759 @noindent
3760 is interpreted as assigning a string identifier @code{\foo} such that
3761 it contains @code{"bar"}.  However, it could also be interpreted as
3762 making or a music identifier @code{\foo} containing the syllable
3763 `bar'.  The force the latter interpretation, use
3764 @example
3765   foo = \lyrics bar4
3766 @end example
3767
3768
3769 @node Ambitus
3770 @subsection Ambitus
3771 @cindex ambitus
3772
3773 The term @emph{ambitus} denotes a range of pitches for a given voice
3774 in a part of music.  It also may denote the pitch range that a musical
3775 instrument is capable of playing.  Ambituses are printed on vocal
3776 parts, so singers can easily determine if it meets his or her
3777 capabilities.
3778
3779 It denoted at the beginning of a piece near the initial clef.  The
3780 range is graphically specified by two note heads, that represent the
3781 minimum and maximum pitch.  To print such ambituses, add the
3782 @internalsref{Ambitus_engraver} to the @internalsref{Voice} context,
3783 for example,
3784
3785 @example
3786   \paper @{
3787     \context @{
3788       \VoiceContext
3789       \consists Ambitus_engraver
3790     @}
3791   @}
3792 @end example
3793
3794 This results in the following output
3795
3796 @quotation
3797 @lilypond[raggedright]
3798 \score {
3799   \context ChoirStaff 
3800   \notes \relative c' <<
3801     \new Staff {
3802       as'' c e2 cis,2
3803     }
3804     \new Staff  {
3805       es4 b c f as g
3806     }
3807   >>
3808   \paper {
3809     \context {
3810       \StaffContext
3811       \consists Ambitus_engraver
3812     }
3813   }
3814 }
3815 @end lilypond
3816 @end quotation
3817
3818 If you have multiple voices in a single staff, and you want a single
3819 ambitus per staff rather than per each voice, add the
3820 @internalsref{Ambitus_engraver} to the @internalsref{Staff} context
3821 rather than to the @internalsref{Voice} context.
3822
3823 It is possible to tune individual ambituses for multiple voices on a
3824 single staff, for example by erasing or shifting them horizontally. An
3825 example is in @inputfileref{input/test,ambitus-mixed.ly}.
3826
3827 @seealso
3828
3829 Program reference: @internalsref{Ambitus}.
3830
3831 Examples:  @inputfileref{input/regression,ambitus.ly},
3832 @inputfileref{input/test,ambitus-mixed.ly}.
3833
3834 @refbugs
3835
3836 There is no collision handling in the case of multiple per-voice
3837 ambitus.
3838
3839 @node Tablatures
3840 @section Tablatures
3841
3842 Tablature notation is used for notating music for plucked string
3843 instruments.  It notates pitches not by using note heads, but by
3844 indicating on which string and fret a note must be played.  LilyPond
3845 offers limited support for tablature.
3846
3847 @menu
3848 * Tablatures basic::            
3849 * Non-guitar tablatures::       
3850 @end menu
3851
3852 @node Tablatures basic
3853 @subsection Tablatures basic
3854 @cindex Tablatures basic
3855
3856 The string number associated to a note is given as a backslash
3857 followed by a number, e.g. @code{c4\3} for a C quarter on the third
3858 string. By default, string 1 is the highest one, and the tuning
3859 defaults to the standard guitar tuning (with 6 strings).  The notes
3860 are printed as tablature, by using @internalsref{TabStaff} and
3861 @internalsref{TabVoice} contexts
3862
3863 @quotation
3864 @lilypond[fragment,verbatim]
3865 \notes \context TabStaff  {
3866  a,4\5 c'\2 a\3 e'\1
3867  e\4 c'\2 a\3 e'\1
3868 }
3869 @end lilypond
3870 @end quotation
3871
3872 @cindex minimumFret
3873
3874 When no string is specified, the first string that does not give a
3875 fret number less than @code{minimumFret} is selected. The default
3876 value for @code{minimumFret} is 0
3877
3878
3879 @example
3880 e16 fis gis a b4
3881 \set TabStaff.minimumFret = #8
3882 e16 fis gis a b4
3883 @end example
3884 @quotation
3885 @lilypond[noindent,raggedright]
3886 frag = \notes {
3887     \key e \major
3888     e16 fis gis a b4
3889     \set TabStaff.minimumFret = #8
3890     e16 fis gis a b4
3891 }
3892 \score {
3893   \context StaffGroup <<
3894     \context Staff { \clef "G_8" \frag }
3895     \context TabStaff { \frag }
3896   >>
3897 }
3898 @end lilypond
3899 @end quotation
3900
3901 @seealso
3902
3903 Program reference: @internalsref{TabStaff}, @internalsref{TabVoice}, and
3904 @internalsref{StringNumberEvent}.
3905
3906 @refbugs
3907
3908 Chords are not handled in a special way, and hence the automatic
3909 string selector may easily select the same string to two notes in a
3910 chord.
3911
3912
3913 @node Non-guitar tablatures
3914 @subsection Non-guitar tablatures
3915 @cindex Non-guitar tablatures
3916
3917 You can change the number of strings, by setting the number of lines
3918 in the @internalsref{TabStaff}. 
3919
3920 You can change the tuning of the strings. A string tuning is given as
3921 a Scheme list with one integer number for each string, the number
3922 being the pitch (measured in semitones relative to middle C) of an
3923 open string.  The numbers specified for @code{stringTuning} are the
3924 numbers of semitones to subtract or add, starting the specified pitch
3925 by default middle C, in string order. Thus, the notes are e, a, d, and
3926 g
3927
3928 @quotation
3929 @lilypond[fragment,verbatim]
3930   \context TabStaff <<
3931     \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
3932     
3933     \notes {
3934       a,4 c' a e' e c' a e'
3935     }
3936   >> 
3937 @end lilypond
3938 @end quotation
3939
3940 @refbugs
3941
3942 No guitar special effects have been implemented.
3943
3944 @seealso
3945
3946 Program reference: @internalsref{Tab_note_heads_engraver}.
3947
3948
3949 @node Chord names
3950 @section Chord names
3951 @cindex Chords
3952
3953 LilyPond has support for both printing chord names.  Chords may be
3954 entered in musical chord notation, i.e. @code{< .. >}, but they can
3955 also be entered by name. Internally, the chords are represented as a
3956 set of pitches, so they can be transposed
3957
3958
3959 @quotation
3960 @lilypond[verbatim,raggedright]
3961 twoWays = \notes \transpose c c' {
3962   \chords {
3963     c1 f:sus4 bes/f
3964   }
3965   <c e g>
3966   <f bes c'>
3967   <f bes d'>
3968   }
3969
3970 \score {
3971    << \context ChordNames \twoWays
3972      \context Voice \twoWays >> }
3973 @end lilypond
3974 @end quotation
3975
3976 This example also shows that the chord printing routines do not try to
3977 be intelligent. The last chord (@code{f bes d}) is not interpreted as
3978 an inversion.
3979
3980
3981 @menu
3982 * Chords mode::                 
3983 * Printing chord names::        
3984 @end menu
3985
3986
3987 @node Chords mode
3988 @subsection Chords mode
3989 @cindex Chords mode
3990
3991 Chord mode is a mode where you can input sets of pitches using common
3992 names.  It is introduced by the keyword @code{\chords}.
3993 In chords mode,  a  chord is entered by the root, which is entered
3994 like a common pitch
3995 @quotation
3996 @lilypond[fragment,verbatim,relative=2]
3997 \chords { es4.  d8 c2 }
3998 @end lilypond
3999 @end quotation
4000 @cindex chord entry
4001 @cindex chord mode
4002
4003 Other chords may be entered by suffixing a colon, and introducing a
4004 modifier, and optionally, a number
4005 @c
4006 @quotation
4007 @lilypond[fragment,verbatim]
4008 \chords { e1:m e1:7 e1:m7  }
4009 @end lilypond
4010 @end quotation
4011 The first number following the root is taken to be the `type' of the
4012 chord, thirds are added to the root until it reaches the specified
4013 number
4014 @quotation
4015 @lilypond[fragment,verbatim]
4016  \chords { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
4017 @end lilypond
4018 @end quotation
4019
4020 @cindex root of chord
4021 @cindex additions, in chords
4022 @cindex removals, in  chords
4023
4024 More complex chords may also be constructed  adding separate steps
4025 to a chord. Additions are added after the  number following
4026 the colon, and are separated by dots
4027 @c
4028 @quotation
4029 @lilypond[verbatim,fragment]
4030   \chords { c:5.6 c:3.7.8 c:3.6.13 }
4031 @end lilypond
4032 @end quotation
4033 Chord steps can be  altered by suffixing a @code{-} or @code{+} sign
4034 to the number
4035 @quotation
4036 @lilypond[verbatim,fragment]
4037   \chords { c:7+ c:5+.3-  c:3-.5-.7- }
4038 @end lilypond
4039 @end quotation
4040 Removals are specified similarly, and are introduced by a caret.  They
4041 must come after the additions
4042 @quotation
4043 @lilypond[verbatim,fragment]
4044   \chords { c^3 c:7^5 c:9^3.5 }
4045 @end lilypond
4046 @end quotation
4047
4048 Modifiers can be used to change pitches. The following modifiers are
4049 supported
4050 @table @code
4051 @item m
4052   is the minor chord. This modifier lowers the 3rd and (if present) the 7th step.
4053 @item dim
4054   is the   diminished chord. This modifier lowers the 3rd, 5th and (if present)
4055   the 7th step.
4056 @item aug
4057   is the augmented chord. This modifier raises the 5th step.
4058 @item maj
4059   is the major 7th chord. This modifier raises the 7th step if present.  
4060 @item sus
4061   is the suspended 4th or 2nd. This modifier removes the 3rd
4062 step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
4063 the chord.
4064 @end table
4065 Modifiers can be mixed with additions
4066 @quotation
4067 @lilypond[verbatim,fragment]
4068   \chords { c:sus4 c:7sus4 c:dim7 c:m6 } 
4069 @end lilypond
4070 @end quotation
4071
4072 @cindex modifiers, in chords. 
4073 @cindex @code{aug}
4074 @cindex @code{dim}
4075 @cindex @code{maj}
4076 @cindex @code{sus}
4077 @cindex @code{m}
4078
4079 Since an unaltered 11 does not sound good when combined with an
4080 unaltered 13, the 11 is removed in this case (unless it is added
4081 explicitly)
4082 @c
4083 @quotation
4084 @lilypond[fragment,verbatim]
4085   \chords { c:13 c:13.11 c:m13 }
4086 @end lilypond
4087 @end quotation 
4088
4089 @cindex @code{/}
4090
4091 An inversion (putting one pitch of the chord on the bottom), as well
4092 as bass notes, can be specified by appending
4093 @code{/}@var{pitch} to the chord
4094 @quotation
4095 @lilypond[fragment,verbatim]
4096    \chords { c1 c/g c/f }
4097 @end lilypond
4098 @end quotation 
4099 @cindex @code{/+}
4100
4101 A bass note can be added instead of transposed out of the chord,
4102 by using  @code{/+}@var{pitch}.
4103
4104 @quotation
4105 @lilypond[fragment,verbatim]
4106    \chords { c1 c/+g c/+f }
4107 @end lilypond
4108 @end quotation 
4109
4110 Chords is a mode similar to @code{\lyrics}, @code{\notes} etc.  Most
4111 of the commands continue to work, for example, @code{r} and
4112 @code{\skip} can be used to insert rests and spaces, and property
4113 commands may be used to change various settings.
4114
4115
4116
4117 @refbugs
4118
4119 Each step can only be present in a chord once.  The following
4120 simply produces the augmented chord, since @code{5+} is interpreted
4121 last
4122 @cindex clusters
4123 @quotation
4124 @lilypond[verbatim,fragment]
4125   \chords { c:5.5-.5+ }
4126 @end lilypond
4127 @end quotation
4128
4129
4130 @node Printing chord names
4131 @subsection Printing chord names
4132
4133 @cindex printing chord names
4134 @cindex chord names
4135 @cindex chords
4136
4137 For displaying printed chord names, use the @internalsref{ChordNames} context.
4138 The chords may be entered either using the notation
4139 described above, or directly using @code{<} and @code{>}
4140
4141 @quotation
4142 @lilypond[verbatim,raggedright]
4143 scheme = \notes {
4144   \chords {a1 b c} <d' f' a'>  <e' g' b'>
4145 }
4146 \score {
4147   \notes<<
4148     \context ChordNames \scheme
4149     \context Staff \scheme
4150   >>
4151 }
4152 @end lilypond
4153 @end quotation
4154
4155 You can make the chord changes stand out by setting
4156 @internalsref{ChordNames}.@code{chordChanges} to true.  This will only
4157 display chord names when there is a change in the chords scheme and at
4158 the start of a new line
4159
4160 @quotation
4161 @lilypond[verbatim,linewidth=9\cm]
4162 scheme = \chords {
4163   c1:m c:m \break c:m c:m d
4164 }
4165 \score {
4166   \notes <<
4167     \context ChordNames {
4168         \set chordChanges = ##t
4169         \scheme }
4170     \context Staff \transpose c c' \scheme
4171   >>
4172 }
4173 @end lilypond
4174 @end quotation
4175
4176 The default chord name layout is a system for Jazz music, proposed by
4177 Klaus Ignatzek (see @ref{Literature list}).  It can be tuned through the
4178 following properties
4179
4180 @table @code
4181 @cindex chordNameExceptions
4182 @item chordNameExceptions
4183 This is a list that contains the chords that have special formatting.
4184 For an example, see
4185 @inputfileref{input/regression,chord-name-exceptions.ly}.
4186 @cindex exceptions, chord names.
4187
4188
4189 @cindex majorSevenSymbol
4190 @item majorSevenSymbol
4191 This property contains the markup object used for the 7th step, when
4192 it is major. Predefined options are @code{whiteTriangleMarkup} and
4193 @code{blackTriangleMarkup}.  See
4194 @inputfileref{input/regression,chord-name-major7.ly} for an example.
4195
4196 @cindex chordNameSeparator
4197 @item chordNameSeparator
4198 Different parts of a chord name are normally separated by a
4199 slash. By setting @code{chordNameSeparator}, you can specify other
4200 separators, e.g.
4201 @quotation
4202 @lilypond[fragment,verbatim]
4203 \context ChordNames \chords {
4204   c:7sus4
4205   \set chordNameSeparator
4206     = \markup { \typewriter "|" }
4207   c:7sus4
4208 }
4209 @end lilypond
4210 @end quotation
4211
4212 @cindex chordRootNamer
4213 @item chordRootNamer
4214 The root of a chord is usually printed as a letter with an optional
4215 alteration. The transformation from pitch to letter is done by this
4216 function.  Special note names (for example, the German ``H'' for a
4217 B-chord) can be produced by storing a new function in this property.
4218
4219 The predefined variables @code{\germanChords},
4220 @code{\semiGermanChords} set these variables.
4221
4222
4223 @cindex chordNoteNamer
4224 @item chordNoteNamer
4225 The default is to print single pitch, e.g. the bass note, using the
4226 @code{chordRootNamer}.  The @code{chordNoteNamer} property can be set
4227 to a specialized function to change this behavior.  For example, the
4228 base can be printed in lower case.
4229
4230 @end table
4231
4232
4233 There are also two other chord name schemes implemented: an alternate
4234 Jazz chord notation, and a systematic scheme called Banter chords. The
4235 alternate jazz notation is also shown on the chart in @ref{Chord name
4236 chart}.  Turning on these styles is described in the input file
4237 @inputfileref{input/test,chord-names-jazz.ly}.
4238
4239 @cindex Banter
4240 @cindex jazz chords
4241 @cindex chords, jazz  
4242
4243
4244 @refcommands
4245
4246 @cindex @code{\germanChords}
4247 @code{\germanChords}, 
4248 @cindex @code{\semiGermanChords}
4249 @code{\semiGermanChords}.
4250
4251
4252
4253
4254 @seealso
4255
4256 Examples: @inputfileref{input/regression,chord-name-major7.ly},
4257 @inputfileref{input/regression,chord-name-exceptions.ly},
4258 @inputfileref{input/test,chord-names-jazz.ly},
4259 @inputfileref{input/test,chord-names-german.ly}.
4260
4261 Init files: @file{scm/chords-ignatzek.scm}, and @file{scm/chord-entry.scm}.
4262
4263
4264 @refbugs
4265
4266 Chord names are determined solely from the list of pitches. Chord
4267 inversions are not identified, and neither are added bass notes. This
4268 may result in strange chord names when chords are entered with the
4269 @code{< .. >} syntax.
4270
4271
4272
4273
4274 @node Orchestral music
4275 @section Orchestral music
4276
4277 @cindex  Writing parts
4278
4279 Orchestral music involves some special notation, both in the full
4280 score and the individual parts. This section explains how to tackle
4281 some common problems in orchestral music.
4282
4283
4284
4285 @menu
4286 * Multiple staff contexts::     
4287 * Rehearsal marks::             
4288 * Bar numbers::                 
4289 * Instrument names::            
4290 * Transpose::                   
4291 * Instrument transpositions::   
4292 * Multi measure rests::         
4293 * Automatic part combining::    
4294 * Hiding staves::               
4295 * Different editions from one source::  
4296 * Quoting other voices::        
4297 @end menu
4298
4299 @node Multiple staff contexts
4300 @subsection Multiple staff contexts
4301
4302 Polyphonic scores consist of many staves. These staves can be
4303 constructed in three different ways
4304 @itemize @bullet
4305 @item The group is started with a brace at the left, and bar lines are
4306 connected. This is done with the @internalsref{GrandStaff} context.
4307
4308 @item The group is started with a bracket, and bar lines are connected. This is done with the
4309 @internalsref{StaffGroup} context
4310
4311
4312 @item The group is  started with a vertical line. Bar lines are not
4313 connected.  This is the default for the score.
4314
4315 @end itemize
4316
4317 @cindex Staff, multiple
4318 @cindex bracket, vertical
4319 @cindex brace, vertical
4320 @cindex grand staff
4321 @cindex staff group
4322
4323
4324
4325
4326 @node Rehearsal marks
4327 @subsection Rehearsal marks
4328 @cindex Rehearsal marks
4329 @cindex mark
4330 @cindex @code{\mark}
4331
4332 To print a  rehearsal mark, use the @code{\mark} command
4333 @quotation
4334 @lilypond[fragment,verbatim]
4335 \relative c'' {
4336   c1 \mark \default
4337   c1 \mark \default
4338   c1 \mark #8 
4339   c1 \mark \default
4340   c1 \mark \default
4341 }
4342 @end lilypond
4343 @end quotation
4344
4345 @noindent
4346 (The letter I is skipped in accordance with engraving traditions.)
4347
4348 The mark is incremented automatically if you use @code{\mark
4349 \default}, but you can also use an integer argument to set the mark
4350 manually.  The value to use is stored in the property
4351 @code{rehearsalMark}.
4352
4353 The style is defined by the property @code{markFormatter}. It is a
4354 function taking the current mark (an integer) and the current context
4355 as argument. It should return a markup object. In the following
4356 example, @code{markFormatter} is set to a canned procedure. After a
4357 few measures, it is set to function that produces a boxed number. 
4358
4359 @quotation
4360 @lilypond[verbatim,fragment,relative=2]
4361   \set Score.markFormatter = #format-mark-numbers 
4362   c1 \mark \default
4363   c1 \mark \default
4364   \set Score.markFormatter
4365  = #(lambda (mark  context)
4366         (make-bold-markup (make-box-markup (number->string mark))))
4367   c1 \mark \default
4368   c1 \mark \default
4369 @end lilypond
4370 @end quotation
4371
4372 The file @file{scm/translation-functions.scm} contains the definitions
4373 of @code{format-mark-numbers} (the default format) and
4374 @code{format-mark-letters}. They can be used as inspiration for other
4375 formatting functions.
4376
4377
4378 @cindex coda on bar line
4379 @cindex segno on bar line
4380 @cindex fermata on bar line
4381 @cindex bar lines, symbols on
4382
4383 The @code{\mark} command can also be used to put signs like coda,
4384 segno and fermatas on a bar line. Use @code{\markup} to
4385 to access the appropriate symbol
4386
4387 @quotation
4388 @lilypond[fragment,verbatim,relative=2]
4389   c1 \mark \markup { \musicglyph #"scripts-ufermata" }
4390   c1
4391 @end lilypond
4392 @end quotation
4393
4394 In the case of a line break, marks must also be printed at the end of
4395 the line, and not at the beginning. Use the following to force that
4396 behavior
4397 @example
4398 \override Score.RehearsalMark  
4399   #'break-visibility = #begin-of-line-invisible
4400 @end example
4401
4402 @cindex fermatas
4403 @cindex coda
4404 @cindex segno
4405 @cindex bar lines, putting symbols on 
4406
4407 @seealso
4408
4409 Program reference: @internalsref{MarkEvent}, @internalsref{RehearsalMark}.
4410
4411 Init files: @file{scm/translation-functions.scm} contains the
4412 definition of @code{format-mark-numbers} and
4413 @code{format-mark-letters}. They can be used as inspiration for other
4414 formatting functions.
4415
4416 Examples: @inputfileref{input/regression,rehearsal-mark-letter.ly},
4417 @inputfileref{input/regression,rehearsal-mark-number.ly}.
4418
4419
4420 @node Bar numbers
4421 @subsection Bar numbers
4422
4423
4424 @cindex bar numbers
4425 @cindex measure numbers
4426 @cindex currentBarNumber
4427
4428 Bar numbers are printed by default at the start of the line.  The
4429 number itself is stored in the 
4430 @code{currentBarNumber} property,
4431 which is normally updated automatically for every measure.
4432
4433 Bar numbers can be typeset at regular intervals instead of at the
4434 beginning of each line. This is illustrated in the following example,
4435 whose source is available as
4436 @inputfileref{input/test,bar-number-regular-interval.ly}
4437
4438 @quotation
4439 @lilypondfile[]{bar-number-regular-interval.ly}
4440 @end quotation
4441
4442 @seealso
4443
4444 Program reference: @internalsref{BarNumber}.
4445
4446 Examples: @inputfileref{input/test,bar-number-every-five-reset.ly},
4447 and @inputfileref{input/test,bar-number-regular-interval.ly}.
4448
4449 @refbugs
4450
4451 Bar numbers can collide with the @internalsref{StaffGroup} bracket, if
4452 there is one at the top. To solve this, the
4453 @code{padding} property of @internalsref{BarNumber} can be
4454 used to position the number correctly.
4455
4456 @node Instrument names
4457 @subsection Instrument names
4458
4459 In an orchestral score, instrument names are printed left side of the
4460 staves.
4461
4462 This can be achieved by setting @internalsref{Staff}.@code{instrument}
4463 and @internalsref{Staff}.@code{instr}. This will print a string before
4464 the start of the staff. For the first start, @code{instrument} is
4465 used, for the next ones @code{instr} is used.
4466
4467 @quotation
4468 @lilypond[verbatim,raggedright,relative=3]
4469 \set Staff.instrument = "Ploink "
4470 \set Staff.instr = "Plk "
4471 c1
4472 \break
4473 c''
4474 @end lilypond
4475 @end quotation
4476
4477 You can also use markup texts to construct more complicated instrument
4478 names, for example
4479
4480 @quotation
4481 @lilypond[fragment,verbatim,raggedright]
4482 \notes {
4483   \set Staff.instrument = \markup {
4484       \column < "Clarinetti"
4485         { "in B"
4486           \smaller \flat
4487         }
4488         >
4489    }
4490    { c''1 }
4491 }
4492 @end lilypond
4493 @end quotation
4494
4495 @seealso
4496
4497 Program reference: @internalsref{InstrumentName}.
4498
4499 @refbugs
4500
4501 When you put a name on a grand staff or piano staff the width of the
4502 brace is not taken into account. You must add extra spaces to the end of
4503 the name to avoid a collision.
4504
4505 @node Transpose
4506 @subsection Transpose
4507 @cindex Transpose
4508 @cindex transposition of pitches
4509 @cindex @code{\transpose}
4510
4511 A music expression can be transposed with @code{\transpose}.  The syntax
4512 is
4513 @example
4514   \transpose @var{from} @var{to} @var{musicexpr}
4515 @end example
4516
4517 This means that @var{musicexpr} is transposed by the interval between
4518 the pitches @var{from} and @var{to}: any note with pitch @code{from}
4519 is changed to @code{to}.
4520
4521
4522 For example, consider  a piece written in the key of  D major.  If
4523 this piece is a  little too low for its performer, it can be
4524 transposed up to E major with
4525 @example
4526  \transpose d e @dots{}
4527 @end example
4528
4529 Consider a part  written for violin (a C instrument). If
4530 this part is to be played on the A clarinet, the following
4531 transposition will produce the appropriate part
4532
4533 @example
4534   \transpose a c @dots{}
4535 @end example   
4536
4537 Since @var{from} and @var{to} are pitches, so @code{\transpose} must be
4538 inside a @code{\notes} section.  @code{\transpose} distinguishes
4539 between enharmonic pitches: both @code{\transpose c cis} or
4540 @code{\transpose c des} will transpose up half a tone.  The first
4541 version will print sharps and the second version will print flats
4542
4543 @quotation
4544 @lilypond[raggedright,verbatim]
4545 mus =\notes { \key d \major cis d fis g }
4546 \score { \notes \context Staff {
4547   \clef "F" \mus
4548   \clef "G"
4549   \transpose c g' \mus
4550   \transpose c f' \mus
4551 }}
4552 @end lilypond
4553 @end quotation
4554
4555
4556 @seealso
4557
4558 Program reference: @internalsref{TransposedMusic}, and
4559 @internalsref{UntransposableMusic}.
4560
4561 @refbugs
4562
4563 If you want to use both @code{\transpose} and @code{\relative},
4564 you must put @code{\transpose} outside of @code{\relative}, since
4565 @code{\relative} will have no effect music that appears inside a
4566 @code{\transpose}.
4567
4568 @node Instrument transpositions
4569 @subsection Instrument transpositions
4570
4571 The key of a transposing instrument can also be specified.  This
4572 applies to many wind instruments, for example, clarinets (B-flat, A and
4573 E-flat), horn (F) and trumpet (B-flat, C, D and E-flat).
4574
4575
4576 The transposition is entered after the keyword @code{\transposition}
4577
4578 @example
4579   \transposition bes   %%  B-flat clarinet
4580 @end example
4581
4582 This command sets the property @code{instrumentTuning}. The value of
4583 this property is used for MIDI output and quotations.  It does not
4584 affect how notes are printed in the current staff.
4585
4586 @cindex transposition, MIDI
4587 @cindex transposition, instrument
4588
4589
4590 @node Multi measure rests
4591 @subsection Multi measure rests
4592 @cindex multi measure rests
4593 @cindex Rests, multi measure
4594
4595 @cindex @code{R}
4596
4597 Multi measure rests are entered using `@code{R}'. It is specifically
4598 meant for full bar rests and for entering parts: the rest can expand
4599 to fill a score with rests, or it can be printed as a single
4600 multimeasure rest. This expansion is controlled by the property
4601 @code{Score.skipBars}. If this is set to true, empty measures will not
4602 be expanded, and the appropriate number is added automatically
4603
4604 @quotation
4605 @lilypond[fragment,verbatim]
4606  \time 4/4 r1 | R1 | R1*2
4607  \set Score.skipBars = ##t R1*17  R1*4
4608 @end lilypond
4609 @end quotation
4610
4611 The @code{1} in @code{R1} is similar to the duration notation used for
4612 notes. Hence, for time signatures other than 4/4, you must enter other
4613 durations.  This can be done with augmentation dots or fractions
4614
4615 @quotation
4616 @lilypond[fragment,verbatim]
4617  \set Score.skipBars = ##t
4618  \time 3/4
4619   R2. | R2.*2
4620  \time 13/8
4621  R1*13/8
4622  R1*13/8*12
4623 @end lilypond
4624 @end quotation
4625
4626 An @code{R} spanning a single measure is printed as either a whole rest
4627 or a breve, centered in the measure regardless of the time signature.
4628
4629 @cindex text on multi-measure rest
4630 @cindex script on multi-measure rest
4631 @cindex fermata on multi-measure rest
4632
4633 Texts can be added to multi-measure rests by using the
4634 @var{note}-@code{markup} syntax (see @ref{Text markup}).  In this case, the number is
4635 replaced. If you need both texts and the number, you must add the
4636 number by hand. A variable (@code{\fermataMarkup}) is provided for
4637 adding fermatas
4638
4639
4640 @quotation
4641 @lilypond[verbatim,fragment]
4642   \time 3/4
4643   R2._\markup { "Ad lib" }
4644   R2.^\fermataMarkup
4645 @end lilypond
4646 @end quotation
4647
4648 If you want to have a text on the left end of a multi-measure rest,
4649 attach the text to a zero-length skip note, i.e.
4650
4651 @example
4652   s1*0^"Allegro"
4653   R1*4 
4654 @end example
4655
4656
4657 @cindex whole rests for a full measure 
4658
4659 @seealso
4660
4661 Program reference: @internalsref{MultiMeasureRestEvent},
4662 @internalsref{MultiMeasureTextEvent},
4663 @internalsref{MultiMeasureRestMusicGroup}, and
4664 @internalsref{MultiMeasureRest}.
4665
4666 The layout object @internalsref{MultiMeasureRestNumber} is for the
4667 default number, and @internalsref{MultiMeasureRestText} for user
4668 specified texts.
4669
4670 @refbugs
4671
4672 It is not possible to use fingerings (e.g. @code{R1-4}) to put numbers
4673 over multi-measure rests.
4674
4675 @cindex condensing rests
4676
4677 There is no way to automatically condense multiple rests into a single
4678 multimeasure rest. Multi measure rests do not take part in rest
4679 collisions.
4680
4681 Be careful when entering multimeasure rests followed by whole
4682 notes. The following will enter two notes lasting four measures each
4683 @example
4684  R1*4 cis cis 
4685 @end example
4686 When @code{skipBars} is set, the result will look OK, but the bar
4687 numbering will be off.
4688
4689 @node Automatic part combining
4690 @subsection Automatic part combining
4691 @cindex automatic part combining
4692 @cindex part combiner
4693
4694
4695 Automatic part combining is used to merge two parts of music onto a
4696 staff.  It is aimed at typesetting orchestral scores.  When the two
4697 parts are identical for a period of time, only one is shown.  In
4698 places where the two parts differ, they are typeset as separate
4699 voices, and stem directions are set automatically.  Also, solo and
4700 @emph{a due} parts are identified and can be marked.
4701
4702
4703 The syntax for part combining is
4704
4705 @example
4706   \partcombine @var{musicexpr1} @var{musicexpr2}
4707 @end example
4708
4709 The music expressions will be interpreted as @internalsref{Voice} contexts.
4710
4711 The following example demonstrates the basic functionality of the part
4712 combiner: putting parts on one staff, and setting stem directions and
4713 polyphony
4714
4715 @quotation
4716 @lilypond[verbatim,raggedright,fragment,relative=2]
4717   \new Staff \partcombine 
4718       {
4719         g g a( b) c c r r
4720       }
4721       {
4722         g g r4 r  e e g g 
4723       }
4724 @end lilypond
4725 @end quotation
4726
4727 The first @code{g} appears only once, although it was
4728 specified twice (once in each part).  Stem, slur and tie directions are
4729 set automatically, depending whether there is a solo or unisono. The
4730 first part (with context called @code{one}) always gets up stems, and
4731 `solo', while the second (called @code{two}) always gets down stems and
4732 `Solo II'.
4733
4734 If you just want the merging parts, and not the textual markings, you
4735 may set the property @var{soloADue} to false
4736
4737 @quotation
4738 @lilypond[verbatim,raggedright,fragment,relative=2]
4739    \new Staff <<
4740     \set Staff.soloADue = ##f
4741     \partcombine 
4742       {
4743         g a( b) r
4744       }
4745       {
4746         g r4 r f
4747       } >>
4748 @end lilypond
4749 @end quotation
4750
4751 @seealso
4752
4753 Program reference: @internalsref{PartCombineMusic},
4754 @internalsref{SoloOneEvent}, and
4755 @internalsref{SoloTwoEvent}, and
4756 @internalsref{UnisonoEvent}.
4757
4758 @refbugs
4759
4760 In @code{soloADue} mode, when the two voices play the same notes on and
4761 off, the part combiner may typeset @code{a2} more than once in a
4762 measure.
4763
4764 @code{\partcombine} can not be inside @code{\times}. 
4765
4766 Internally, the @code{\partcombine} interprets both arguments as
4767 @code{Voice}s named @code{one} and @code{two}, and then decides when
4768 the parts can be combined. Consequently, if the arguments switch to
4769 differently named @internalsref{Voice} contexts, the events in those
4770 will be ignored.
4771
4772 @node Hiding staves
4773 @subsection Hiding staves
4774
4775 @cindex Frenched scores
4776 @cindex Hiding staves
4777
4778 In orchestral scores, staff lines that only have rests are usually
4779 removed.  This saves some space. This style is called `French Score'.
4780 For @internalsref{Lyrics}, 
4781 @internalsref{ChordNames} and @internalsref{FiguredBass}, this is
4782 switched on by default.  When these line of these contexts turn out
4783 empty after the line-breaking process, they are removed.
4784
4785 For normal staves, a specialized @internalsref{Staff} context is
4786 available, which does the same: staves containing nothing (or only
4787 multi measure rests) are removed. The context definition is stored in
4788 @code{\RemoveEmptyStaffContext} variable. Observe how the second staff
4789 in this example disappears in the second line
4790
4791
4792 @quotation
4793 @lilypond[verbatim]
4794 \score  {
4795   \notes \relative c' <<
4796     \new Staff { e4 f g a \break c1 }
4797     \new Staff { c4 d e f \break R1 }
4798   >>
4799   \paper {
4800     linewidth = 6.\cm 
4801     \context { \RemoveEmptyStaffContext }
4802   }
4803 }
4804 @end lilypond
4805 @end quotation
4806
4807 The first page shows all staves in full. If empty staves should be
4808 removed from the first page too, set @code{remove-first} to false in
4809 @internalsref{RemoveEmptyVerticalGroup}.
4810
4811 Another application is making ossia sections, i.e. alternative
4812 melodies on a separate piece of staff, with help of a Frenched
4813 staff. See @inputfileref{input/test,ossia.ly} for an example.
4814
4815
4816 @node Different editions from one source
4817 @subsection Different editions from one source
4818
4819 The @code{\tag} command marks music expressions with a name. These
4820 tagged expressions can be filtered out later.  With this mechanism it
4821 is possible to make different versions of the same music source.
4822
4823 In the following example, we see two versions of a piece of music, one
4824 for the full score, and one with cue notes for the instrumental part
4825
4826 @example
4827     c1
4828     \relative c' <<
4829         \tag #'part <<
4830           R1 \\
4831           @{
4832               \set fontSize = #-1
4833               c4_"cue" f2 g4 @} 
4834         >>
4835         \tag #'score R1
4836      >>
4837      c1
4838 @end example
4839
4840 The same can be applied to articulations, texts, etc.: they are
4841 made by prepending
4842 @example
4843         -\tag #@var{your-tag} 
4844 @end example
4845 to an articulation, for example, 
4846 @example
4847     c1-\tag #'part ^4
4848 @end example
4849
4850 This defines a note with a conditional fingering indication.
4851
4852 By applying the @code{remove-tag} function, tagged expressions can be
4853 filtered. For example,
4854 @example
4855 \simultaneous @{
4856         @var{the music}
4857         \apply #(remove-tag 'score) @var{the music}
4858         \apply #(remove-tag 'part) @var{the music}
4859 @}
4860 @end example
4861 would yield
4862
4863 @quotation
4864 @lilypondfile[]{tag-filter.ly}
4865 @end quotation
4866
4867 The argument of the @code{\tag} command should be a symbol, or a list
4868 of symbols, for example,
4869 @example
4870   \tag #'(original-part transposed-part) @dots{}
4871 @end example
4872
4873 @seealso
4874
4875 Examples: @inputfileref{input/regression,tag-filter.ly}.
4876
4877
4878 @node Quoting other voices
4879 @subsection Quoting other voices
4880
4881 With quotations, fragments of other parts can be inserted into a part
4882 directly. Before a part can be quoted, it must be marked especially as
4883 quotable. This is done with code @code{\addquote} command. The
4884 quotation may then be done with @code{\quote}
4885
4886 @example
4887   \addquote @var{name} @var{music}
4888   \quote @var{name} @var{duration}  
4889 @end example
4890
4891 @noindent
4892
4893 Here, @var{name} is an identifying string. The @var{music} is any kind
4894 of music.  This is an example of @code{\addquote}
4895
4896 @verbatim
4897 \addquote clarinet \notes\relative c' {
4898   f4 fis g gis
4899 }
4900 @end verbatim
4901
4902 During a part, a piece of music can be quoted with the @code{\quote}
4903 command. 
4904   
4905 @verbatim
4906   \quote clarinet 2.
4907 @end verbatim
4908
4909 This would cite 3 quarter notes (a dotted half note) of the previously
4910 added clarinet voice.
4911
4912 Quotations take into account the transposition both source and target
4913 instruments, if they are specified using the @code{\transposition} command.
4914
4915 @quotation
4916 @lilypond[verbatim,fragment] 
4917 \addquote clarinet \notes\relative c' {
4918   \transposition bes
4919   f4 fis g gis
4920 }
4921 \score {
4922   \notes {
4923   e'8 f'8 \quote clarinet 2
4924 } }
4925 @end lilypond
4926 @end quotation
4927
4928 @refbugs
4929
4930 Only the contents of the first @internalsref{Voice} occurring in an
4931 @code{\addquote} command will be considered for quotation, so
4932 @var{music} can not contain @code{\new} and @code{\context Voice}
4933 statements that would switch to a different Voice.
4934
4935
4936 @seealso
4937
4938 In this manual: @ref{Instrument transpositions}.
4939
4940 Examples: @inputfileref{input/regression,quote.ly}
4941 @inputfileref{input/regression,quote-transposition.ly}
4942
4943 Program reference: @internalsref{QuoteMusic}.
4944
4945 @node Ancient notation
4946 @section Ancient notation
4947
4948 @cindex Vaticana, Editio
4949 @cindex Medicaea, Editio
4950 @cindex hufnagel
4951 @cindex Petrucci
4952 @cindex mensural
4953
4954 Support for ancient notation includes features for mensural notation
4955 and Gregorian Chant notation.  There is also limited support for
4956 figured bass notation.
4957
4958 Many graphical objects provide a @code{style} property, see
4959 @ref{Ancient note heads}, @ref{Ancient accidentals}, @ref{Ancient
4960 rests}, @ref{Ancient clefs}, @ref{Ancient flags} and @ref{Ancient time
4961 signatures}.  By manipulating such a grob property, the typographical
4962 appearance of the affected graphical objects can be accommodated for a
4963 specific notation flavor without need for introducing any new
4964 notational concept.
4965
4966 Other aspects of ancient notation can not that easily be expressed as
4967 in terms of just changing a style property of a graphical object.
4968 Therefore, some notational concepts are introduced specifically for
4969 ancient notation, see @ref{Custodes}, @ref{Divisiones},
4970 @ref{Ligatures}, and @ref{Figured bass}.
4971
4972
4973 @menu
4974 * Ancient note heads::          
4975 * Ancient accidentals::         
4976 * Ancient rests::               
4977 * Ancient clefs::               
4978 * Ancient flags::               
4979 * Ancient time signatures::     
4980 * Custodes::                    
4981 * Divisiones::                  
4982 * Ligatures::                   
4983 * Figured bass::                
4984 * Vaticana style contexts::     
4985 @end menu
4986
4987 If this all is way too much of documentation for you, and you just
4988 want to dive into typesetting without worrying too much about the
4989 details on how to customize a context, you may have a look at the
4990 predefined contexts (see @ref{Vaticana style contexts}).  Use them to
4991 set up predefined style-specific voice and staff contexts, and
4992 directly go ahead with the note entry.
4993
4994 @refbugs
4995
4996 Ligatures need special spacing that has not yet been implemented.  As
4997 a result, there is too much space between ligatures most of the time,
4998 and line breaking often is unsatisfactory.  Also, lyrics do not
4999 correctly align with ligatures.
5000
5001 Accidentals must not be printed within a ligature, but instead need to
5002 be collected and printed in front of it.
5003
5004 Augmentum dots within ligatures are  not handled correctly.
5005
5006
5007 @node Ancient note heads
5008 @subsection Ancient note heads
5009
5010 @cindex note heads
5011
5012
5013 For ancient notation, a note head style other than the @code{default}
5014 style may be chosen.  This is accomplished by setting the @code{style}
5015 property of the NoteHead object to the desired value (@code{baroque},
5016 @code{neo_mensural} or @code{mensural}).  The @code{baroque} style
5017 differs from the @code{default} style only in using a square shape for
5018 @code{\breve} note heads.  The @code{neo_mensural} style differs from
5019 the @code{baroque} style in that it uses rhomboidal heads for whole
5020 notes and all smaller durations.  Stems are centered on the note
5021 heads.  This style is in particular useful when transcribing mensural
5022 music, e.g. for the incipit.  The @code{mensural} style finally
5023 produces note heads that mimic the look of note heads in historic
5024 printings of the 16th century.
5025
5026 The following example demonstrates the @code{neo_mensural} style
5027
5028 @quotation
5029 @lilypond[fragment,raggedright,verbatim]
5030   \override NoteHead #'style = #'neo_mensural
5031   a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
5032 @end lilypond
5033 @end quotation
5034
5035 When typesetting a piece in Gregorian Chant notation, a Gregorian
5036 ligature engraver will automatically select the proper note heads,
5037 such there is no need to explicitly set the note head style.  Still,
5038 the note head style can be set e.g. to @code{vaticana_punctum} to
5039 produce punctum neumes.  Similarly, a mensural ligature engraver is
5040 used to automatically assemble mensural ligatures.  See
5041 @ref{Ligatures} for how ligature engravers work.
5042
5043 @seealso
5044
5045 In this manual
5046 @ref{Percussion staves} use note head styles of their own that are
5047 frequently used in contemporary music notation.
5048
5049 Examples: @inputfileref{input/regression,note-head-style.ly} gives an
5050 overview over all available note head styles.
5051
5052
5053 @node Ancient accidentals
5054 @subsection Ancient accidentals
5055
5056 @cindex accidentals
5057
5058
5059 Use the @code{style} property of grob @internalsref{Accidental} to
5060 select ancient accidentals.   Supported styles are
5061 @code{mensural}, @code{vaticana}, @code{hufnagel} and @code{medicaea}.
5062
5063 @quotation
5064 @lilypond[raggedright,staffsize=26]
5065 \score {
5066     \notes {
5067         \fatText
5068         s
5069         ^\markup {
5070             \column <
5071                 "vaticana" 
5072                 { " " \musicglyph #"accidentals-vaticana-1"
5073                   " " \musicglyph #"accidentals-vaticana0" }
5074             >
5075             \column <
5076                 "medicaea"
5077                 { " " \musicglyph #"accidentals-medicaea-1" }
5078             >
5079             \column <
5080                 "hufnagel"
5081                 { " " \musicglyph #"accidentals-hufnagel-1" }
5082             >
5083             \column <
5084                 "mensural"
5085                 { " " \musicglyph #"accidentals-mensural-1"
5086                   " " \musicglyph #"accidentals-mensural1" }
5087             >
5088         }
5089     }
5090     \paper {
5091         raggedright = ##t 
5092         interscoreline = 1
5093         \context {
5094             \ScoreContext
5095             \remove "Bar_number_engraver"
5096         }
5097         \context{
5098             \StaffContext
5099             \remove "Clef_engraver"
5100             \remove "Key_engraver"
5101             \remove "Time_signature_engraver"
5102             \remove "Staff_symbol_engraver"
5103             minimumVerticalExtent = ##f
5104         }
5105     }
5106 }
5107 @end lilypond
5108 @end quotation
5109
5110 As shown, not all accidentals are supported by each style.  When
5111 trying to access an unsupported accidental, LilyPond will switch to a
5112 different style, as demonstrated in
5113 @inputfileref{input/test,ancient-accidentals.ly}.
5114
5115 Similarly to local accidentals, the style of the key signature can be
5116 controlled by the @code{style} property of the
5117 @internalsref{KeySignature} grob.
5118
5119 @seealso
5120
5121 In this manual: @ref{Pitches}, @ref{Chromatic alterations} and
5122 @ref{Accidentals} give a general introduction into the use of
5123 accidentals.  @ref{Key signature} gives a general introduction into
5124 the use of key signatures.
5125
5126 Program reference: @internalsref{KeySignature}.
5127
5128 Examples: @inputfileref{input/test,ancient-accidentals.ly}.
5129
5130 @node Ancient rests
5131 @subsection Ancient rests
5132
5133 @cindex rests
5134
5135
5136 Use the @code{style} property of grob @internalsref{Rest} to select
5137 ancient accidentals.   Supported styles are @code{classical},
5138 @code{neo_mensural} and @code{mensural}.  @code{classical} differs
5139 from the @code{default} style only in that the quarter rest looks like
5140 a horizontally mirrored 8th rest.  The @code{neo_mensural} style suits
5141 well for e.g. the incipit of a transcribed mensural piece of music.
5142 The @code{mensural} style finally mimics the appearance of rests as
5143 in historic prints of the 16th century.
5144
5145 The following example demonstrates the @code{neo_mensural} style
5146
5147 @quotation
5148 @lilypond[fragment,raggedright,verbatim]
5149   \override Rest #'style = #'neo_mensural
5150   r\longa r\breve r1 r2 r4 r8 r16
5151 @end lilypond
5152 @end quotation
5153
5154 There are no 32th and 64th rests specifically for the mensural or
5155 neo-mensural style.  Instead, the rests from the default style will be
5156 taken.  See @inputfileref{input/test,rests.ly} for a chart of all
5157 rests.
5158
5159 There are no rests in Gregorian Chant notation; instead, it uses
5160 @ref{Divisiones}.
5161
5162 @seealso
5163
5164 In this manual: @ref{Rests} gives a general introduction into the use of rests.
5165
5166
5167 @node Ancient clefs
5168 @subsection Ancient clefs
5169
5170 @cindex clefs
5171
5172
5173 LilyPond supports a variety of clefs, many of them ancient.
5174
5175 The following table shows all ancient clefs that are supported via the
5176 @code{\clef} command.  Some of the clefs use the same glyph, but
5177 differ only with respect to the line they are printed on.  In such
5178 cases, a trailing number in the name is used to enumerate these clefs.
5179 Still, you can manually force a clef glyph to be typeset on an
5180 arbitrary line, as described in @ref{Clef}.  The note printed to the
5181 right side of each clef in the example column denotes the @code{c'}
5182 with respect to that clef.
5183
5184 @multitable @columnfractions  .3 .3 .3 .1
5185
5186 @item
5187 @b{Glyph Name} @tab
5188 @b{Description} @tab
5189 @b{Supported Clefs} @tab
5190 @b{Example}
5191
5192 @item
5193 @code{clefs-neo_mensural_c} @tab
5194 modern style mensural C clef @tab
5195 @code{neo_mensural_c1}, @code{neo_mensural_c2},
5196 @code{neo_mensural_c3}, @code{neo_mensural_c4} @tab
5197 @quotation
5198 @lilypond[relative=1,notime]
5199 \override Staff.TimeSignature   #'transparent = ##t
5200 \clef "neo_mensural_c2" c
5201 @end lilypond
5202 @end quotation
5203
5204 @item
5205 @code{clefs-petrucci_c1}
5206 @code{clefs-petrucci_c2}
5207 @code{clefs-petrucci_c3}
5208 @code{clefs-petrucci_c4}
5209 @code{clefs-petrucci_c5}
5210
5211 @tab
5212 petrucci style mensural C clefs, for use  on different  staff lines
5213 (the examples shows the 2nd staff line C clef).
5214
5215 @tab
5216 @code{petrucci_c1}
5217 @code{petrucci_c2}
5218 @code{petrucci_c3}
5219 @code{petrucci_c4}
5220 @code{petrucci_c5}
5221
5222 @tab
5223 @quotation
5224 @lilypond[relative=1,notime]
5225 \override Staff.TimeSignature   #'transparent = ##t
5226 \clef "petrucci_c2" c
5227 @end lilypond
5228 @end quotation
5229
5230 @item
5231 @code{clefs-petrucci_f} @tab
5232 petrucci style mensural F clef @tab
5233 @code{petrucci_f} @tab
5234 @quotation
5235 @lilypond[relative=1,notime]
5236 \override Staff.TimeSignature   #'transparent = ##t
5237 \clef "petrucci_f" c
5238 @end lilypond
5239 @end quotation
5240
5241 @item
5242 @code{clefs-petrucci_g} @tab
5243 petrucci style mensural G clef @tab
5244 @code{petrucci_g} @tab
5245 @quotation
5246 @lilypond[relative=1,notime]
5247 \override Staff.TimeSignature   #'transparent = ##t
5248 \clef "petrucci_g" c
5249 @end lilypond
5250 @end quotation
5251
5252 @item
5253 @code{clefs-mensural_c} @tab
5254 historic style mensural C clef @tab
5255 @code{mensural_c1}, @code{mensural_c2}, @code{mensural_c3},
5256 @code{mensural_c4} @tab
5257 @quotation
5258 @lilypond[relative=1,notime]
5259 \override Staff.TimeSignature   #'transparent = ##t
5260 \clef "mensural_c2" c
5261 @end lilypond
5262 @end quotation
5263
5264 @item
5265 @code{clefs-mensural_f} @tab
5266 historic style mensural F clef @tab
5267 @code{mensural_f} @tab
5268 @quotation
5269 @lilypond[relative=1,notime]
5270 \override Staff.TimeSignature   #'transparent = ##t
5271 \clef "mensural_f" c
5272 @end lilypond
5273 @end quotation
5274
5275 @item
5276 @code{clefs-mensural_g} @tab
5277 historic style mensural G clef @tab
5278 @code{mensural_g} @tab
5279 @quotation
5280 @lilypond[relative=1,notime]
5281 \override Staff.TimeSignature   #'transparent = ##t
5282 \clef "mensural_g" c
5283 @end lilypond
5284 @end quotation
5285
5286 @item
5287 @code{clefs-vaticana_do} @tab
5288 Editio Vaticana style do clef @tab
5289 @code{vaticana_do1}, @code{vaticana_do2}, @code{vaticana_do3} @tab
5290 @quotation
5291 @lilypond[relative=1,notime]
5292     \override Staff.StaffSymbol   #'line-count = #4
5293 \override Staff.TimeSignature   #'transparent = ##t
5294 \clef "vaticana_do2" c
5295 @end lilypond
5296 @end quotation
5297
5298 @item
5299 @code{clefs-vaticana_fa} @tab
5300 Editio Vaticana style fa clef @tab
5301 @code{vaticana_fa1}, @code{vaticana_fa2} @tab
5302 @quotation
5303 @lilypond[relative=1,notime]
5304     \override Staff.StaffSymbol   #'line-count = #4
5305 \override Staff.TimeSignature   #'transparent = ##t
5306 \clef "vaticana_fa2" c
5307 @end lilypond
5308 @end quotation
5309
5310 @item
5311 @code{clefs-medicaea_do} @tab
5312 Editio Medicaea style do clef @tab
5313 @code{medicaea_do1}, @code{medicaea_do2}, @code{medicaea_do3} @tab
5314 @quotation
5315 @lilypond[relative=1,notime]
5316     \override Staff.StaffSymbol   #'line-count = #4
5317 \override Staff.TimeSignature   #'transparent = ##t
5318 \clef "medicaea_do2" c
5319 @end lilypond
5320 @end quotation
5321
5322 @item
5323 @code{clefs-medicaea_fa} @tab
5324 Editio Medicaea style fa clef @tab
5325 @code{medicaea_fa1}, @code{medicaea_fa2} @tab
5326 @quotation
5327 @lilypond[relative=1,notime]
5328     \override Staff.StaffSymbol   #'line-count = #4
5329 \override Staff.TimeSignature   #'transparent = ##t
5330 \clef "medicaea_fa2" c
5331 @end lilypond
5332 @end quotation
5333
5334 @item
5335 @code{clefs-hufnagel_do} @tab
5336 historic style hufnagel do clef @tab
5337 @code{hufnagel_do1}, @code{hufnagel_do2}, @code{hufnagel_do3} @tab
5338 @quotation
5339 @lilypond[relative=1,notime]
5340     \override Staff.StaffSymbol   #'line-count = #4
5341 \override Staff.TimeSignature   #'transparent = ##t
5342 \clef "hufnagel_do2" c
5343 @end lilypond
5344 @end quotation
5345
5346 @item
5347 @code{clefs-hufnagel_fa} @tab
5348 historic style hufnagel fa clef @tab
5349 @code{hufnagel_fa1}, @code{hufnagel_fa2} @tab
5350 @quotation
5351 @lilypond[relative=1,notime]
5352     \override Staff.StaffSymbol   #'line-count = #4
5353 \override Staff.TimeSignature   #'transparent = ##t
5354 \clef "hufnagel_fa2" c
5355 @end lilypond
5356 @end quotation
5357
5358 @item
5359 @code{clefs-hufnagel_do_fa} @tab
5360 historic style hufnagel combined do/fa clef @tab
5361 @code{hufnagel_do_fa} @tab
5362 @quotation
5363 @lilypond[relative=1,notime]
5364 \override Staff.TimeSignature   #'transparent = ##t
5365 \clef "hufnagel_do_fa" c
5366 @end lilypond
5367 @end quotation
5368
5369 @end multitable
5370
5371
5372
5373 @emph{Modern style} means ``as is typeset in contemporary editions of
5374 transcribed mensural music''.
5375
5376 @emph{Petrucci style} means ``inspired by printings published by the
5377 famous engraver Petrucci (1466-1539)''.
5378
5379 @emph{Historic style} means ``as was typeset or written in historic
5380 editions (other than those of Petrucci)''.
5381
5382 @emph{Editio XXX style} means ``as is/was printed in Editio XXX''.
5383
5384 Petrucci used C clefs with differently balanced left-side vertical
5385 beams, depending on which staff line it is printed.
5386
5387 @seealso
5388
5389 In this manual: see @ref{Clef}.
5390
5391 @refbugs
5392
5393 The mensural g clef is mapped to the Petrucci g clef, until a new
5394 mensural g clef is implemented.
5395
5396
5397
5398 @node Ancient flags
5399 @subsection Ancient flags
5400
5401 @cindex flags
5402
5403
5404 Use the @code{flag-style} property of grob @internalsref{Stem} to
5405 select ancient flags.  Besides the @code{default} flag style,
5406  only @code{mensural} style is supported
5407
5408 @quotation
5409 @lilypond[fragment,raggedright,verbatim]
5410   \override Stem #'flag-style = #'mensural
5411   \override Stem #'thickness = #1.0
5412   \override NoteHead #'style = #'mensural
5413   \autoBeamOff
5414   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
5415   c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5416 @end lilypond
5417 @end quotation
5418
5419 Note that the innermost flare of each mensural flag always is
5420 vertically aligned with a staff line.  If you do not like this
5421 behavior, you can set the @code{adjust-if-on-staffline} property of
5422 grob @internalsref{Stem} to @code{##f}.  Then, the vertical position
5423 of the end of each flare is different between notes on staff lines and
5424 notes between staff lines
5425
5426 @quotation
5427 @lilypond[fragment,raggedright]
5428   \override Stem #'flag-style = #'mensural
5429   \override Stem #'thickness = #1.0
5430   \override Stem #'adjust-if-on-staffline = ##f
5431   \override NoteHead #'style = #'mensural
5432   \autoBeamOff
5433   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
5434   c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5435 @end lilypond
5436 @end quotation
5437
5438 There is no particular flag style for neo-mensural notation.  Hence,
5439 when typesetting e.g. the incipit of a transcribed piece of mensural
5440 music, the default flag style should be used.  There are no flags in
5441 Gregorian Chant notation.
5442
5443
5444 @node Ancient time signatures
5445 @subsection Ancient time signatures
5446
5447 @cindex time signatures
5448
5449
5450 There is limited support for mensural time signatures.   The
5451 glyphs are hard-wired to particular time fractions.  In other words,
5452 to get a particular mensural signature glyph with the @code{\time n/m}
5453 command, @code{n} and @code{m} have to be chosen according to the
5454 following table
5455
5456 @quotation
5457 @lilypond
5458 \score {
5459     \notes {
5460         \set Score.timing = ##f
5461         \set Score.barAlways = ##t
5462         s_\markup { "$\\backslash$time 4/4" }
5463          ^\markup { "       " \musicglyph #"timesig-neo_mensural4/4" }
5464         s
5465         s_\markup { "$\\backslash$time 2/2" }
5466          ^\markup { "       " \musicglyph #"timesig-neo_mensural2/2" }
5467         s
5468         s_\markup { "$\\backslash$time 6/4" }
5469          ^\markup { "       " \musicglyph #"timesig-neo_mensural6/4" }
5470         s
5471         s_\markup { "$\\backslash$time 6/8" }
5472          ^\markup { "       " \musicglyph #"timesig-neo_mensural6/8" }
5473         \break
5474         s_\markup { "$\\backslash$time 3/2" }
5475          ^\markup { "       " \musicglyph #"timesig-neo_mensural3/2" }
5476         s
5477         s_\markup { "$\\backslash$time 3/4" }
5478          ^\markup { "       " \musicglyph #"timesig-neo_mensural3/4" }
5479         s
5480         s_\markup { "$\\backslash$time 9/4" }
5481          ^\markup { "       " \musicglyph #"timesig-neo_mensural9/4" }
5482         s
5483         s_\markup { "$\\backslash$time 9/8" }
5484          ^\markup { "       " \musicglyph #"timesig-neo_mensural9/8" }
5485         \break
5486         s_\markup { "$\\backslash$time 4/8" }
5487          ^\markup { "       " \musicglyph #"timesig-neo_mensural4/8" }
5488         s
5489         s_\markup { "$\\backslash$time 2/4" }
5490          ^\markup { "       " \musicglyph #"timesig-neo_mensural2/4" }
5491         \break
5492     }
5493     \paper {
5494         indent = 0.0
5495         raggedright = ##t
5496         \context {
5497             \StaffContext
5498             \remove Staff_symbol_engraver
5499             \remove Clef_engraver
5500             \remove Time_signature_engraver
5501         }
5502     }
5503 }
5504 @end lilypond
5505 @end quotation
5506
5507 Use the @code{style} property of grob @internalsref{TimeSignature} to
5508 select ancient time signatures.  Supported styles are
5509 @code{neo_mensural} and @code{mensural}.  The above table uses the
5510 @code{neo_mensural} style.  This style is appropriate e.g. for the
5511 incipit of transcriptions of mensural pieces.  The @code{mensural}
5512 style mimics the look of historical printings of the 16th century.
5513
5514 @inputfileref{input/test,time.ly} gives an overview over all available
5515 ancient and modern styles.
5516
5517 @seealso
5518
5519 Program reference: @ref{Time signature} gives a general introduction into the use of time
5520 signatures.
5521
5522 @refbugs
5523
5524 Mensural signature glyphs are mapped to time fractions in a hard-wired
5525 way.  This mapping is sensible, but still arbitrary: given a mensural
5526 time signature, the time fraction represents a modern meter that
5527 usually will be a good choice when transcribing a mensural piece of
5528 music.  For a particular piece of mensural music, however, the mapping
5529 may be unsatisfactory.  In particular, the mapping assumes a fixed
5530 transcription of durations (e.g. brevis = half note in 2/2, i.e. 4:1).
5531 Some glyphs (such as the alternate glyph for 6/8 meter) are not at all
5532 accessible through the @code{\time} command.
5533
5534 Mensural time signatures are supported typographically, but not yet
5535 musically.  The internal representation of durations is 
5536 based on a purely binary system; a ternary division such as 1 brevis =
5537 3 semibrevis (tempus perfectum) or 1 semibrevis = 3 minima (cum
5538 prolatione maiori) is not correctly handled: event times in ternary
5539 modes will be badly computed, resulting e.g. in horizontally
5540 misaligned note heads, and bar checks are likely to erroneously fail.
5541
5542 The syntax and semantics of the @code{\time} command for mensural
5543 music is subject to change.
5544
5545 @node Custodes
5546 @subsection Custodes
5547
5548 @cindex custos
5549 @cindex custodes
5550
5551 A @emph{custos} (plural: @emph{custodes}; Latin word for `guard') is a
5552 symbol that appears at the end of a staff.  It anticipates the pitch
5553 of the first note(s) of the following line and thus helps the player
5554 or singer to manage line breaks during performance, thus enhancing
5555 readability of a score.
5556
5557 Custodes were frequently used in music notation until the 17th
5558 century.  Nowadays, they have survived only in a few particular forms
5559 of musical notation such as contemporary editions of Gregorian chant
5560 like the @emph{editio vaticana}.  There are different custos glyphs
5561 used in different flavors of notational style.
5562
5563 For typesetting custodes, just put a @internalsref{Custos_engraver} into the
5564 @internalsref{Staff} context when declaring the @code{\paper} block,
5565 as shown in the following example
5566
5567 @example
5568 \paper @{
5569   \context @{
5570      \StaffContext
5571      \consists Custos_engraver
5572      Custos \override #'style = #'mensural
5573   @}
5574 @}
5575 @end example
5576
5577 The result looks like this
5578
5579 @quotation
5580 @lilypond[raggedright]
5581 \score {
5582     \notes {
5583         a'1
5584         \override Staff.Custos #'style = #'mensural
5585         \break
5586         g'
5587     }
5588     \paper {
5589         \context {
5590             \StaffContext
5591             \consists Custos_engraver
5592         }
5593     }
5594 }
5595 @end lilypond
5596 @end quotation
5597
5598 The custos glyph is selected by the @code{style} property. The styles
5599 supported are @code{vaticana}, @code{medicaea}, @code{hufnagel} and
5600 @code{mensural}.  They are demonstrated in the following fragment
5601
5602 @quotation
5603 @lilypond
5604 \score {
5605        \new Lyrics    \lyrics {
5606         \markup {
5607             \column <
5608                 "vaticana" 
5609                 { " " \musicglyph #"custodes-vaticana-u0" }
5610             > }
5611         \markup {    \column <
5612                 "medicaea"
5613                 { " " \musicglyph #"custodes-medicaea-u0" }
5614             >}
5615             \markup {
5616             \column <
5617                 "hufnagel"
5618                 { " " \musicglyph #"custodes-hufnagel-u0" }
5619             >}
5620             \markup {
5621             \column <
5622                 "mensural"
5623                 { " " \musicglyph #"custodes-mensural-u0" }
5624             >}
5625         }
5626     
5627     \paper {
5628         raggedright = ##t 
5629         }      
5630 }
5631 @end lilypond
5632 @end quotation
5633
5634 @seealso
5635
5636 Program reference: @internalsref{Custos}.
5637
5638 Examples: @inputfileref{input/regression,custos.ly}.
5639
5640
5641 @node Divisiones
5642 @subsection Divisiones
5643
5644 @cindex divisio
5645 @cindex divisiones
5646 @cindex finalis
5647
5648 A @emph{divisio} (plural: @emph{divisiones}; Latin word for
5649 `division') is a staff context symbol that is used to structure
5650 Gregorian music into phrases and sections.  The musical meaning of
5651 @emph{divisio minima}, @emph{divisio maior} and @emph{divisio maxima}
5652 can be characterized as short, medium and long pause, somewhat like
5653 @ref{Breath marks}.  The @emph{finalis} sign not only marks the end of
5654 a chant, but is also frequently used within a single
5655 antiphonal/responsorial chant to mark the end of each section.
5656
5657
5658 To use divisiones, include the file @code{gregorian-init.ly}.  It
5659 contains definitions that you can apply by just inserting
5660 @code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
5661 and @code{\finalis} at proper places in the input.  Some editions use
5662 @emph{virgula} or @emph{caesura} instead of divisio minima.
5663 Therefore, @code{gregorian-init.ly} also defines @code{\virgula} and
5664 @code{\caesura}
5665
5666 @quotation
5667 @lilypondfile[]{divisiones.ly}
5668 @end quotation
5669
5670 @refcommands
5671
5672 @cindex @code{\virgula}
5673 @code{\virgula},
5674 @cindex @code{\caesura}
5675 @code{\caesura},
5676 @cindex @code{\divisioMinima}
5677 @code{\divisioMinima},
5678 @cindex @code{\divisioMaior}
5679 @code{\divisioMaior},
5680 @cindex @code{\divisioMaxima}
5681 @code{\divisioMaxima},
5682 @cindex @code{\finalis}
5683 @code{\finalis}.
5684
5685 @seealso
5686
5687 In this manual: @ref{Breath marks}.
5688
5689 Program reference: @internalsref{BreathingSign}, @internalsref{BreathingSignEvent}.
5690
5691 Examples: @inputfileref{input/test,divisiones.ly}.
5692
5693 @node Ligatures
5694 @subsection Ligatures
5695
5696 @cindex Ligatures
5697
5698 @c TODO: Should double check if I recalled things correctly when I wrote
5699 @c down the following paragraph by heart.
5700
5701 A ligature is a coherent graphical symbol that represents at least two
5702 distinct notes.  Ligatures originally appeared in the manuscripts of
5703 Gregorian chant notation roughly since the 9th century to denote
5704 ascending or descending sequences of notes.  
5705
5706 Ligatures are entered by enclosing them in @code{\[} and @code{\]}.
5707 Some ligature styles may need additional input syntax specific for
5708 this particular type of ligature.  By default, the
5709 @internalsref{LigatureBracket} engraver just puts a square bracket
5710 above the ligature
5711
5712 @quotation
5713 @lilypond[raggedright,verbatim]
5714 \score {
5715     \notes \transpose c c' {
5716         \[ g c a f d' \]
5717         a g f
5718         \[ e f a g \]
5719     }
5720 }
5721 @end lilypond
5722 @end quotation
5723
5724 To select a specific style of ligatures, a proper ligature engraver
5725 has to be added to the @internalsref{Voice} context, as explained in
5726 the following subsections.   Only white mensural ligatures
5727 are supported with certain limitations.
5728
5729 @menu
5730 * White mensural ligatures::    
5731 * Gregorian square neumes ligatures::  
5732 @end menu
5733
5734 @node White mensural ligatures
5735 @subsubsection White mensural ligatures
5736
5737 @cindex Mensural ligatures
5738 @cindex White mensural ligatures
5739
5740 There is limited support for white mensural ligatures.  
5741
5742 To engrave white mensural ligatures, in the paper block the
5743 @internalsref{Mensural_ligature_engraver} has to be put into the
5744 @internalsref{Voice} context, and remove the
5745 @internalsref{Ligature_bracket_engraver}
5746
5747 @example
5748     \paper @{
5749         \context @{
5750             \VoiceContext
5751             \remove Ligature_bracket_engraver
5752             \consists Mensural_ligature_engraver
5753         @}
5754     @}
5755 @end example
5756
5757 There is no additional input language to describe the shape of a
5758 white mensural ligature.  The shape is rather determined solely from
5759 the pitch and duration of the enclosed notes.  While this approach may
5760 take a new user a while to get accustomed, it has the great advantage
5761 that the full musical information of the ligature is known internally.
5762 This is not only required for correct MIDI output, but also allows for
5763 automatic transcription of the ligatures.
5764
5765 For example,
5766
5767 @example
5768         \set Score.timing = ##f
5769         \set Score.defaultBarType = "empty"
5770         \override NoteHead #'style = #'neo_mensural
5771         \override Staff.TimeSignature   #'style = #'neo_mensural
5772         \clef "petrucci_g"
5773         \[ g\longa c\breve a\breve f\breve d'\longa \]
5774         s4
5775         \[ e1 f1 a\breve g\longa \]
5776 @end example
5777 @quotation
5778 @lilypond[raggedright]
5779 \score {
5780     \notes \transpose c c' {
5781         \set Score.timing = ##f
5782         \set Score.defaultBarType = "empty"
5783         \override NoteHead #'style = #'neo_mensural
5784         \override Staff.TimeSignature   #'style = #'neo_mensural
5785         \clef "petrucci_g"
5786         \[ g\longa c\breve a\breve f\breve d'\longa \]
5787         s4
5788         \[ e1 f1 a\breve g\longa \]
5789     }
5790     \paper {
5791         \context {
5792             \VoiceContext
5793             \remove Ligature_bracket_engraver
5794             \consists Mensural_ligature_engraver
5795         }
5796     }
5797 }
5798 @end lilypond
5799 @end quotation
5800
5801 Without replacing @internalsref{Ligature_bracket_engraver} with
5802 @internalsref{Mensural_ligature_engraver}, the same music transcribes
5803 to the following
5804
5805 @quotation
5806 @lilypond[raggedright]
5807 \score {
5808     \notes \transpose c c' {
5809         \set Score.timing = ##f
5810         \set Score.defaultBarType = "empty"
5811         \override NoteHead #'style = #'neo_mensural
5812         \override Staff.TimeSignature   #'style = #'neo_mensural
5813         \clef "petrucci_g"
5814         \[ g\longa c\breve a\breve f\breve d'\longa \]
5815         s4
5816         \[ e1 f1 a\breve g\longa \]
5817     }
5818 }
5819 @end lilypond
5820 @end quotation
5821
5822 @refbugs
5823
5824 The implementation is experimental; it may output strange warnings or
5825 even crash in some cases or produce weird results on more complex
5826 ligatures.
5827
5828 @node Gregorian square neumes ligatures
5829 @subsubsection Gregorian square neumes ligatures
5830
5831 @cindex Square neumes ligatures
5832 @cindex Gregorian square neumes ligatures
5833
5834 Gregorian square neumes notation (following the style of the Editio
5835 Vaticana) is under heavy development, but not yet really usable for
5836 production purposes.  Core ligatures can already be typeset, but
5837 essential issues for serious typesetting are still under development,
5838 such as (among others) horizontal alignment of multiple ligatures,
5839 lyrics alignment and proper accidentals handling.  Still, this section
5840 gives a sneak preview of what Gregorian chant may look like once it
5841 will work.
5842
5843 The following table contains the extended neumes table of the 2nd
5844 volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
5845 1983 by the monks of Solesmes.
5846
5847 @multitable @columnfractions .4 .2 .2 .2
5848
5849 @item
5850 @b{Neuma aut@*Neumarum Elementa} @tab
5851 @b{Figurae@*Rectae} @tab
5852 @b{Figurae@*Liquescentes Auctae} @tab
5853 @b{Figurae@*Liquescentes Deminutae}
5854
5855 @c TODO: \paper block is identical in all of the below examples.
5856 @c Therefore, it should somehow be included rather than duplicated all
5857 @c the time. --jr
5858
5859 @c why not make identifiers in ly/engraver-init.ly? --hwn
5860
5861 @c Because it's just used to typeset plain notes without
5862 @c a staff for demonstration purposes rather than something
5863 @c special of Gregorian chant notation. --jr
5864
5865 @item
5866 @code{1. Punctum}
5867 @tab
5868 @quotation
5869 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.5\cm]
5870 \include "gregorian-init.ly"
5871 \score {
5872     \notes \transpose c c' {
5873         % Punctum
5874         \[ b \]
5875         \noBreak s^\markup {"a"} \noBreak
5876
5877         % Punctum Inclinatum
5878         \[ \inclinatum b \]
5879         \noBreak s^\markup {"b"}
5880     }
5881     \paper {
5882         interscoreline = 1
5883         \context {
5884             \ScoreContext
5885             \remove "Bar_number_engraver"
5886         }
5887         \context {
5888             \StaffContext
5889             \remove "Clef_engraver"
5890             \remove "Key_engraver"
5891             \override StaffSymbol #'transparent = ##t
5892             \remove "Time_signature_engraver"
5893             \remove "Bar_engraver"
5894             minimumVerticalExtent = ##f
5895         }
5896         \context {
5897             \VoiceContext
5898             \remove Ligature_bracket_engraver
5899             \consists Vaticana_ligature_engraver
5900             \override NoteHead #'style = #'vaticana_punctum
5901             \override Stem #'transparent = ##t
5902         }
5903     }
5904 }
5905 @end lilypond
5906 @end quotation
5907 @tab
5908 @quotation
5909 @lilypond[noindent,staffsize=26,nofragment,linewidth=2.5\cm]
5910 \include "gregorian-init.ly"
5911 \score {
5912     \notes \transpose c c' {
5913         % Punctum Auctum Ascendens
5914         \[ \auctum \ascendens b \]
5915         \noBreak s^\markup {"c"} \noBreak
5916
5917         % Punctum Auctum Descendens
5918         \[ \auctum \descendens b \]
5919         \noBreak s^\markup {"d"} \noBreak
5920
5921         % Punctum Inclinatum Auctum
5922         \[ \inclinatum \auctum b \]
5923         \noBreak s^\markup {"e"}
5924     }
5925     \paper {
5926         interscoreline = 1
5927         \context {
5928             \ScoreContext
5929             \remove "Bar_number_engraver"
5930         }
5931         \context {
5932             \StaffContext
5933             \remove "Clef_engraver"
5934             \remove "Key_engraver"
5935             \override StaffSymbol #'transparent = ##t
5936             \remove "Time_signature_engraver"
5937             \remove "Bar_engraver"
5938             minimumVerticalExtent = ##f
5939         }
5940         \context {
5941             \VoiceContext
5942             \remove Ligature_bracket_engraver
5943             \consists Vaticana_ligature_engraver
5944             \override NoteHead #'style = #'vaticana_punctum
5945             \override Stem #'transparent = ##t
5946         }
5947     }
5948 }
5949 @end lilypond
5950 @end quotation
5951 @tab
5952 @quotation
5953 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5954 \include "gregorian-init.ly"
5955 \score {
5956     \notes \transpose c c' {
5957         % Punctum Inclinatum Parvum
5958         \[ \inclinatum \deminutum b \]
5959         \noBreak s^\markup {"f"}
5960     }
5961     \paper {
5962         interscoreline = 1
5963         \context {
5964             \ScoreContext
5965             \remove "Bar_number_engraver"
5966         }
5967         \context {
5968             \StaffContext
5969             \remove "Clef_engraver"
5970             \remove "Key_engraver"
5971             \override StaffSymbol #'transparent = ##t
5972             \remove "Time_signature_engraver"
5973             \remove "Bar_engraver"
5974             minimumVerticalExtent = ##f
5975         }
5976         \context {
5977             \VoiceContext
5978             \remove Ligature_bracket_engraver
5979             \consists Vaticana_ligature_engraver
5980             \override NoteHead #'style = #'vaticana_punctum
5981             \override Stem #'transparent = ##t
5982         }
5983     }
5984 }
5985 @end lilypond
5986 @end quotation
5987
5988 @item
5989 @code{2. Virga}
5990 @tab
5991 @quotation
5992 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
5993 \include "gregorian-init.ly"
5994 \score {
5995     \notes \transpose c c' {
5996         % Virga
5997         \[ \virga b \]
5998         \noBreak s^\markup {"g"}
5999     }
6000     \paper {
6001         interscoreline = 1
6002         \context {
6003             \ScoreContext
6004             \remove "Bar_number_engraver"
6005         }
6006         \context {
6007             \StaffContext
6008             \remove "Clef_engraver"
6009             \remove "Key_engraver"
6010             \override StaffSymbol #'transparent = ##t
6011             \remove "Time_signature_engraver"
6012             \remove "Bar_engraver"
6013             minimumVerticalExtent = ##f
6014         }
6015         \context {
6016             \VoiceContext
6017             \remove Ligature_bracket_engraver
6018             \consists Vaticana_ligature_engraver
6019             \override NoteHead #'style = #'vaticana_punctum
6020             \override Stem #'transparent = ##t
6021         }
6022     }
6023 }
6024 @end lilypond
6025 @end quotation
6026 @tab
6027 @tab
6028
6029 @item
6030 @code{3. Apostropha vel Stropha}
6031 @tab
6032 @quotation
6033 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6034 \include "gregorian-init.ly"
6035 \score {
6036     \notes \transpose c c' {
6037         % Stropha
6038         \[ \stropha b \]
6039         \noBreak s^\markup {"h"}
6040     }
6041     \paper {
6042         interscoreline = 1
6043         \context {
6044             \ScoreContext
6045             \remove "Bar_number_engraver"
6046         }
6047         \context {
6048             \StaffContext
6049             \remove "Clef_engraver"
6050             \remove "Key_engraver"
6051             \override StaffSymbol #'transparent = ##t
6052             \remove "Time_signature_engraver"
6053             \remove "Bar_engraver"
6054             minimumVerticalExtent = ##f
6055         }
6056         \context {
6057             \VoiceContext
6058             \remove Ligature_bracket_engraver
6059             \consists Vaticana_ligature_engraver
6060             \override NoteHead #'style = #'vaticana_punctum
6061             \override Stem #'transparent = ##t
6062         }
6063     }
6064 }
6065 @end lilypond
6066 @end quotation
6067 @tab
6068 @quotation
6069 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6070 \include "gregorian-init.ly"
6071 \score {
6072     \notes \transpose c c' {
6073         % Stropha Aucta
6074         \[ \stropha \auctum b \]
6075         \noBreak s^\markup {"i"}
6076     }
6077     \paper {
6078         interscoreline = 1
6079         \context {
6080             \ScoreContext
6081             \remove "Bar_number_engraver"
6082         }
6083         \context {
6084             \StaffContext
6085             \remove "Clef_engraver"
6086             \remove "Key_engraver"
6087             \override StaffSymbol #'transparent = ##t
6088             \remove "Time_signature_engraver"
6089             \remove "Bar_engraver"
6090             minimumVerticalExtent = ##f
6091         }
6092         \context {
6093             \VoiceContext
6094             \remove Ligature_bracket_engraver
6095             \consists Vaticana_ligature_engraver
6096             \override NoteHead #'style = #'vaticana_punctum
6097             \override Stem #'transparent = ##t
6098         }
6099     }
6100 }
6101 @end lilypond
6102 @end quotation
6103 @tab
6104
6105 @item
6106 @code{4. Oriscus}
6107 @tab
6108 @quotation
6109 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6110 \include "gregorian-init.ly"
6111 \score {
6112     \notes \transpose c c' {
6113         % Oriscus
6114         \[ \oriscus b \]
6115         \noBreak s^\markup {"j"}
6116     }
6117     \paper {
6118         interscoreline = 1
6119         \context {
6120             \ScoreContext
6121             \remove "Bar_number_engraver"
6122         }
6123         \context {
6124             \StaffContext
6125             \remove "Clef_engraver"
6126             \remove "Key_engraver"
6127             \override StaffSymbol #'transparent = ##t
6128             \remove "Time_signature_engraver"
6129             \remove "Bar_engraver"
6130             minimumVerticalExtent = ##f
6131         }
6132         \context {
6133             \VoiceContext
6134             \remove Ligature_bracket_engraver
6135             \consists Vaticana_ligature_engraver
6136             \override NoteHead #'style = #'vaticana_punctum
6137             \override Stem #'transparent = ##t
6138         }
6139     }
6140 }
6141 @end lilypond
6142 @end quotation
6143 @tab
6144 @tab
6145
6146 @item
6147 @code{5. Clivis vel Flexa}
6148 @tab
6149 @quotation
6150 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6151 \include "gregorian-init.ly"
6152 \score {
6153     \notes \transpose c c' {
6154         % Clivis vel Flexa
6155         \[ b \flexa g \]
6156         s^\markup {"k"}
6157     }
6158     \paper {
6159         interscoreline = 1
6160         \context {
6161             \ScoreContext
6162             \remove "Bar_number_engraver"
6163         }
6164         \context {
6165             \StaffContext
6166             \remove "Clef_engraver"
6167             \remove "Key_engraver"
6168             \override StaffSymbol #'transparent = ##t
6169             \remove "Time_signature_engraver"
6170             \remove "Bar_engraver"
6171             minimumVerticalExtent = ##f
6172         }
6173         \context {
6174             \VoiceContext
6175             \remove Ligature_bracket_engraver
6176             \consists Vaticana_ligature_engraver
6177             \override NoteHead #'style = #'vaticana_punctum
6178             \override Stem #'transparent = ##t
6179         }
6180     }
6181 }
6182 @end lilypond
6183 @end quotation
6184 @tab
6185 @quotation
6186 @lilypond[noindent,staffsize=26,nofragment,linewidth=2.0\cm]
6187 \include "gregorian-init.ly"
6188 \score {
6189     \notes \transpose c c' {
6190         % Clivis Aucta Descendens
6191         \[ b \flexa \auctum \descendens g \]
6192         \noBreak s^\markup {"l"} \noBreak
6193
6194         % Clivis Aucta Ascendens
6195         \[ b \flexa \auctum \ascendens g \]
6196         \noBreak s^\markup {"m"}
6197     }
6198     \paper {
6199         interscoreline = 1
6200         \context {
6201             \ScoreContext
6202             \remove "Bar_number_engraver"
6203         }
6204         \context {
6205             \StaffContext
6206             \remove "Clef_engraver"
6207             \remove "Key_engraver"
6208             \override StaffSymbol #'transparent = ##t
6209             \remove "Time_signature_engraver"
6210             \remove "Bar_engraver"
6211             minimumVerticalExtent = ##f
6212         }
6213         \context {
6214             \VoiceContext
6215             \remove Ligature_bracket_engraver
6216             \consists Vaticana_ligature_engraver
6217             \override NoteHead #'style = #'vaticana_punctum
6218             \override Stem #'transparent = ##t
6219         }
6220     }
6221 }
6222 @end lilypond
6223 @end quotation
6224 @tab
6225 @quotation
6226 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6227 \include "gregorian-init.ly"
6228 \score {
6229     \notes \transpose c c' {
6230         % Cephalicus
6231         \[ b \flexa \deminutum g \]
6232         s^\markup {"n"}
6233     }
6234     \paper {
6235         interscoreline = 1
6236         \context {
6237             \ScoreContext
6238             \remove "Bar_number_engraver"
6239         }
6240         \context {
6241             \StaffContext
6242             \remove "Clef_engraver"
6243             \remove "Key_engraver"
6244             \override StaffSymbol #'transparent = ##t
6245             \remove "Time_signature_engraver"
6246             \remove "Bar_engraver"
6247             minimumVerticalExtent = ##f
6248         }
6249         \context {
6250             \VoiceContext
6251             \remove Ligature_bracket_engraver
6252             \consists Vaticana_ligature_engraver
6253             \override NoteHead #'style = #'vaticana_punctum
6254             \override Stem #'transparent = ##t
6255         }
6256     }
6257 }
6258 @end lilypond
6259 @end quotation
6260
6261 @item
6262 @code{6. Podatus vel Pes}
6263 @tab
6264 @quotation
6265 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6266 \include "gregorian-init.ly"
6267 \score {
6268     \notes \transpose c c' {
6269         % Podatus vel Pes
6270         \[ g \pes b \]
6271         s^\markup {"o"}
6272     }
6273     \paper {
6274         interscoreline = 1
6275         \context {
6276             \ScoreContext
6277             \remove "Bar_number_engraver"
6278         }
6279         \context {
6280             \StaffContext
6281             \remove "Clef_engraver"
6282             \remove "Key_engraver"
6283             \override StaffSymbol #'transparent = ##t
6284             \remove "Time_signature_engraver"
6285             \remove "Bar_engraver"
6286             minimumVerticalExtent = ##f
6287         }
6288         \context {
6289             \VoiceContext
6290             \remove Ligature_bracket_engraver
6291             \consists Vaticana_ligature_engraver
6292             \override NoteHead #'style = #'vaticana_punctum
6293             \override Stem #'transparent = ##t
6294         }
6295     }
6296 }
6297 @end lilypond
6298 @end quotation
6299 @tab
6300 @quotation
6301 @lilypond[noindent,staffsize=26,nofragment,linewidth=2.0\cm]
6302 \include "gregorian-init.ly"
6303 \score {
6304     \notes \transpose c c' {
6305         % Pes Auctus Descendens
6306         \[ g \pes \auctum \descendens b \]
6307         \noBreak s^\markup {"p"} \noBreak
6308
6309         % Pes Auctus Ascendens
6310         \[ g \pes \auctum \ascendens b \]
6311         \noBreak s^\markup {"q"}
6312     }
6313     \paper {
6314         interscoreline = 1
6315         \context {
6316             \ScoreContext
6317             \remove "Bar_number_engraver"
6318         }
6319         \context {
6320             \StaffContext
6321             \remove "Clef_engraver"
6322             \remove "Key_engraver"
6323             \override StaffSymbol #'transparent = ##t
6324             \remove "Time_signature_engraver"
6325             \remove "Bar_engraver"
6326             minimumVerticalExtent = ##f
6327         }
6328         \context {
6329             \VoiceContext
6330             \remove Ligature_bracket_engraver
6331             \consists Vaticana_ligature_engraver
6332             \override NoteHead #'style = #'vaticana_punctum
6333             \override Stem #'transparent = ##t
6334         }
6335     }
6336 }
6337 @end lilypond
6338 @end quotation
6339 @tab
6340 @quotation
6341 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6342 \include "gregorian-init.ly"
6343 \score {
6344     \notes \transpose c c' {
6345         % Epiphonus
6346         \[ g \pes \deminutum b \]
6347         s^\markup {"r"}
6348     }
6349     \paper {
6350         interscoreline = 1
6351         \context {
6352             \ScoreContext
6353             \remove "Bar_number_engraver"
6354         }
6355         \context {
6356             \StaffContext
6357             \remove "Clef_engraver"
6358             \remove "Key_engraver"
6359             \override StaffSymbol #'transparent = ##t
6360             \remove "Time_signature_engraver"
6361             \remove "Bar_engraver"
6362             minimumVerticalExtent = ##f
6363         }
6364         \context {
6365             \VoiceContext
6366             \remove Ligature_bracket_engraver
6367             \consists Vaticana_ligature_engraver
6368             \override NoteHead #'style = #'vaticana_punctum
6369             \override Stem #'transparent = ##t
6370         }
6371     }
6372 }
6373 @end lilypond
6374 @end quotation
6375
6376 @item
6377 @code{7. Pes Quassus}
6378 @tab
6379 @quotation
6380 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6381 \include "gregorian-init.ly"
6382 \score {
6383     \notes \transpose c c' {
6384         % Pes Quassus
6385         \[ \oriscus g \pes \virga b \]
6386         s^\markup {"s"}
6387     }
6388     \paper {
6389         interscoreline = 1
6390         \context {
6391             \ScoreContext
6392             \remove "Bar_number_engraver"
6393         }
6394         \context {
6395             \StaffContext
6396             \remove "Clef_engraver"
6397             \remove "Key_engraver"
6398             \override StaffSymbol #'transparent = ##t
6399             \remove "Time_signature_engraver"
6400             \remove "Bar_engraver"
6401             minimumVerticalExtent = ##f
6402         }
6403         \context {
6404             \VoiceContext
6405             \remove Ligature_bracket_engraver
6406             \consists Vaticana_ligature_engraver
6407             \override NoteHead #'style = #'vaticana_punctum
6408             \override Stem #'transparent = ##t
6409         }
6410     }
6411 }
6412 @end lilypond
6413 @end quotation
6414 @tab
6415 @quotation
6416 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6417 \include "gregorian-init.ly"
6418 \score {
6419     \notes \transpose c c' {
6420         % Pes Quassus Auctus Descendens
6421         \[ \oriscus g \pes \auctum \descendens b \]
6422         s^\markup {"t"}
6423     }
6424     \paper {
6425         interscoreline = 1
6426         \context {
6427             \ScoreContext
6428             \remove "Bar_number_engraver"
6429         }
6430         \context {
6431             \StaffContext
6432             \remove "Clef_engraver"
6433             \remove "Key_engraver"
6434             \override StaffSymbol #'transparent = ##t
6435             \remove "Time_signature_engraver"
6436             \remove "Bar_engraver"
6437             minimumVerticalExtent = ##f
6438         }
6439         \context {
6440             \VoiceContext
6441             \remove Ligature_bracket_engraver
6442             \consists Vaticana_ligature_engraver
6443             \override NoteHead #'style = #'vaticana_punctum
6444             \override Stem #'transparent = ##t
6445         }
6446     }
6447 }
6448 @end lilypond
6449 @end quotation
6450 @tab
6451
6452 @item
6453 @code{8. Quilisma Pes}
6454 @tab
6455 @quotation
6456 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6457 \include "gregorian-init.ly"
6458 \score {
6459     \notes \transpose c c' {
6460         % Quilisma Pes
6461         \[ \quilisma g \pes b \]
6462         s^\markup {"u"}
6463     }
6464     \paper {
6465         interscoreline = 1
6466         \context {
6467             \ScoreContext
6468             \remove "Bar_number_engraver"
6469         }
6470         \context {
6471             \StaffContext
6472             \remove "Clef_engraver"
6473             \remove "Key_engraver"
6474             \override StaffSymbol #'transparent = ##t
6475             \remove "Time_signature_engraver"
6476             \remove "Bar_engraver"
6477             minimumVerticalExtent = ##f
6478         }
6479         \context {
6480             \VoiceContext
6481             \remove Ligature_bracket_engraver
6482             \consists Vaticana_ligature_engraver
6483             \override NoteHead #'style = #'vaticana_punctum
6484             \override Stem #'transparent = ##t
6485         }
6486     }
6487 }
6488 @end lilypond
6489 @end quotation
6490 @tab
6491 @quotation
6492 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6493 \include "gregorian-init.ly"
6494 \score {
6495     \notes \transpose c c' {
6496         % Quilisma Pes Auctus Descendens
6497         \[ \quilisma g \pes \auctum \descendens b \]
6498         s^\markup {"v"}
6499     }
6500     \paper {
6501         interscoreline = 1
6502         \context {
6503             \ScoreContext
6504             \remove "Bar_number_engraver"
6505         }
6506         \context {
6507             \StaffContext
6508             \remove "Clef_engraver"
6509             \remove "Key_engraver"
6510             \override StaffSymbol #'transparent = ##t
6511             \remove "Time_signature_engraver"
6512             \remove "Bar_engraver"
6513             minimumVerticalExtent = ##f
6514         }
6515         \context {
6516             \VoiceContext
6517             \remove Ligature_bracket_engraver
6518             \consists Vaticana_ligature_engraver
6519             \override NoteHead #'style = #'vaticana_punctum
6520             \override Stem #'transparent = ##t
6521         }
6522     }
6523 }
6524 @end lilypond
6525 @end quotation
6526 @tab
6527
6528 @item
6529 @code{9. Podatus Initio Debilis}
6530 @tab
6531 @quotation
6532 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6533 \include "gregorian-init.ly"
6534 \score {
6535     \notes \transpose c c' {
6536         % Pes Initio Debilis
6537         \[ \deminutum g \pes b \]
6538         s^\markup {"w"}
6539     }
6540     \paper {
6541         interscoreline = 1
6542         \context {
6543             \ScoreContext
6544             \remove "Bar_number_engraver"
6545         }
6546         \context {
6547             \StaffContext
6548             \remove "Clef_engraver"
6549             \remove "Key_engraver"
6550             \override StaffSymbol #'transparent = ##t
6551             \remove "Time_signature_engraver"
6552             \remove "Bar_engraver"
6553             minimumVerticalExtent = ##f
6554         }
6555         \context {
6556             \VoiceContext
6557             \remove Ligature_bracket_engraver
6558             \consists Vaticana_ligature_engraver
6559             \override NoteHead #'style = #'vaticana_punctum
6560             \override Stem #'transparent = ##t
6561         }
6562     }
6563 }
6564 @end lilypond
6565 @end quotation
6566 @tab
6567 @quotation
6568 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6569 \include "gregorian-init.ly"
6570 \score {
6571     \notes \transpose c c' {
6572         % Pes Auctus Descendens Initio Debilis
6573         \[ \deminutum g \pes \auctum \descendens b \]
6574         s^\markup {"x"}
6575     }
6576     \paper {
6577         interscoreline = 1
6578         \context {
6579             \ScoreContext
6580             \remove "Bar_number_engraver"
6581         }
6582         \context {
6583             \StaffContext
6584             \remove "Clef_engraver"
6585             \remove "Key_engraver"
6586             \override StaffSymbol #'transparent = ##t
6587             \remove "Time_signature_engraver"
6588             \remove "Bar_engraver"
6589             minimumVerticalExtent = ##f
6590         }
6591         \context {
6592             \VoiceContext
6593             \remove Ligature_bracket_engraver
6594             \consists Vaticana_ligature_engraver
6595             \override NoteHead #'style = #'vaticana_punctum
6596             \override Stem #'transparent = ##t
6597         }
6598     }
6599 }
6600 @end lilypond
6601 @end quotation
6602 @tab
6603
6604 @item
6605 @code{10. Torculus}
6606 @tab
6607 @quotation
6608 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6609 \include "gregorian-init.ly"
6610 \score {
6611     \notes \transpose c c' {
6612         % Torculus
6613         \[ a \pes b \flexa g \]
6614         s^\markup {"y"}
6615     }
6616     \paper {
6617         interscoreline = 1
6618         \context {
6619             \ScoreContext
6620             \remove "Bar_number_engraver"
6621         }
6622         \context {
6623             \StaffContext
6624             \remove "Clef_engraver"
6625             \remove "Key_engraver"
6626             \override StaffSymbol #'transparent = ##t
6627             \remove "Time_signature_engraver"
6628             \remove "Bar_engraver"
6629             minimumVerticalExtent = ##f
6630         }
6631         \context {
6632             \VoiceContext
6633             \remove Ligature_bracket_engraver
6634             \consists Vaticana_ligature_engraver
6635             \override NoteHead #'style = #'vaticana_punctum
6636             \override Stem #'transparent = ##t
6637         }
6638     }
6639 }
6640 @end lilypond
6641 @end quotation
6642 @tab
6643 @quotation
6644 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6645 \include "gregorian-init.ly"
6646 \score {
6647     \notes \transpose c c' {
6648         % Torculus Auctus Descendens
6649         \[ a \pes b \flexa \auctum \descendens g \]
6650         s^\markup {"z"}
6651     }
6652     \paper {
6653         interscoreline = 1
6654         \context {
6655             \ScoreContext
6656             \remove "Bar_number_engraver"
6657         }
6658         \context {
6659             \StaffContext
6660             \remove "Clef_engraver"
6661             \remove "Key_engraver"
6662             \override StaffSymbol #'transparent = ##t
6663             \remove "Time_signature_engraver"
6664             \remove "Bar_engraver"
6665             minimumVerticalExtent = ##f
6666         }
6667         \context {
6668             \VoiceContext
6669             \remove Ligature_bracket_engraver
6670             \consists Vaticana_ligature_engraver
6671             \override NoteHead #'style = #'vaticana_punctum
6672             \override Stem #'transparent = ##t
6673         }
6674     }
6675 }
6676 @end lilypond
6677 @end quotation
6678 @tab
6679 @quotation
6680 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6681 \include "gregorian-init.ly"
6682 \score {
6683     \notes \transpose c c' {
6684         % Torculus Deminutus
6685         \[ a \pes b \flexa \deminutum g \]
6686         s^\markup {"A"}
6687     }
6688     \paper {
6689         interscoreline = 1
6690         \context {
6691             \ScoreContext
6692             \remove "Bar_number_engraver"
6693         }
6694         \context {
6695             \StaffContext
6696             \remove "Clef_engraver"
6697             \remove "Key_engraver"
6698             \override StaffSymbol #'transparent = ##t
6699             \remove "Time_signature_engraver"
6700             \remove "Bar_engraver"
6701             minimumVerticalExtent = ##f
6702         }
6703         \context {
6704             \VoiceContext
6705             \remove Ligature_bracket_engraver
6706             \consists Vaticana_ligature_engraver
6707             \override NoteHead #'style = #'vaticana_punctum
6708             \override Stem #'transparent = ##t
6709         }
6710     }
6711 }
6712 @end lilypond
6713 @end quotation
6714
6715 @item
6716 @code{11. Torculus Initio Debilis}
6717 @tab
6718 @quotation
6719 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6720 \include "gregorian-init.ly"
6721 \score {
6722     \notes \transpose c c' {
6723         % Torculus Initio Debilis
6724         \[ \deminutum a \pes b \flexa g \]
6725         s^\markup {"B"}
6726     }
6727     \paper {
6728         interscoreline = 1
6729         \context {
6730             \ScoreContext
6731             \remove "Bar_number_engraver"
6732         }
6733         \context {
6734             \StaffContext
6735             \remove "Clef_engraver"
6736             \remove "Key_engraver"
6737             \override StaffSymbol #'transparent = ##t
6738             \remove "Time_signature_engraver"
6739             \remove "Bar_engraver"
6740             minimumVerticalExtent = ##f
6741         }
6742         \context {
6743             \VoiceContext
6744             \remove Ligature_bracket_engraver
6745             \consists Vaticana_ligature_engraver
6746             \override NoteHead #'style = #'vaticana_punctum
6747             \override Stem #'transparent = ##t
6748         }
6749     }
6750 }
6751 @end lilypond
6752 @end quotation
6753 @tab
6754 @quotation
6755 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6756 \include "gregorian-init.ly"
6757 \score {
6758     \notes \transpose c c' {
6759         % Torculus Auctus Descendens Initio Debilis
6760         \[ \deminutum a \pes b \flexa \auctum \descendens g \]
6761         s^\markup {"C"}
6762     }
6763     \paper {
6764         interscoreline = 1
6765         \context {
6766             \ScoreContext
6767             \remove "Bar_number_engraver"
6768         }
6769         \context {
6770             \StaffContext
6771             \remove "Clef_engraver"
6772             \remove "Key_engraver"
6773             \override StaffSymbol #'transparent = ##t
6774             \remove "Time_signature_engraver"
6775             \remove "Bar_engraver"
6776             minimumVerticalExtent = ##f
6777         }
6778         \context {
6779             \VoiceContext
6780             \remove Ligature_bracket_engraver
6781             \consists Vaticana_ligature_engraver
6782             \override NoteHead #'style = #'vaticana_punctum
6783             \override Stem #'transparent = ##t
6784         }
6785     }
6786 }
6787 @end lilypond
6788 @end quotation
6789 @tab
6790 @quotation
6791 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6792 \include "gregorian-init.ly"
6793 \score {
6794     \notes \transpose c c' {
6795         % Torculus Deminutus Initio Debilis
6796         \[ \deminutum a \pes b \flexa \deminutum g \]
6797         s^\markup {"D"}
6798     }
6799     \paper {
6800         interscoreline = 1
6801         \context {
6802             \ScoreContext
6803             \remove "Bar_number_engraver"
6804         }
6805         \context {
6806             \StaffContext
6807             \remove "Clef_engraver"
6808             \remove "Key_engraver"
6809             \override StaffSymbol #'transparent = ##t
6810             \remove "Time_signature_engraver"
6811             \remove "Bar_engraver"
6812             minimumVerticalExtent = ##f
6813         }
6814         \context {
6815             \VoiceContext
6816             \remove Ligature_bracket_engraver
6817             \consists Vaticana_ligature_engraver
6818             \override NoteHead #'style = #'vaticana_punctum
6819             \override Stem #'transparent = ##t
6820         }
6821     }
6822 }
6823 @end lilypond
6824 @end quotation
6825
6826 @item
6827 @code{12. Porrectus}
6828 @tab
6829 @quotation
6830 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6831 \include "gregorian-init.ly"
6832 \score {
6833     \notes \transpose c c' {
6834         % Porrectus
6835         \[ a \flexa g \pes b \]
6836         s^\markup {"E"}
6837     }
6838     \paper {
6839         interscoreline = 1
6840         \context {
6841             \ScoreContext
6842             \remove "Bar_number_engraver"
6843         }
6844         \context {
6845             \StaffContext
6846             \remove "Clef_engraver"
6847             \remove "Key_engraver"
6848             \override StaffSymbol #'transparent = ##t
6849             \remove "Time_signature_engraver"
6850             \remove "Bar_engraver"
6851             minimumVerticalExtent = ##f
6852         }
6853         \context {
6854             \VoiceContext
6855             \remove Ligature_bracket_engraver
6856             \consists Vaticana_ligature_engraver
6857             \override NoteHead #'style = #'vaticana_punctum
6858             \override Stem #'transparent = ##t
6859         }
6860     }
6861 }
6862 @end lilypond
6863 @end quotation
6864 @tab
6865 @quotation
6866 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6867 \include "gregorian-init.ly"
6868 \score {
6869     \notes \transpose c c' {
6870         % Porrectus Auctus Descendens
6871         \[ a \flexa g \pes \auctum \descendens b \]
6872         s^\markup {"F"}
6873     }
6874     \paper {
6875         interscoreline = 1
6876         \context {
6877             \ScoreContext
6878             \remove "Bar_number_engraver"
6879         }
6880         \context {
6881             \StaffContext
6882             \remove "Clef_engraver"
6883             \remove "Key_engraver"
6884             \override StaffSymbol #'transparent = ##t
6885             \remove "Time_signature_engraver"
6886             \remove "Bar_engraver"
6887             minimumVerticalExtent = ##f
6888         }
6889         \context {
6890             \VoiceContext
6891             \remove Ligature_bracket_engraver
6892             \consists Vaticana_ligature_engraver
6893             \override NoteHead #'style = #'vaticana_punctum
6894             \override Stem #'transparent = ##t
6895         }
6896     }
6897 }
6898 @end lilypond
6899 @end quotation
6900 @tab
6901 @quotation
6902 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6903 \include "gregorian-init.ly"
6904 \score {
6905     \notes \transpose c c' {
6906         % Porrectus Deminutus
6907         \[ a \flexa g \pes \deminutum b \]
6908         s^\markup {"G"}
6909     }
6910     \paper {
6911         interscoreline = 1
6912         \context {
6913             \ScoreContext
6914             \remove "Bar_number_engraver"
6915         }
6916         \context {
6917             \StaffContext
6918             \remove "Clef_engraver"
6919             \remove "Key_engraver"
6920             \override StaffSymbol #'transparent = ##t
6921             \remove "Time_signature_engraver"
6922             \remove "Bar_engraver"
6923             minimumVerticalExtent = ##f
6924         }
6925         \context {
6926             \VoiceContext
6927             \remove Ligature_bracket_engraver
6928             \consists Vaticana_ligature_engraver
6929             \override NoteHead #'style = #'vaticana_punctum
6930             \override Stem #'transparent = ##t
6931         }
6932     }
6933 }
6934 @end lilypond
6935 @end quotation
6936
6937 @item
6938 @code{13. Climacus}
6939 @tab
6940 @quotation
6941 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6942 \include "gregorian-init.ly"
6943 \score {
6944     \notes \transpose c c' {
6945         % Climacus
6946         \[ \virga b \inclinatum a \inclinatum g \]
6947         s^\markup {"H"}
6948     }
6949     \paper {
6950         interscoreline = 1
6951         \context {
6952             \ScoreContext
6953             \remove "Bar_number_engraver"
6954         }
6955         \context {
6956             \StaffContext
6957             \remove "Clef_engraver"
6958             \remove "Key_engraver"
6959             \override StaffSymbol #'transparent = ##t
6960             \remove "Time_signature_engraver"
6961             \remove "Bar_engraver"
6962             minimumVerticalExtent = ##f
6963         }
6964         \context {
6965             \VoiceContext
6966             \remove Ligature_bracket_engraver
6967             \consists Vaticana_ligature_engraver
6968             \override NoteHead #'style = #'vaticana_punctum
6969             \override Stem #'transparent = ##t
6970         }
6971     }
6972 }
6973 @end lilypond
6974 @end quotation
6975 @tab
6976 @quotation
6977 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6978 \include "gregorian-init.ly"
6979 \score {
6980     \notes \transpose c c' {
6981         % Climacus Auctus
6982         \[ \virga b \inclinatum a \inclinatum \auctum g \]
6983         s^\markup {"I"}
6984     }
6985     \paper {
6986         interscoreline = 1
6987         \context {
6988             \ScoreContext
6989             \remove "Bar_number_engraver"
6990         }
6991         \context {
6992             \StaffContext
6993             \remove "Clef_engraver"
6994             \remove "Key_engraver"
6995             \override StaffSymbol #'transparent = ##t
6996             \remove "Time_signature_engraver"
6997             \remove "Bar_engraver"
6998             minimumVerticalExtent = ##f
6999         }
7000         \context {
7001             \VoiceContext
7002             \remove Ligature_bracket_engraver
7003             \consists Vaticana_ligature_engraver
7004             \override NoteHead #'style = #'vaticana_punctum
7005             \override Stem #'transparent = ##t
7006         }
7007     }
7008 }
7009 @end lilypond
7010 @end quotation
7011 @tab
7012 @quotation
7013 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
7014 \include "gregorian-init.ly"
7015 \score {
7016     \notes \transpose c c' {
7017         % Climacus Deminutus
7018         \[ \virga b \inclinatum a \inclinatum \deminutum g \]
7019         s^\markup {"J"}
7020     }
7021     \paper {
7022         interscoreline = 1
7023         \context {
7024             \ScoreContext
7025             \remove "Bar_number_engraver"
7026         }
7027         \context {
7028             \StaffContext
7029             \remove "Clef_engraver"
7030             \remove "Key_engraver"
7031             \override StaffSymbol #'transparent = ##t
7032             \remove "Time_signature_engraver"
7033             \remove "Bar_engraver"
7034             minimumVerticalExtent = ##f
7035         }
7036         \context {
7037             \VoiceContext
7038             \remove Ligature_bracket_engraver
7039             \consists Vaticana_ligature_engraver
7040             \override NoteHead #'style = #'vaticana_punctum
7041             \override Stem #'transparent = ##t
7042         }
7043     }
7044 }
7045 @end lilypond
7046 @end quotation
7047
7048 @item
7049 @code{14. Scandicus}
7050 @tab
7051 @quotation
7052 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
7053 \include "gregorian-init.ly"
7054 \score {
7055     \notes \transpose c c' {
7056         % Scandicus
7057         \[ g \pes a \virga b \]
7058         s^\markup {"K"}
7059     }
7060     \paper {
7061         interscoreline = 1
7062         \context {
7063             \ScoreContext
7064             \remove "Bar_number_engraver"
7065         }
7066         \context {
7067             \StaffContext
7068             \remove "Clef_engraver"
7069             \remove "Key_engraver"
7070             \override StaffSymbol #'transparent = ##t
7071             \remove "Time_signature_engraver"
7072             \remove "Bar_engraver"
7073             minimumVerticalExtent = ##f
7074         }
7075         \context {
7076             \VoiceContext
7077             \remove Ligature_bracket_engraver
7078             \consists Vaticana_ligature_engraver
7079             \override NoteHead #'style = #'vaticana_punctum
7080             \override Stem #'transparent = ##t
7081         }
7082     }
7083 }
7084 @end lilypond
7085 @end quotation
7086 @tab
7087 @quotation
7088 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
7089 \include "gregorian-init.ly"
7090 \score {
7091     \notes \transpose c c' {
7092         % Scandicus Auctus Descendens
7093         \[ g \pes a \pes \auctum \descendens b \]
7094         s^\markup {"L"}
7095     }
7096     \paper {
7097         interscoreline = 1
7098         \context {
7099             \ScoreContext
7100             \remove "Bar_number_engraver"
7101         }
7102         \context {
7103             \StaffContext
7104             \remove "Clef_engraver"
7105             \remove "Key_engraver"
7106             \override StaffSymbol #'transparent = ##t
7107             \remove "Time_signature_engraver"
7108             \remove "Bar_engraver"
7109             minimumVerticalExtent = ##f
7110         }
7111         \context {
7112             \VoiceContext
7113             \remove Ligature_bracket_engraver
7114             \consists Vaticana_ligature_engraver
7115             \override NoteHead #'style = #'vaticana_punctum
7116             \override Stem #'transparent = ##t
7117         }
7118     }
7119 }
7120 @end lilypond
7121 @end quotation
7122 @tab
7123 @quotation
7124 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
7125 \include "gregorian-init.ly"
7126 \score {
7127     \notes \transpose c c' {
7128         % Scandicus Deminutus
7129         \[ g \pes a \pes \deminutum b \]
7130         s^\markup {"M"}
7131     }
7132     \paper {
7133         interscoreline = 1
7134         \context {
7135             \ScoreContext
7136             \remove "Bar_number_engraver"
7137         }
7138         \context {
7139             \StaffContext
7140             \remove "Clef_engraver"
7141             \remove "Key_engraver"
7142             \override StaffSymbol #'transparent = ##t
7143             \remove "Time_signature_engraver"
7144             \remove "Bar_engraver"
7145             minimumVerticalExtent = ##f
7146         }
7147         \context {
7148             \VoiceContext
7149             \remove Ligature_bracket_engraver
7150             \consists Vaticana_ligature_engraver
7151             \override NoteHead #'style = #'vaticana_punctum
7152             \override Stem #'transparent = ##t
7153         }
7154     }
7155 }
7156 @end lilypond
7157 @end quotation
7158
7159 @item
7160 @code{15. Salicus}
7161 @tab
7162 @quotation
7163 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
7164 \include "gregorian-init.ly"
7165 \score {
7166     \notes \transpose c c' {
7167         % Salicus
7168         \[ g \oriscus a \pes \virga b \]
7169         s^\markup {"N"}
7170     }
7171     \paper {
7172         interscoreline = 1
7173         \context {
7174             \ScoreContext
7175             \remove "Bar_number_engraver"
7176         }
7177         \context {
7178             \StaffContext
7179             \remove "Clef_engraver"
7180             \remove "Key_engraver"
7181             \override StaffSymbol #'transparent = ##t
7182             \remove "Time_signature_engraver"
7183             \remove "Bar_engraver"
7184             minimumVerticalExtent = ##f
7185         }
7186         \context {
7187             \VoiceContext
7188             \remove Ligature_bracket_engraver
7189             \consists Vaticana_ligature_engraver
7190             \override NoteHead #'style = #'vaticana_punctum
7191             \override Stem #'transparent = ##t
7192         }
7193     }
7194 }
7195 @end lilypond
7196 @end quotation
7197 @tab
7198 @quotation
7199 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
7200 \include "gregorian-init.ly"
7201 \score {
7202     \notes \transpose c c' {
7203         % Salicus Auctus Descendens
7204         \[ g \oriscus a \pes \auctum \descendens b \]
7205         s^\markup {"O"}
7206     }
7207     \paper {
7208         interscoreline = 1
7209         \context {
7210             \ScoreContext
7211             \remove "Bar_number_engraver"
7212         }
7213         \context {
7214             \StaffContext
7215             \remove "Clef_engraver"
7216             \remove "Key_engraver"
7217             \override StaffSymbol #'transparent = ##t
7218             \remove "Time_signature_engraver"
7219             \remove "Bar_engraver"
7220             minimumVerticalExtent = ##f
7221         }
7222         \context {
7223             \VoiceContext
7224             \remove Ligature_bracket_engraver
7225             \consists Vaticana_ligature_engraver
7226             \override NoteHead #'style = #'vaticana_punctum
7227             \override Stem #'transparent = ##t
7228         }
7229     }
7230 }
7231 @end lilypond
7232 @end quotation
7233 @tab
7234
7235 @item
7236 @code{16. Trigonus}
7237 @tab
7238 @quotation
7239 @lilypond[noindent,staffsize=26,nofragment,linewidth=1.0\cm]
7240 \include "gregorian-init.ly"
7241 \score {
7242   \notes \transpose c c' {
7243     % Trigonus
7244     \[ \stropha b \stropha b \stropha a \]
7245     s^\markup {"P"}
7246   }
7247   \paper {
7248     interscoreline = 1
7249     \context {
7250       \ScoreContext
7251       \remove "Bar_number_engraver"
7252     }
7253     \context {
7254       \StaffContext
7255       \remove "Clef_engraver"
7256       \remove "Key_engraver"
7257       \override StaffSymbol #'transparent = ##t
7258       \remove "Time_signature_engraver"
7259       \remove "Bar_engraver"
7260       minimumVerticalExtent = ##f
7261     }
7262     \context {
7263       \VoiceContext
7264       \remove Ligature_bracket_engraver
7265       \consists Vaticana_ligature_engraver
7266       \override NoteHead #'style = #'vaticana_punctum
7267       \override Stem #'transparent = ##t
7268     }
7269   }
7270 }
7271 @end lilypond
7272 @end quotation
7273 @tab
7274 @tab
7275
7276 @end multitable
7277
7278
7279 Unlike most other neumes notation systems, the input language for
7280 neumes does not necessarily reflect directly the typographical
7281 appearance, but is designed to solely focuse on musical meaning.  For
7282 example, @code{\[ a \pes b \flexa g \]} produces a Torculus consisting
7283 of three Punctum heads, while @code{\[ a \flexa g \pes b \]} produces
7284 a Porrectus with a curved flexa shape and only a single Punctum head.
7285 There is no command to explicitly typeset the curved flexa shape; the
7286 decision of when to typeset a curved flexa shape is purely taken from
7287 the musical input.  The idea of this approach is to separate the
7288 musical aspects of the input from the notation style of the output.
7289 This way, the same input can be reused to typeset the same music in a
7290 different style of Gregorian chant notation.
7291
7292 The following table shows the code fragments that produce the
7293 ligatures in the above neumes table.  The letter in the first column
7294 in each line of the below table indicates to which ligature in the
7295 above table it refers.  The second column gives the name of the
7296 ligature.  The third column shows the code fragment that produces this
7297 ligature, using @code{g}, @code{a} and @code{b} as example pitches.
7298
7299 @multitable @columnfractions .1 .4 .5
7300
7301 @item
7302 @b{#} @tab
7303 @b{Name} @tab
7304 @b{Input Language}
7305
7306 @item
7307 a @tab
7308 Punctum @tab
7309 @code{\[ b \]}
7310
7311 @item
7312 b @tab
7313 Punctum Inclinatum @tab
7314 @code{\[ \inclinatum b \]}
7315
7316 @item
7317 c @tab
7318 Punctum Auctum Ascendens @tab
7319 @code{\[ \auctum \ascendens b \]}
7320
7321 @item
7322 d @tab
7323 Punctum Auctum Descendens @tab
7324 @code{\[ \auctum \descendens b \]}
7325
7326 @item
7327 e @tab
7328 Punctum Inclinatum Auctum @tab
7329 @code{\[ \inclinatum \auctum b \]}
7330
7331 @item
7332 f @tab
7333 Punctum Inclinatum Parvum @tab
7334 @code{\[ \inclinatum \deminutum b \]}
7335
7336 @item
7337 g @tab
7338 Virga @tab
7339 @code{\[ \virga b \]}
7340
7341 @item
7342 h @tab
7343 Stropha @tab
7344 @code{\[ \stropha b \]}
7345
7346 @item
7347 i @tab
7348 Stropha Aucta @tab
7349 @code{\[ \stropha \auctum b \]}
7350
7351 @item
7352 j @tab
7353 Oriscus @tab
7354 @code{\[ \oriscus b \]}
7355
7356 @item
7357 k @tab
7358 Clivis vel Flexa @tab
7359 @code{\[ b \flexa g \]}
7360
7361 @item
7362 l @tab
7363 Clivis Aucta Descendens @tab
7364 @code{\[ b \flexa \auctum \descendens g \]}
7365
7366 @item
7367 m @tab
7368 Clivis Aucta Ascendens @tab
7369 @code{\[ b \flexa \auctum \ascendens g \]}
7370
7371 @item
7372 n @tab
7373 Cephalicus @tab
7374 @code{\[ b \flexa \deminutum g \]}
7375
7376 @item
7377 o @tab
7378 Podatus vel Pes @tab
7379 @code{\[ g \pes b \]}
7380
7381 @item
7382 p @tab
7383 Pes Auctus Descendens @tab
7384 @code{\[ g \pes \auctum \descendens b \]}
7385
7386 @item
7387 q @tab
7388 Pes Auctus Ascendens @tab
7389 @code{\[ g \pes \auctum \ascendens b \]}
7390
7391 @item
7392 r @tab
7393 Epiphonus @tab
7394 @code{\[ g \pes \deminutum b \]}
7395
7396 @item
7397 s @tab
7398 Pes Quassus @tab
7399 @code{\[ \oriscus g \pes \virga b \]}
7400
7401 @item
7402 t @tab
7403 Pes Quassus Auctus Descendens @tab
7404 @code{\[ \oriscus g \pes \auctum \descendens b \]}
7405
7406 @item
7407 u @tab
7408 Quilisma Pes @tab
7409 @code{\[ \quilisma g \pes b \]}
7410
7411 @item
7412 v @tab
7413 Quilisma Pes Auctus Descendens @tab
7414 @code{\[ \quilisma g \pes \auctum \descendens b \]}
7415
7416 @item
7417 w @tab
7418 Pes Initio Debilis @tab
7419 @code{\[ \deminutum g \pes b \]}
7420
7421 @item
7422 x @tab
7423 Pes Auctus Descendens Initio Debilis @tab
7424 @code{\[ \deminutum g \pes \auctum \descendens b \]}
7425
7426 @item
7427 y @tab
7428 Torculus @tab
7429 @code{\[ a \pes b \flexa g \]}
7430
7431 @item
7432 z @tab
7433 Torculus Auctus Descendens @tab
7434 @code{\[ a \pes b \flexa \auctum \descendens g \]}
7435
7436 @item
7437 A @tab
7438 Torculus Deminutus @tab
7439 @code{\[ a \pes b \flexa \deminutum g \]}
7440
7441 @item
7442 B @tab
7443 Torculus Initio Debilis @tab
7444 @code{\[ \deminutum a \pes b \flexa g \]}
7445
7446 @item
7447 C @tab
7448 Torculus Auctus Descendens Initio Debilis @tab
7449 @code{\[ \deminutum a \pes b \flexa \auctum \descendens g \]}
7450
7451 @item
7452 D @tab
7453 Torculus Deminutus Initio Debilis @tab
7454 @code{\[ \deminutum a \pes b \flexa \deminutum g \]}
7455
7456 @item
7457 E @tab
7458 Porrectus @tab
7459 @code{\[ a \flexa g \pes b \]}
7460
7461 @item
7462 F @tab
7463 Porrectus Auctus Descendens @tab
7464 @code{\[ a \flexa g \pes \auctum \descendens b \]}
7465
7466 @item
7467 G @tab
7468 Porrectus Deminutus @tab
7469 @code{\[ a \flexa g \pes \deminutum b \]}
7470
7471 @item
7472 H @tab
7473 Climacus @tab
7474 @code{\[ \virga b \inclinatum a \inclinatum g \]}
7475
7476 @item
7477 I @tab
7478 Climacus Auctus @tab
7479 @code{\[ \virga b \inclinatum a \inclinatum \auctum g \]}
7480
7481 @item
7482 J @tab
7483 Climacus Deminutus @tab
7484 @code{\[ \virga b \inclinatum a \inclinatum \deminutum g \]}
7485
7486 @item
7487 K @tab
7488 Scandicus @tab
7489 @code{\[ g \pes a \virga b \]}
7490
7491 @item
7492 L @tab
7493 Scandicus Auctus Descendens @tab
7494 @code{\[ g \pes a \pes \auctum \descendens b \]}
7495
7496 @item
7497 M @tab
7498 Scandicus Deminutus @tab
7499 @code{\[ g \pes a \pes \deminutum b \]}
7500
7501 @item
7502 N @tab
7503 Salicus @tab
7504 @code{\[ g \oriscus a \pes \virga b \]}
7505
7506 @item
7507 O @tab
7508 Salicus Auctus Descendens @tab
7509 @code{\[ g \oriscus a \pes \auctum \descendens b \]}
7510
7511 @item
7512 P @tab
7513 Trigonus @tab
7514 @code{\[ \stropha b \stropha b \stropha a \]}
7515
7516 @end multitable
7517
7518 @refcommands
7519
7520 The following head prefixes are supported
7521
7522 @cindex @code{\virga}
7523 @code{\virga},
7524 @cindex @code{\stropha}
7525 @code{\stropha},
7526 @cindex @code{\inclinatum}
7527 @code{\inclinatum},
7528 @cindex @code{\auctum}
7529 @code{\auctum},
7530 @cindex @code{\descendens}
7531 @code{\descendens},
7532 @cindex @code{\ascendens}
7533 @code{\ascendens},
7534 @cindex @code{\oriscus}
7535 @code{\oriscus},
7536 @cindex @code{\quilisma}
7537 @code{\quilisma},
7538 @cindex @code{\deminutum}
7539 @code{\deminutum}.
7540
7541 Head prefixes can be accumulated, though restrictions apply.  For
7542 example, either @code{\descendens} or @code{\ascendens} can be applied
7543 to a head, but not both to the same head.
7544
7545 @cindex @code{\pes}
7546 @cindex @code{\flexa}
7547 Two adjacent heads can be tied together with the @code{\pes} and
7548 @code{\flexa} infix commands for a rising and falling line of melody,
7549 respectively.
7550
7551
7552
7553 @node Vaticana style contexts
7554 @subsection Vaticana style contexts
7555
7556 @cindex VaticanaVoiceContext
7557 @cindex VaticanaStaffContext
7558
7559 The predefined @code{VaticanaVoiceContext} and
7560 @code{VaticanaStaffContext} can be used to easily engrave a piece of
7561 Gregorian Chant in the style of the Editio Vaticana.  These contexts
7562 initialize all relevant context properties and grob properties to
7563 proper values.  With these contexts, you can immediately go ahead
7564 entering the chant, as the following short excerpt demonstrates
7565
7566 @quotation
7567 @lilypond[raggedright,verbatim,noindent]
7568 \include "gregorian-init.ly"
7569 \score {
7570   <<
7571     \context VaticanaVoice = "cantus" {
7572       \override Score.BarNumber #'transparent = ##t
7573       \notes {
7574         \[ c'\melisma c' \flexa a \]
7575         \[ a \flexa \deminutum g\melismaEnd \]
7576         f \divisioMinima
7577         \[ f\melisma \pes a c' c' \pes d'\melismaEnd \]
7578         c' \divisioMinima \break
7579         \[ c'\melisma c' \flexa a \]
7580         \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
7581       }
7582     }
7583     \lyricsto "cantus" \new Lyrics \lyrics {
7584       San- ctus, San- ctus, San- ctus
7585     }
7586   >>
7587 }
7588 @end lilypond
7589 @end quotation
7590
7591 @node Figured bass
7592 @subsection Figured bass
7593
7594 @cindex Basso continuo
7595
7596 @c TODO: musicological blurb about FB
7597
7598
7599 LilyPond has limited support for figured bass
7600
7601 @quotation
7602 @lilypond[verbatim,fragment]
7603 <<
7604   \context Voice \notes { \clef bass dis4  c d ais }
7605   \context FiguredBass \figures {
7606     < 6 >4 < 7 >8 < 6+ [_!] >
7607     < 6 >4 <6 5 [3+] >
7608   }
7609 >>
7610 @end lilypond
7611 @end quotation
7612
7613 The support for figured bass consists of two parts: there is an input
7614 mode, introduced by @code{\figures}, where you can enter bass figures
7615 as numbers, and there is a context called @internalsref{FiguredBass} that
7616 takes care of making @internalsref{BassFigure} objects.
7617
7618 In figures input mode, a group of bass figures is delimited by
7619 @code{<} and @code{>}. The duration is entered after the @code{>>}
7620 @example
7621 <4 6>
7622 @end example
7623 @quotation
7624 @lilypond[fragment]
7625 \context FiguredBass
7626 \figures { <4 6> }
7627 @end lilypond
7628 @end quotation
7629
7630 Accidentals are added when you append @code{-}, @code{!}  and @code{+}
7631 to the numbers
7632
7633 @example
7634 <4- 6+ 7!>
7635 @end example
7636 @quotation
7637 @lilypond[fragment]
7638 \context FiguredBass
7639 \figures { <4- 6+ 7!> }
7640 @end lilypond
7641 @end quotation
7642
7643 Spaces or dashes may be inserted by using @code{_}. Brackets are
7644 introduced with @code{[} and @code{]}
7645
7646 @example
7647 < [4 6] 8 [_! 12]>
7648 @end example
7649 @quotation
7650 @lilypond[fragment]
7651 \context FiguredBass
7652 \figures { < [4 6] 8 [_! 12]> }
7653 @end lilypond
7654 @end quotation
7655
7656 Although the support for figured bass may superficially resemble chord
7657 support, it works much simpler.  The @code{\figures} mode simply
7658 stores the numbers , and @internalsref{FiguredBass} context prints
7659 them as entered. There is no conversion to pitches, and no
7660 realizations of the bass are played in the MIDI file.
7661
7662 Internally, the code produces markup texts. You can use any of the
7663 markup text properties to override formatting. For example, the
7664 vertical spacing of the figures may be set with @code{baseline-skip}.
7665
7666 @seealso
7667
7668 Program reference: @internalsref{BassFigureEvent} music, @internalsref{BassFigure} object, 
7669 and @internalsref{FiguredBass} context.
7670
7671 @refbugs
7672
7673 Slash notation for alterations is not supported.
7674
7675 @node Contemporary notation
7676 @section Contemporary notation
7677
7678 In the 20th century, composers have greatly expanded the musical
7679 vocabulary. With this expansion, many innovations in musical notation
7680 have been tried. The book by Stone (1980) gives a comprehensive
7681 overview (see @ref{Literature list}). In general, the use of new,
7682 innovative notation makes a piece harder to understand and perform and
7683 its use should therefore be avoided if possible.  For this reason,
7684 support for contemporary notation in LilyPond is limited.
7685
7686
7687 @menu
7688 * Clusters::                    
7689 * Fermatas::                    
7690 @end menu
7691
7692 @node Clusters
7693 @subsection Clusters
7694
7695 @cindex cluster
7696
7697 A cluster indicates a continuous range of pitches to be played.  They
7698 can be denoted as the envelope of a set of notes.  They are entered by
7699 applying the function @code{notes-to-clusters} to a sequence of
7700 chords, e.g.
7701 @c
7702 @quotation
7703 @lilypond[relative=2,verbatim]
7704 \apply #notes-to-clusters {  <c e > <b f'>  }
7705 @end lilypond
7706 @end quotation
7707
7708 The following example (from
7709 @inputfileref{input/regression,cluster.ly}) shows what the result
7710 looks like
7711
7712 @quotation
7713 @lilypondfile[]{cluster.ly}
7714 @end quotation
7715
7716 Ordinary notes and clusters can be put together in the same staff,
7717 even simultaneously.  In such a case no attempt is made to
7718 automatically avoid collisions between ordinary notes and clusters.
7719
7720 @seealso
7721
7722 Program reference: @internalsref{ClusterSpanner},
7723 @internalsref{ClusterSpannerBeacon},
7724 @internalsref{Cluster_spanner_engraver}, and
7725 @internalsref{ClusterNoteEvent}.
7726
7727 Examples: @inputfileref{input/regression,cluster.ly}.
7728
7729 @refbugs
7730
7731 Music expressions like @code{<< @{ g8 e8 @} a4 >>} are not printed
7732 accurately.  Use @code{<g a>8 <e a>8} instead.
7733
7734
7735
7736 @node Fermatas
7737 @subsection Fermatas
7738
7739 @cindex fermatas
7740
7741
7742
7743 Contemporary music notation frequently uses special fermata symbols to
7744 indicate fermatas of differing lengths.  The following fermatas are
7745 supported
7746
7747 @quotation
7748 @lilypond[raggedright]
7749 \score {
7750   <<
7751     \addlyrics \notes {
7752       b'
7753       ^\shortfermata
7754       _\shortfermata
7755       r
7756       b'
7757       ^\fermata
7758       _\fermata
7759
7760       r
7761       b'
7762       ^\longfermata
7763       _\longfermata
7764
7765       r
7766       b'
7767       ^\verylongfermata
7768       _\verylongfermata
7769     r
7770     }
7771     \context Lyrics \lyrics {
7772       \override LyricText #'font-family = #'typewriter
7773       "shortfermata" "fermata"  "longfermata" "verylongfermata"
7774     }
7775   >>
7776 }
7777 @end lilypond
7778 @end quotation
7779
7780 See @ref{Articulations} for general instructions how to apply scripts
7781 such as fermatas to a @code{\notes@{@}} block.
7782
7783
7784 @node Special notation
7785 @section Special notation
7786
7787 @menu
7788 * Balloon help::                
7789 * Easy Notation note heads::    
7790 @end menu
7791
7792 @node Balloon help
7793 @subsection Balloon help
7794
7795 Elements of notation can be marked and named with the help of a square
7796 balloon.  The primary purpose of this feature is to explain notation.
7797
7798 The following example demonstrates its use.
7799
7800 @quotation
7801 @lilypond[verbatim,fragment,raggedright,relative=2]
7802 \context Voice
7803 \applyoutput
7804    #(add-balloon-text 'NoteHead "heads, or tails?"
7805     '(1 . -3))
7806 c8
7807 @end lilypond
7808 @end quotation
7809
7810 @noindent
7811 The function @code{add-balloon-text} takes the name of a grob, the
7812 label to print and where to put the label relative to the object. In
7813 the above example, the text ``heads or tails?'' ends 3 spaces below
7814 the `balloon.' 
7815
7816 @cindex balloon
7817 @cindex notation, explaining
7818
7819 @seealso
7820
7821 Program reference: @internalsref{text-balloon-interface}.
7822
7823 Examples: @inputfileref{input/regression,balloon.ly}.
7824
7825 @node Easy Notation note heads
7826 @subsection Easy Notation note heads
7827
7828 @cindex easy notation
7829 @cindex Hal Leonard
7830
7831 The `easy play' note head includes a  name inside the head.  It is
7832 used in music for beginners
7833
7834 @quotation
7835 @lilypond[raggedright,verbatim,staffsize=26]
7836 \setEasyHeads
7837 c'2 e'4 f' | g'1
7838 @end lilypond
7839 @end quotation
7840
7841 The command @code{\setEasyHeads} overrides settings for the
7842 @internalsref{NoteHead} object.  To make the letters readable, it has
7843 to be printed in a large font size.  To print with a larger font, see
7844 @ref{Setting global staff size}.
7845
7846 @cindex Xdvi
7847 @cindex ghostscript
7848
7849 If you view the result with Xdvi, staff lines may show through the
7850 letters.  Printing the PostScript file obtained does produce the
7851 correct result.
7852
7853 @refcommands
7854
7855 @cindex \setEasyHeads
7856 @code{\setEasyHeads}
7857
7858 @node Sound
7859 @section Sound
7860 @cindex Sound
7861
7862 Entered music can also be converted to MIDI output.  The performance
7863 is intended for proof-hearing the music for errors.
7864
7865 Ties, dynamics and tempo changes are interpreted.  Dynamic marks,
7866 crescendi and decrescendi translate into MIDI volume levels.  Dynamic
7867 marks translate to a fixed fraction of the available MIDI volume
7868 range, crescendi and decrescendi make the volume vary linearly between
7869 their two extremities.  The fractions can be adjusted by
7870 @code{dynamicAbsoluteVolumeFunction} in @internalsref{Voice} context.
7871 For each type of MIDI instrument, a volume range can be defined.  This
7872 gives a basic equalizer control, which can enhance the quality of
7873 the MIDI output remarkably.  The equalizer can be controlled by
7874 setting @code{instrumentEqualizer}.
7875
7876 @refbugs
7877
7878 Many musically interesting effects, such as swing, articulation,
7879 slurring, etc., are not translated to MIDI.
7880
7881 The MIDI output allocates a channel for each Staff, and one for global
7882 settings.  Hence, the MIDI file should not have more than 15 staves
7883 (or 14 if you do not use drums). Other staves will remain silent.
7884
7885
7886 @menu
7887 * MIDI block::                  
7888 * MIDI instrument names::       
7889 @end menu
7890
7891
7892 @node MIDI block
7893 @subsection MIDI block
7894 @cindex MIDI block
7895
7896
7897 The MIDI block is analogous to the paper block, but it is somewhat
7898 simpler.  The @code{\midi} block can contain
7899 @cindex MIDI block
7900
7901 @itemize @bullet
7902   @item a @code{\tempo} definition, and
7903   @item context definitions.
7904 @end itemize
7905
7906 A number followed by a period is interpreted as a real number, so
7907 for setting the tempo for dotted notes, an extra space should be
7908 inserted, for example
7909
7910 @example
7911   \midi @{ \tempo 4 . = 120 @} 
7912 @end example
7913
7914
7915 @cindex context definition
7916
7917 Context definitions follow precisely the same syntax as within the
7918 \paper block.  Translation modules for sound are called performers.
7919 The contexts for MIDI output are defined in @file{ly/performer-init.ly}.
7920
7921
7922 @node MIDI instrument names
7923 @subsection MIDI instrument names
7924
7925 @cindex instrument names
7926 @cindex @code{Staff.midiInstrument}
7927
7928 The MIDI instrument name is set by the @code{Staff.midiInstrument}
7929 property.  The instrument name should be chosen from the list in
7930 @ref{MIDI instruments}.
7931
7932 @refbugs
7933
7934 If the selected string does not exactly match, the default is used,
7935 which is the Grand Piano.