]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/instrument-notation.itely
Fixes special quotes (not "") in lyrics.
[lilypond.git] / Documentation / user / instrument-notation.itely
1 @c -*- coding: latin-1; mode: 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 Instrument-specific notation
9 @chapter Instrument-specific notation
10
11 This chapter explains how to use notation for specific instruments.
12
13 @menu
14 * Piano music::                 
15 * Chord names::                 
16 * Vocal music::                 
17 * Rhythmic music::              
18 * Guitar::                      
19 * Bagpipe::                     
20 * Ancient notation::            
21 * Other instrument specific notation::  
22 @end menu
23
24
25
26 @node Piano music
27 @section Piano music
28
29 Piano staves are two normal staves coupled with a brace.  The staves
30 are largely independent, but sometimes voices can cross between the
31 two staves.  The same notation is also used for harps and other key
32 instruments.  The @internalsref{PianoStaff} is especially built to
33 handle this cross-staffing behavior.  In this section we discuss the
34 @internalsref{PianoStaff} and some other pianistic peculiarities.
35
36 @menu
37 * Automatic staff changes::     
38 * Manual staff switches::       
39 * Pedals::                      
40 * Staff switch lines::          
41 * Cross staff stems::           
42 @end menu
43
44 @
45 refbugs
46
47 Dynamics are not centered, but workarounds do exist.  See the
48 ``piano centered dynamics'' template in @ref{Piano templates}.
49
50 @cindex cross staff stem
51 @cindex stem, cross staff
52 @cindex distance between staves in piano music
53
54 The distance between the two staves is the same for all systems in the
55 score.  It is possible to override this per system, but it does require
56 an arcane command incantation.  See
57 @inputfileref{input/@/test,piano@/-staff@/-distance@/.ly}.
58
59
60 @node Automatic staff changes
61 @subsection Automatic staff changes
62 @cindex Automatic staff changes
63
64 Voices can be made to switch automatically between the top and the bottom
65 staff.  The syntax for this is
66
67 @quotation
68 @example
69 \autochange @dots{}@var{music}@dots{}
70 @end example
71 @end quotation
72
73 @noindent
74 This will create two staves inside the current PianoStaff, called
75 @code{up} and @code{down}.  The lower staff will be in bass clef by
76 default.
77
78 A @code{\relative} section that is outside of @code{\autochange} has
79 no effect on the pitches of @var{music}, so, if necessary, put
80 @code{\relative} inside @code{\autochange} like
81
82 @quotation
83 @example
84 \autochange \relative @dots{} @dots{}
85 @end example
86 @end quotation
87
88
89 The autochanger switches on basis of the pitch (middle C is the turning
90 point), and it looks ahead skipping over rests to switch in
91 advance.  Here is a practical example
92
93 @lilypond[quote,verbatim,raggedright]
94 \context PianoStaff
95   \autochange \relative c'
96   {
97     g4 a b c d r4 a g
98   }
99 @end lilypond
100
101
102 @seealso
103
104 In this manual: @ref{Manual staff switches}.
105
106 Program reference: @internalsref{AutoChangeMusic}.
107
108
109
110 @refbugs
111
112 The staff switches may not end up in optimal places.  For high
113 quality output, staff switches should be specified manually.
114
115
116 @code{\autochange} cannot be inside @code{\times}.
117
118
119 @node Manual staff switches
120 @subsection Manual staff switches
121
122 @cindex manual staff switches
123 @cindex staff switch, manual
124
125 Voices can be switched between staves manually, using the command
126 @example
127 \change Staff = @var{staffname} @var{music}
128 @end example
129
130 @noindent
131 The string @var{staffname} is the name of the staff.  It switches the
132 current voice from its current staff to the Staff called
133 @var{staffname}.  Typically @var{staffname} is @code{"up"} or
134 @code{"down"}.  The @context{Staff} referred to must already exist, so
135 usually the setup for a score will start with a setup of the staves,
136
137 @example
138 <<
139   \context Staff = up @{
140     \skip 1 * 10  % @emph{keep staff alive}
141     @}
142   \context Staff = down @{
143     \skip 1 * 10  % @emph{idem}
144     @}
145 >>
146 @end example
147
148
149 and the @context{Voice} is inserted afterwards
150
151 @example
152 \context Staff = down
153   \new Voice @{ @dots{} \change Staff = up @dots{} @}
154 @end example
155
156
157 @node Pedals
158 @subsection Pedals
159 @cindex Pedals
160
161 Pianos have pedals that alter the way sound is produced.  Generally, a
162 piano has three pedals, sustain, una corda, and sostenuto.
163
164
165 Piano pedal instruction can be expressed by attaching
166 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
167 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
168 note or chord
169
170 @lilypond[quote,raggedright,fragment,verbatim]
171 c'4\sustainDown c'4\sustainUp
172 @end lilypond
173
174 What is printed can be modified by setting @code{pedal@var{X}Strings},
175 where @var{X} is one of the pedal types: @code{Sustain},
176 @code{Sostenuto} or @code{UnaCorda}.  Refer to
177 @internalsref{SustainPedal} in the program reference for more
178 information.
179
180 Pedals can also be indicated by a sequence of brackets, by setting the
181 @code{pedalSustainStyle} property to bracket objects
182
183 @lilypond[quote,raggedright,fragment,verbatim,relative=2]
184 \set Staff.pedalSustainStyle = #'bracket
185 c\sustainDown d e
186 b\sustainUp\sustainDown
187 b g \sustainUp a \sustainDown \bar "|."
188 @end lilypond
189
190 A third style of pedal notation is a mixture of text and brackets,
191 obtained by setting the @code{pedalSustainStyle} property to
192 @code{mixed}
193
194 @lilypond[quote,raggedright,fragment,verbatim,relative=2]
195 \set Staff.pedalSustainStyle = #'mixed
196 c\sustainDown d e
197 b\sustainUp\sustainDown
198 b g \sustainUp a \sustainDown \bar "|."
199 @end lilypond
200
201 The default `*Ped.' style for sustain and damper pedals corresponds to
202 style @code{#'text}.  The sostenuto pedal uses @code{mixed} style by
203 default.
204
205 @lilypond[quote,raggedright,fragment,verbatim,relative=2]
206 c\sostenutoDown d e c, f g a\sostenutoUp
207 @end lilypond
208
209 For fine-tuning the appearance of a pedal bracket, the properties
210 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
211 @code{PianoPedalBracket} objects (see
212 @internalsref{PianoPedalBracket} in the Program reference) can be
213 modified.  For example, the bracket may be extended to the right edge
214 of the note head
215
216 @lilypond[quote,raggedright,fragment,verbatim,relative=2]
217 \override Staff.PianoPedalBracket #'shorten-pair = #'(0 . -1.0)
218 c\sostenutoDown d e c, f g a\sostenutoUp
219 @end lilypond
220
221 @node Staff switch lines
222 @subsection Staff switch lines
223
224
225 @cindex follow voice
226 @cindex staff switching
227 @cindex cross staff
228
229 @cindex @code{followVoice}
230
231 Whenever a voice switches to another staff, a line connecting the notes
232 can be printed automatically.  This is switched on by setting
233 @code{followVoice} to true
234
235 @lilypond[quote,raggedright,fragment,relative=1,verbatim]
236 \new PianoStaff <<
237   \context Staff=one {
238     \set followVoice = ##t
239     c1
240     \change Staff=two
241     b2 a
242   }
243   \context Staff=two { \clef bass \skip 1*2 }
244 >>
245 @end lilypond
246
247 @seealso
248
249 Program reference: @internalsref{VoiceFollower}.
250
251 @refcommands
252
253 @cindex @code{\showStaffSwitch}
254 @code{\showStaffSwitch},
255 @cindex @code{\hideStaffSwitch}
256 @code{\hideStaffSwitch}.
257
258
259 @node Cross staff stems
260 @subsection Cross staff stems
261
262 Chords that cross staves may be produced by increasing the length
263 of the stem in the lower staff, so it reaches the stem in the upper
264 staff, or vice versa.
265
266 @lilypond[raggedright,verbatim,quote]
267 stemExtend = \once \override Stem #'length = #22
268 noFlag = \once \override Stem #'flag-style = #'no-flag
269 \context PianoStaff <<
270   \new Staff {
271     \stemDown \stemExtend
272     f'4
273     \stemExtend \noFlag
274     f'8
275   }
276   \new Staff {
277     \clef bass
278     a4 a8
279   }
280 >>
281 @end lilypond
282
283
284
285 @node Chord names
286 @section Chord names
287
288 @menu
289 * Introducing chord names::     
290 * Chords mode::                 
291 * Printing chord names::        
292 @end menu
293
294
295 @c  awkward name; awkward section name.
296 @c  still, the Basic "chords" seems like a good name...  :(
297 @node Introducing chord names
298 @subsection Introducing chord names
299 @cindex chord names
300
301 LilyPond has support for printing chord names.  Chords may be entered
302 in musical chord notation, i.e., @code{< .. >}, but they can also be
303 entered by name.  Internally, the chords are represented as a set of
304 pitches, so they can be transposed
305
306
307 @lilypond[quote,raggedright,verbatim,raggedright]
308 twoWays = \transpose c c' {
309   \chordmode {
310     c1 f:sus4 bes/f
311   }
312   <c e g>
313   <f bes c'>
314   <f bes d'>
315 }
316
317 << \context ChordNames \twoWays
318    \context Voice \twoWays >>
319 @end lilypond
320
321 This example also shows that the chord printing routines do not try to
322 be intelligent.  The last chord (@code{f bes d}) is not interpreted as
323 an inversion.
324
325
326 @node Chords mode
327 @subsection Chords mode
328 @cindex Chords mode
329
330 In chord mode sets of pitches (chords) are entered with normal note
331 names.  A chord is entered by the root, which is entered like a
332 normal pitch
333
334 @lilypond[quote,raggedright,fragment,verbatim]
335 \chordmode { es4. d8 c2 }
336 @end lilypond
337
338 @noindent
339 The mode is introduced by the keyword @code{\chordmode}.
340
341 @cindex chord entry
342 @cindex chord mode
343
344 Other chords may be entered by suffixing a colon and introducing a
345 modifier (which may include a number if desired)
346 @lilypond[quote,fragment,verbatim]
347 \chordmode { e1:m e1:7 e1:m7 }
348 @end lilypond
349 The first number following the root is taken to be the `type' of the
350 chord, thirds are added to the root until it reaches the specified
351 number
352 @lilypond[quote,fragment,verbatim]
353 \chordmode { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
354 @end lilypond
355
356 @cindex root of chord
357 @cindex additions, in chords
358 @cindex removals, in chords
359
360 More complex chords may also be constructed adding separate steps
361 to a chord.  Additions are added after the number following
362 the colon and are separated by dots
363 @lilypond[quote,verbatim,fragment]
364 \chordmode { c:5.6 c:3.7.8 c:3.6.13 }
365 @end lilypond
366 Chord steps can be altered by suffixing a @code{-} or @code{+} sign
367 to the number
368 @lilypond[quote,verbatim,fragment]
369 \chordmode { c:7+ c:5+.3- c:3-.5-.7- }
370 @end lilypond
371 Removals are specified similarly and are introduced by a caret.  They
372 must come after the additions
373 @lilypond[quote,verbatim,fragment]
374 \chordmode { c^3 c:7^5 c:9^3.5 }
375 @end lilypond
376
377 Modifiers can be used to change pitches.  The following modifiers are
378 supported
379
380 @table @code
381 @item m
382 The minor chord.  This modifier lowers the 3rd and (if present) the 7th step.
383
384 @item dim
385 The diminished chord.  This modifier lowers the 3rd, 5th and (if present)
386 the 7th step.
387
388 @item aug
389 The augmented chord.  This modifier raises the 5th step.
390
391 @item maj
392 The major 7th chord.  This modifier raises the 7th step if present.
393
394 @item sus
395 The suspended 4th or 2nd.  This modifier removes the 3rd
396 step.  Append either @code{2} or @code{4} to add the 2nd or 4th step to
397 the chord.
398 @end table
399
400 Modifiers can be mixed with additions
401 @lilypond[quote,verbatim,fragment]
402   \chordmode { c:sus4 c:7sus4 c:dim7 c:m6 }
403 @end lilypond
404
405 @cindex modifiers, in chords.
406 @cindex @code{aug}
407 @cindex @code{dim}
408 @cindex @code{maj}
409 @cindex @code{sus}
410 @cindex @code{m}
411
412 Since an unaltered 11 does not sound good when combined with an
413 unaltered 3, the 11 is removed in this case (unless it is added
414 explicitly)
415 @lilypond[quote,raggedright,fragment,verbatim]
416 \chordmode { c:13 c:13.11 c:m13 }
417 @end lilypond
418
419 @cindex @code{/}
420
421 An inversion (putting one pitch of the chord on the bottom), as well
422 as bass notes, can be specified by appending
423 @code{/}@var{pitch} to the chord
424 @lilypond[quote,raggedright,fragment,verbatim]
425 \chordmode { c1 c/g c/f }
426 @end lilypond
427 @cindex @code{/+}
428
429 A bass note can be added instead transposed out of the chord,
430 by using @code{/+}@var{pitch}.
431
432 @lilypond[quote,raggedright,fragment,verbatim]
433 \chordmode { c1 c/+g c/+f }
434 @end lilypond
435
436 Chords is a mode similar to @code{\lyricmode}, etc.  Most
437 of the commands continue to work, for example, @code{r} and
438 @code{\skip} can be used to insert rests and spaces, and property
439 commands may be used to change various settings.
440
441
442
443 @refbugs
444
445 Each step can only be present in a chord once.  The following
446 simply produces the augmented chord, since @code{5+} is interpreted
447 last
448 @cindex clusters
449 @lilypond[quote,raggedright,verbatim,fragment]
450 \chordmode { c:5.5-.5+ }
451 @end lilypond
452
453
454 @node Printing chord names
455 @subsection Printing chord names
456
457 @cindex printing chord names
458 @cindex chord names
459 @cindex chords
460
461 For displaying printed chord names, use the @internalsref{ChordNames} context.
462 The chords may be entered either using the notation
463 described above, or directly using @code{<} and @code{>}
464
465 @lilypond[quote,verbatim,raggedright]
466 harmonies = {
467   \chordmode {a1 b c} <d' f' a'> <e' g' b'>
468 }
469 <<
470   \context ChordNames \harmonies
471   \context Staff \harmonies
472 >>
473 @end lilypond
474
475 You can make the chord changes stand out by setting
476 @internalsref{ChordNames}.@code{chordChanges} to true.  This will only
477 display chord names when there is a change in the chords scheme and at
478 the start of a new line
479
480 @lilypond[quote,verbatim,raggedright]
481 harmonies = \chordmode {
482   c1:m c:m \break c:m c:m d
483 }
484 <<
485   \context ChordNames {
486     \set chordChanges = ##t
487     \harmonies }
488   \context Staff \transpose c c' \harmonies
489 >>
490 @end lilypond
491
492 The previous examples all show chords over a staff.  This is not
493 necessary.  Chords may also be printed separately.  It may be necessary
494 to add @internalsref{Volta_engraver} and @internalsref{Bar_engraver}
495 for showing repeats.
496
497 @lilypond[raggedright,verbatim]
498 \new ChordNames \with {
499   \override BarLine #'bar-size = #4
500   voltaOnThisStaff = ##t
501   \consists Bar_engraver
502   \consists "Volta_engraver"
503 }
504 \repeat volta 2 \chordmode {
505   f1:maj f:7 bes:7
506   c:maj
507 } \alternative {
508   es e
509 }
510 @end lilypond
511
512
513 The default chord name layout is a system for Jazz music, proposed by
514 Klaus Ignatzek (see @ref{Literature list}).  It can be tuned through the
515 following properties
516
517 @table @code
518 @cindex @code{chordNameExceptions}
519 @item chordNameExceptions
520 This is a list that contains the chords that have special formatting.
521
522 The exceptions list should be encoded as
523 @example
524 @{ <c f g bes>1 \markup @{ \super "7" "wahh" @} @}
525 @end example
526
527 To get this information into @code{chordNameExceptions} takes a little
528 manoeuvring.  The following code transforms @code{chExceptionMusic}
529 (which is a sequential music) into a list of exceptions.
530 @example
531 (sequential-music-to-chord-exceptions chExceptionMusic #t)
532 @end example
533 Then,
534 @example
535 (append
536  (sequential-music-to-chord-exceptions chExceptionMusic #t)
537  ignatzekExceptions)
538 @end example
539 adds the new exceptions to the default ones, which are defined in
540 @file{ly/@/chord@/-modifier@/-init@/.ly}.
541
542 For an example of tuning this property, see also
543 @inputfileref{input/@/regression,chord@/-name@/-exceptions@/.ly}.
544 @cindex exceptions, chord names.
545
546
547 @cindex @code{majorSevenSymbol}
548 @item majorSevenSymbol
549 This property contains the markup object used for the 7th step, when
550 it is major.  Predefined options are @code{whiteTriangleMarkup} and
551 @code{blackTriangleMarkup}.  See
552 @inputfileref{input/@/regression,chord@/-name@/-major7@/.ly} for an example.
553
554 @cindex @code{chordNameSeparator}
555 @item chordNameSeparator
556 Different parts of a chord name are normally separated by a
557 slash.  By setting @code{chordNameSeparator}, you can specify other
558 separators, e.g.,
559 @lilypond[quote,raggedright,fragment,verbatim]
560 \context ChordNames \chordmode {
561   c:7sus4
562   \set chordNameSeparator
563     = \markup { \typewriter "|" }
564   c:7sus4
565 }
566 @end lilypond
567
568 @cindex @code{chordRootNamer}
569 @item chordRootNamer
570 The root of a chord is usually printed as a letter with an optional
571 alteration.  The transformation from pitch to letter is done by this
572 function.  Special note names (for example, the German ``H'' for a
573 B-chord) can be produced by storing a new function in this property.
574
575 @cindex @code{chordNoteNamer}
576 @item chordNoteNamer
577 The default is to print single pitch, e.g., the bass note, using the
578 @code{chordRootNamer}.  The @code{chordNoteNamer} property can be set
579 to a specialized function to change this behavior.  For example, the
580 base can be printed in lower case.
581
582 @cindex @code{chordPrefixSpacer}
583 @item chordPrefixSpacer
584 The ``m'' for minor chords is usually printed right after the root of 
585 the chord. By setting @code{chordPrefixSpacer}, you can fix a spacer 
586 between the root and ``m''. The spacer is not used when the root
587 is altered.
588
589 @end table
590
591 The predefined variables @code{\germanChords},
592 @code{\semiGermanChords}, @code{\italianChords} and @code{\frenchChords} 
593 set these variables.  The effect is
594 demonstrated here,
595
596 @lilypondfile[raggedright]{chord-names-languages.ly}
597
598 There are also two other chord name schemes implemented: an alternate
599 Jazz chord notation, and a systematic scheme called Banter chords.  The
600 alternate Jazz notation is also shown on the chart in @ref{Chord name
601 chart}.  Turning on these styles is described in the input file
602 @inputfileref{input/@/test,chord@/-names@/-jazz@/.ly}.
603
604 @cindex Banter
605 @cindex jazz chords
606 @cindex chords, jazz
607
608
609 @refcommands
610
611 @cindex @code{\germanChords}
612 @code{\germanChords},
613 @cindex @code{\semiGermanChords}
614 @code{\semiGermanChords}.
615 @cindex @code{\italianChords}
616 @code{\italianChords}.
617 @cindex @code{\frenchChords}
618 @code{\frenchChords}.
619
620
621
622
623 @seealso
624
625 Examples: @inputfileref{input/@/regression,chord@/-name@/-major7@/.ly},
626 @inputfileref{input/@/regression,chord@/-name@/-exceptions@/.ly},
627 @inputfileref{input/@/test,chord@/-names@/-jazz@/.ly}.
628
629
630 Init files: @file{scm/@/chords@/-ignatzek@/.scm}, and
631 @file{scm/@/chord@/-entry@/.scm}.
632
633
634 @refbugs
635
636 Chord names are determined solely from the list of pitches.  Chord
637 inversions are not identified, and neither are added bass notes.  This
638 may result in strange chord names when chords are entered with the
639 @code{< .. >} syntax.
640
641
642
643 @node Vocal music
644 @section Vocal music
645
646 There are three different issues when printing vocal music
647
648 @itemize @bullet
649 @item
650 Song texts must be entered as text, not notes.  For example, the
651 input@tie{}@code{d} should be interpreted as a one letter syllable, not the
652 note@tie{}D.
653
654 @item
655 Song texts must be printed as text, not as notes.
656
657 @item
658 Song texts must be aligned with the notes of their melody.
659 @end itemize
660
661 The simplest solution for printing music uses the @code{\addlyrics}
662 function to solve all these problems at once.  However, these
663 three functions can be controlled separately, which is necessary
664 for complex vocal music.
665
666
667 @menu
668 * Setting simple songs::        
669 * Entering lyrics::             
670 * Hyphens and extenders::       
671 * The Lyrics context::          
672 * Flexibility in alignment::    
673 * More stanzas::                
674 * Ambitus::                     
675 * Other vocal issues::          
676 @end menu
677
678 @node Setting simple songs
679 @subsection Setting simple songs
680
681 The easiest way to add lyrics to a melody is to append
682 @cindex \addlyrics
683 @example
684 \addlyrics @{ @var{the lyrics} @}
685 @end example
686
687 @noindent
688 to a melody.  Here is an example,
689
690 @lilypond[raggedright,verbatim,fragment,quote]
691 \time 3/4
692 \relative { c2 e4 g2. }
693 \addlyrics { play the game }
694 @end lilypond
695
696 More stanzas can be added by adding more
697 @code{\addlyrics} sections
698
699 @lilypond[raggedright,verbatim,fragment,quote]
700 \time 3/4
701 \relative { c2 e4 g2. }
702 \addlyrics { play the game }
703 \addlyrics { speel het spel }
704 \addlyrics { joue le jeu }
705 @end lilypond
706
707 @c TODO - this isn't such a great place for this note, but I can't
708 @c  find a better place without rearranging a lot of lyric stuff.
709 @c  It's yet another thing to look at post-3.0.
710
711 The @code{\addlyrics} command is actually just a convienient way
712 to write a more complicated LilyPond structure that sets up the
713 lyrics.  You should use @code{\addlyrics} unless you need to do
714 fancy things, in which case you should investigate
715 @code{\lyricsto} or @code{\lyricmode}.
716
717 @example
718 @{ MUSIC @}
719 \addlyrics @{ LYRICS @}
720 @end example
721
722 @noindent
723 is the same as
724
725 @example
726 \context Voice = blah @{ music @}
727 \lyricsto "blah" \new lyrics @{ LYRICS @}
728 @end example
729
730 @refbugs
731
732 @code{\addlyrics} cannot handle polyphony.
733
734
735 @node Entering lyrics
736 @subsection Entering lyrics
737
738 @cindex lyrics
739 @cindex @code{\lyricmode}
740 @cindex punctuation
741
742 Lyrics are entered in a special input mode.  This mode is introduced
743 by the keyword @code{\lyricmode}, or by using @code{\addlyrics} or
744 @code{\lyricsto}.  In this mode you can enter lyrics,
745 with punctuation and accents, and the input @code{d} is not parsed as
746 a pitch, but rather as a one letter syllable.  Syllables are entered
747 like notes, but with pitches replaced by text.  For example,
748 @example
749 \lyricmode @{ Twin-4 kle4 twin- kle litt- le star2 @}
750 @end example
751
752 There is a difference between @code{\addlyrics} and
753 @code{\lyricmode}.  @code{\addlyrics} and @code{\lyricsto}
754 ignore all durations and aligns syllables to notes; @code{\lyricmode}
755 uses the durations specified.
756
757 A word lyrics mode begins with an alphabetic character, and ends with
758 any space or digit.  The following characters can be any character
759 that is not a digit or white space.  One important consequence of this
760 is that a word can end with @code{@}}.  The following example is
761 usually a mistake in the input file.  The syllable includes a @code{@}}, so the
762 opening brace is not balanced
763 @example
764 \lyricmode @{ twinkle@}
765 @end example
766
767 @cindex @code{\property}, in @code{\lyricmode}
768 @noindent
769 Similarly, a period which follows an alphabetic sequence is included in
770 the resulting string.  As a consequence, spaces must be inserted around
771 property commands
772 @example
773 \override Score . LyricText #'font-shape = #'italic
774 @end example
775
776 @cindex @code{_}
777 @cindex spaces, in lyrics
778 @cindex quotes, in lyrics
779
780 Any @code{_} character that appears in an unquoted word is converted
781 to a space.  This provides a mechanism for introducing spaces into words
782 without using quotes.
783
784 To enter lyrics with characters from non-English languages, or with
785 non-ascii characters (such as the heart symbol or slanted quotes),
786 simply insert the characters directly into the input file and save
787 it with utf-8 encoding.  See @ref{Text encoding} for more info.
788
789 @example
790 \lyricmode @{ He said: “Let my peo ple go”. @}
791 @end example
792
793 The full definition of a word start in Lyrics mode is somewhat more
794 complex.
795
796 A word in Lyrics mode begins with: an alphabetic character, @code{_},
797 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
798 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
799 any 8-bit character with ASCII code over 127, or a two-character
800 combination of a backslash followed by one of @code{`}, @code{'},
801 @code{"}, or @code{^}.
802
803
804
805 @seealso
806
807 Program reference: @internalsref{LyricText}.
808
809 @refbugs
810
811 The definition of lyrics mode is too complex.
812
813 @node Hyphens and extenders
814 @subsection Hyphens and extenders
815
816 @cindex hyphens
817
818 Centered hyphens are entered as `@code{--}' between syllables.
819 The hyphen will have variable length depending on the space between
820 the syllables and it will be centered between the syllables.
821
822 @cindex melisma
823 @cindex extender
824
825 When a lyric is sung over many notes (this is called a melisma), this is
826 indicated with a horizontal line centered between a syllable and the
827 next one.  Such a line is called an extender line, and it is entered as
828 `@code{__}'.
829
830 In tighly engraved music, hyphens can be removed.  In some languages
831 (e.g. German and Hungarian), hyphens should not disappear, since
832 spelling depends on hyphenation.  For that purpose, hyphens can be
833 forced to remain by overriding @code{minimum-length} of
834 the @code{LyricHyphen} grob.
835
836 @lilypond[quote,verbatim,raggedright]
837 \score {
838  <<
839   \new Staff \relative c'' {
840     \time 1/4 c16 c c c c16 c c c c16 c c c
841   }
842   \lyricmode { \new Lyrics
843     \with {
844       \override SeparationItem #'padding = #0.0
845       % Otherwise lyrics are so far apart that hyphens don't disappear
846     } 
847     {
848       An -- ti -- cons -- ti --
849       tu -- tion -- nel -- le --
850       \override LyricHyphen  #'minimum-length = #0.7
851       \override LyricHyphen  #'spacing-procedure =
852         #Hyphen_spanner::set_spacing_rods
853       men -- taire -- ment. ouf~!
854     }
855   }
856  >>
857  \layout   {
858   indent = 0.0 \cm
859   linewidth = 3.4 \cm
860   \context {
861     \Staff \remove "Time_signature_engraver"
862   }
863  }
864 }
865 @end lilypond
866
867 @seealso
868
869 Program reference: @internalsref{LyricHyphen}, @internalsref{LyricExtender}.
870
871
872
873 @node The Lyrics context
874 @subsection The Lyrics context
875
876
877 Lyrics are printed by interpreting them in a @internalsref{Lyrics} context
878 @example
879 \context Lyrics \lyricmode @dots{}
880 @end example
881
882 @cindex automatic syllable durations
883 @cindex @code{\lyricsto}
884 @cindex lyrics and melodies
885
886 This will place the lyrics according to the durations that were
887 entered.  The lyrics can also be aligned under a given melody
888 automatically.  In this case, it is no longer necessary to enter the
889 correct duration for each syllable.  This is achieved by combining the
890 melody and the lyrics with the @code{\lyricsto} expression
891 @example
892 \lyricsto @var{name} \new Lyrics @dots{}
893 @end example
894
895 This aligns the lyrics to the
896 notes of the @internalsref{Voice} context called @var{name}, which has
897 to exist.  Therefore, normally the @code{Voice} is specified first, and
898 then the lyrics are specified with @code{\lyricsto}.  The command
899 @code{\lyricsto} switches to @code{\lyricmode} mode automatically, so the
900 @code{\lyricmode} keyword may be omitted.
901
902 For different or more complex orderings, the best way is to setup the
903 hierarchy of staves and lyrics first, e.g.,
904 @example
905 \context ChoirStaff <<
906   \context Lyrics = sopranoLyrics @{ s1 @}
907   \context Voice = soprano @{ @emph{music} @}
908   \context Lyrics = tenorLyrics @{ s1 @}
909   \context Voice = tenor @{ @emph{music} @}
910 >>
911 @end example
912 and then combine the appropriate melodies and lyric lines
913 @example
914 \lyricsto "soprano" \context Lyrics = sopranoLyrics
915   @emph{the lyrics}
916 @end example
917
918 @noindent
919 The final input would resemble
920
921 @example
922 <<\context ChoirStaff << @emph{setup the music} >>
923   \lyricsto "soprano" @emph{etc}
924   \lyricsto "alto" @emph{etc}
925   @emph{etc}
926 >>
927 @end example
928
929
930 The @code{\lyricsto} command detects melismata: it only puts one
931 syllable under a tied or slurred group of notes.  If you want to force
932 an unslurred group of notes to be a melisma, insert @code{\melisma}
933 after the first note of the group, and @code{\melismaEnd} after the
934 last one, e.g.,
935
936 @lilypond[quote,relative=2,raggedright,fragment,verbatim]
937 <<
938   \context Voice = "lala" {
939     \time 3/4
940     f4 g8
941     \melisma
942     f e f
943     \melismaEnd
944     e2
945   }
946   \lyricsto "lala" \new Lyrics {
947     la di __ daah
948   }
949 >>
950 @end lilypond
951
952 In addition, notes are considered a melisma if they are manually
953 beamed, and automatic beaming (see @ref{Setting automatic beam
954 behavior}) is switched off.
955
956 @ignore
957
958 @c nonformation:
959
960 The criteria for deciding melismata can
961 be tuned with the property @code{melismaBusyProperties}.  See
962 @internalsref{Melisma_translator} in the program reference for more
963 information.
964
965 @end ignore
966
967 Lyrics can also be entered without @code{\lyricsto}.  In this case the
968 duration of each syllable must be entered explicitly, for example,
969
970 @example
971 play2 the4 game2.
972 sink2 or4 swim2.
973 @end example
974
975 The alignment to a melody can be specified with the
976 @code{associatedVoice} property,
977
978 @example
979 \set associatedVoice = #"lala"
980 @end example
981
982 @noindent
983 The value of the property (here: @code{"lala"}) should be the name of
984 a @internalsref{Voice} context.  Without this setting, extender lines
985 will not be formatted properly.
986
987 Here is an example demonstrating manual lyric durations,
988
989 @lilypond[relative=1,raggedright,verbatim,fragment,quote]
990 << \context Voice = melody {
991      \time 3/4
992      c2 e4 g2.
993   }
994   \new Lyrics \lyricmode {
995     \set associatedVoice = #"melody"
996     play2 the4 game2.
997   } >>
998 @end lilypond
999
1000 @cindex SATB
1001 @cindex choral score
1002
1003 A complete example of a SATB score setup is in section
1004 @ref{Vocal ensembles}.
1005
1006
1007 @refcommands
1008
1009 @code{\melisma}, @code{\melismaEnd}
1010 @cindex @code{\melismaEnd}
1011 @cindex @code{\melisma}
1012
1013 @seealso
1014
1015 Program reference: @internalsref{LyricCombineMusic},
1016 @internalsref{Lyrics}, @internalsref{Melisma_translator}.
1017
1018
1019 @inputfileref{input/@/regression,lyric@/-combine@/-new@/.ly}.
1020 @c TODO: make separate section for melismata
1021
1022 @refbugs
1023
1024 Melismata are not detected automatically, and extender lines must be
1025 inserted by hand.
1026
1027
1028 @c TODO: document \new Staff << Voice \lyricsto >> bug
1029
1030 @node Flexibility in alignment
1031 @subsection Flexibility in alignment
1032
1033 Often, different stanzas of one song are put to one melody in slightly
1034 differing ways.  Such variations can still be captured with
1035 @code{\lyricsto}.
1036
1037 @subsubsection Lyrics to multiple notes of a melisma 
1038
1039
1040 One possibility is that the text has a melisma in one stanza, but
1041 multiple syllables in another one.  One solution is to make the faster
1042 voice ignore the melisma.  This is done by setting
1043 @code{ignoreMelismata} in the Lyrics context.
1044
1045 There has one tricky aspect.  The setting for @code{ignoreMelismata}
1046 must be set one syllable @emph{before} the non-melismatic syllable
1047 in the text, as shown here,
1048
1049 @lilypond[verbatim,raggedright,quote]
1050 <<
1051   \relative \context Voice = "lahlah" {
1052     \set Staff.autoBeaming = ##f
1053     c4
1054     \slurDotted
1055     f8.[( g16])
1056     a4
1057   }
1058   \new Lyrics \lyricsto "lahlah" {
1059     more slow -- ly
1060   }
1061   \new Lyrics \lyricsto "lahlah" {
1062     \set ignoreMelismata = ##t % applies to "fas"
1063     go fas -- ter
1064     \unset ignoreMelismata
1065     still
1066   }
1067 >>
1068 @end lilypond
1069
1070
1071 The @code{ignoreMelismata} applies to the syllable ``fas'', so it
1072 should be entered before ``go''.
1073
1074 The reverse is also possible: making a lyric line slower than the
1075 standard.  This can be achieved by insert @code{\skip}s into the
1076 lyrics.  For every @code{\skip}, the text will be delayed another note.
1077 For example,
1078
1079 @lilypond[verbatim,raggedright,quote]
1080 \relative { c c g' }
1081 \addlyrics {
1082   twin -- \skip 4
1083   kle
1084 }
1085 @end lilypond
1086
1087
1088 @subsection Switching the melody associated with a lyrics line
1089
1090
1091
1092 More complex variations in text underlay are possible.  It is possible
1093 to switch the melody for a line of lyrics during the text.  This is
1094 done by setting the @code{associatedVoice} property.  In the example
1095
1096 @lilypond[raggedright,quote]
1097 <<
1098   \relative \context Voice = "lahlah" {
1099     \set Staff.autoBeaming = ##f
1100     c4
1101     <<
1102       \context Voice = alternative {
1103         \voiceOne
1104         \times 2/3 {
1105           % show associations clearly.
1106           \override NoteColumn #'force-hshift = #-3
1107           f8 f g
1108         }
1109       }
1110       {
1111         \voiceTwo
1112         f8.[ g16]
1113         \oneVoice
1114       } >>
1115     a8( b) c
1116   }
1117   \new Lyrics \lyricsto "lahlah" {
1118     Ju -- ras -- sic Park
1119   }
1120   \new Lyrics \lyricsto "lahlah" {
1121     % Tricky: need to set associatedVoice
1122     % one syllable too soon!
1123     \set associatedVoice = alternative % applies to "ran"
1124     Ty --
1125     ran --
1126     no --
1127     \set associatedVoice = lahlah % applies to "rus"
1128     sau -- rus Rex
1129   } >>
1130 @end lilypond
1131
1132 @noindent
1133 the text for the first stanza is set to a melody called ``lahlah'',
1134
1135 @example
1136 \new Lyrics \lyricsto "lahlah" @{
1137   Ju -- ras -- sic Park
1138 @}
1139 @end example
1140
1141
1142 The second stanza initially is set to the @code{lahlah} context, but
1143 for the syllable ``ran'', it switches to a different melody.
1144 This is achieved with
1145 @example
1146 \set associatedVoice = alternative
1147 @end example
1148
1149 @noindent
1150 Here, @code{alternative} is the name of the @code{Voice} context
1151 containing the triplet.
1152
1153 Again, the command must be one syllable too early, before ``Ty'' in
1154 this case.
1155
1156 @example
1157 \new Lyrics \lyricsto "lahlah" @{
1158   \set associatedVoice = alternative % applies to "ran"
1159   Ty --
1160   ran --
1161   no --
1162   \set associatedVoice = lahlah % applies to "rus"
1163   sau -- rus Rex
1164 @}
1165 @end example
1166
1167 @noindent
1168 The underlay is switched back to the starting situation by assigning
1169 @code{lahlah} to @code{associatedVoice}.
1170
1171
1172
1173 @subsection Specifying melismata within the lyrics
1174
1175 It is also possible to define melismata entirely in the lyrics. This
1176 can be done by entering @code{_} for every note that is part of the
1177 melisma. 
1178
1179 @lilypond[relative=1,verbatim,fragment] 
1180 { \set melismaBusyProperties = #'()
1181   c d( e) f f( e) e e  }
1182 \addlyrics
1183  { Ky -- _ _ ri __ _ _ _  e }
1184 @end lilypond
1185
1186 In this case, you can also have ties and slurs in the melody, if you
1187 set @code{melismaBusyProperties}, as is done in the example above.
1188
1189 @lilypond[relative=1,verbatim,fragment]
1190 {
1191  \set melismaBusyProperties = #'()
1192   c d( e) f f( e) e e
1193 }
1194 \addlyrics
1195  { Ky -- _ _ ri __ _ _ _  e }
1196 @end lilypond
1197
1198
1199 @node More stanzas
1200 @subsection More stanzas
1201
1202 @cindex phrasing, in lyrics
1203
1204
1205 @cindex stanza number
1206 @cindex singer's names
1207 @cindex name of singer
1208
1209 Stanza numbers can be added by setting @code{stanza}, e.g.,
1210
1211 @lilypond[quote,raggedright,verbatim,relative=2,fragment]
1212 \new Voice {
1213   \time 3/4 g2 e4 a2 f4 g2.
1214 } \addlyrics {
1215   \set stanza = "1. "
1216   Hi, my name is Bert.
1217 } \addlyrics {
1218   \set stanza = "2. "
1219   Oh, che -- ri, je t'aime
1220 }
1221 @end lilypond
1222
1223 These numbers are put just before the start of first syllable.
1224
1225 Names of singers can also be added.  They are printed at the start of
1226 the line, just like instrument names.  They are created by setting
1227 @code{vocalName}.  A short version may be entered as @code{vocNam}.
1228
1229
1230 @lilypond[fragment,raggedright,quote,verbatim,relative=2]
1231 \new Voice {
1232   \time 3/4 g2 e4 a2 f4 g2.
1233 } \addlyrics {
1234   \set vocalName = "Bert "
1235   Hi, my name is Bert.
1236 } \addlyrics {
1237   \set vocalName = "Ernie "
1238   Oh, che -- ri, je t'aime
1239 }
1240 @end lilypond
1241
1242 You can display alternate (or divisi) lyrics by naming voice
1243 contexts and attaching lyrics to those specific contexts.
1244
1245 @lilypond[verbatim,raggedright,quote]
1246 \score{ <<
1247   \context Voice = "melody" {
1248     \relative c' {
1249       c4
1250       <<
1251         { \voiceOne c8 e }
1252         \context Voice = splitpart { \voiceTwo c4 }
1253       >>
1254       \oneVoice c4 c | c
1255     }
1256   }
1257   \new Lyrics \lyricsto "melody" { we shall not o- ver- come }
1258   \new Lyrics \lyricsto "splitpart" { will }
1259 >> }
1260 @end lilypond
1261
1262
1263 You can use this trick to display different lyrics for a repeated
1264 section.
1265
1266 @lilypond[verbatim,raggedright,quote]
1267 \score{ <<
1268   \context Voice = melody \relative c' {
1269     c2 e | g e | c1 |
1270     \context Voice = verse \repeat volta 2 {c4 d e f | g1 | }
1271     a2 b | c1}
1272   \lyricsto melody  \context Lyrics = mainlyrics \lyricmode {
1273     do mi sol mi do
1274     la si do }
1275   \lyricsto verse \context Lyrics = mainlyrics \lyricmode {
1276    do re mi fa sol }
1277   \lyricsto verse \context Lyrics = repeatlyrics \lyricmode {
1278    dodo rere mimi fafa solsol }
1279 >>
1280 }
1281 @end lilypond
1282
1283
1284 @seealso
1285
1286 Program reference: @internalsref{LyricText}, @internalsref{StanzaNumber}, @internalsref{VocalName}.
1287
1288
1289
1290 @node Ambitus
1291 @subsection Ambitus
1292 @cindex ambitus
1293
1294 The term @emph{ambitus} denotes a range of pitches for a given voice
1295 in a part of music.  It may also denote the pitch range that a musical
1296 instrument is capable of playing.  Ambits are printed on vocal parts,
1297 so performers can easily determine it meets their capabilities.
1298
1299 Ambits are denoted at the beginning of a piece near the initial clef.
1300 The range is graphically specified by two note heads that represent the
1301 minimum and maximum pitch.  To print such ambits, add the
1302 @internalsref{Ambitus_engraver} to the @internalsref{Voice} context,
1303 for example,
1304
1305 @example
1306 \layout @{
1307   \context @{
1308     \Voice
1309     \consists Ambitus_engraver
1310   @}
1311 @}
1312 @end example
1313
1314 This results in the following output
1315
1316 @lilypond[quote,raggedright]
1317 \layout {
1318   \context {
1319     \Staff
1320     \consists Ambitus_engraver
1321   }
1322 }
1323
1324 \relative \new Staff {
1325   as'' c e2 cis,2
1326 }
1327 @end lilypond
1328
1329 If you have multiple voices in a single staff and you want a single
1330 ambitus per staff rather than per each voice, add the
1331 @internalsref{Ambitus_engraver} to the @internalsref{Staff} context
1332 rather than to the @internalsref{Voice} context.  Here is an example,
1333
1334 @lilypond[verbatim,raggedright,quote]
1335 \new Staff \with {
1336   \consists "Ambitus_engraver"
1337 }
1338 <<
1339   \new Voice \with {
1340     \remove "Ambitus_engraver"
1341   } \relative c'' {
1342     \override Ambitus #'X-offset-callbacks
1343       = #(list (lambda (grob axis) -1.0))
1344     \voiceOne
1345     c4 a d e f2
1346   }
1347   \new Voice \with {
1348     \remove "Ambitus_engraver"
1349   } \relative c' {
1350     \voiceTwo
1351     es4 f g as b2
1352   }
1353 >>
1354 @end lilypond
1355
1356 @noindent
1357 This example uses one advanced feature,
1358
1359 @example
1360 \override Ambitus #'X-offset-callbacks
1361   = #(list (lambda (grob axis) -1.0))
1362 @end example
1363
1364 @noindent
1365 This code moves the ambitus to the left.  The same effect could have
1366 been achieved with @code{extra-offset}, but then the formatting system
1367 would not reserve space for the moved object.
1368
1369 @seealso
1370
1371 Program reference: @internalsref{Ambitus},
1372 @internalsref{AmbitusLine}, @internalsref{AmbitusNoteHead},
1373 @internalsref{AmbitusAccidental}.
1374
1375 Examples: @inputfileref{input/@/regression,ambitus@/.ly}.
1376
1377 @refbugs
1378
1379 There is no collision handling in the case of multiple per-voice
1380 ambitus.
1381
1382
1383 @node Other vocal issues
1384 @subsection Other vocal issues
1385
1386 @ignore
1387 yeah, I'm giving up somewhat by stuffing a bunch of things in
1388 here.  But at least they're in the manual now; it's easier to
1389 move them around in the manual once they're already here.
1390
1391 Besides, if users complain about everything stuffed in here, I
1392 can ask them for specific instructions about where to move these
1393 examples, and that might get them more involved in the docs.  -gp
1394 @end ignore
1395
1396 ``Parlato'' is spoken without pitch but still with rhythm; it is
1397 notated by cross noteheads.  This is demonstrated in
1398 @ref{Special noteheads}.
1399
1400
1401 @node Rhythmic music
1402 @section Rhythmic music
1403
1404 Rhythmic music is primarily used for percussion and drum notation, but it can
1405 also be used to show the rhythms of melodies.
1406
1407 @menu
1408 * Showing melody rhythms::      
1409 * Entering percussion::         
1410 * Percussion staves::           
1411 @end menu
1412
1413
1414 @node Showing melody rhythms
1415 @subsection Showing melody rhythms
1416
1417 Sometimes you might want to show only the rhythm of a melody.  This
1418 can be done with the rhythmic staff.  All pitches of notes on such a
1419 staff are squashed, and the staff itself has a single line
1420
1421 @lilypond[quote,raggedright,fragment,relative=1,verbatim]
1422 \context RhythmicStaff {
1423   \time 4/4
1424   c4 e8 f g2 | r4 g r2 | g1:32 | r1 |
1425 }
1426 @end lilypond
1427
1428 @seealso
1429
1430 Program reference: @internalsref{RhythmicStaff}.
1431
1432 Examples: @inputfileref{input/@/regression,rhythmic@/-staff@/.ly}.
1433
1434
1435 @node Entering percussion
1436 @subsection Entering percussion
1437
1438 @cindex percussion
1439 @cindex drums
1440
1441
1442 Percussion notes may be entered in @code{\drummode} mode, which is
1443 similar to the standard mode for entering notes.  Each piece of
1444 percussion has a full name and an abbreviated name, and both can be used
1445 in input files
1446
1447 @lilypond[quote,raggedright,verbatim]
1448 \drums {
1449   hihat hh bassdrum bd
1450 }
1451 @end lilypond
1452
1453 The complete list of drum names is in the init file
1454 @file{ly/@/drumpitch@/-init@/.ly}.
1455 @c TODO: properly document this.
1456
1457 @seealso
1458
1459 Program reference: @internalsref{note-event}.
1460
1461 @node Percussion staves
1462 @subsection Percussion staves
1463 @cindex percussion
1464 @cindex drums
1465
1466 A percussion part for more than one instrument typically uses a
1467 multiline staff where each position in the staff refers to one piece
1468 of percussion.
1469
1470
1471 To typeset the music, the notes must be interpreted in a
1472 @internalsref{DrumStaff} and @internalsref{DrumVoice} contexts
1473
1474 @lilypond[quote,raggedright,verbatim]
1475 up = \drummode { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
1476 down = \drummode { bassdrum4 snare8 bd r bd sn4 }
1477   \new DrumStaff <<
1478     \new DrumVoice { \voiceOne \up }
1479     \new DrumVoice { \voiceTwo \down }
1480   >>
1481 @end lilypond
1482
1483 The above example shows verbose polyphonic notation.  The short
1484 polyphonic notation, described in @ref{Polyphony}, can also be used if
1485 the @internalsref{DrumVoice}s are instantiated by hand first.  For example,
1486
1487 @lilypond[quote,raggedright,fragment,verbatim]
1488 \new DrumStaff <<
1489   \context DrumVoice = "1" { s1 *2 }
1490   \context DrumVoice = "2" { s1 *2 }
1491   \drummode {
1492     bd4 sn4 bd4 sn4
1493     <<
1494       { \repeat unfold 16 hh16 }
1495       \\
1496       { bd4 sn4 bd4 sn4 }
1497     >>
1498   }
1499 >>
1500 @end lilypond
1501
1502
1503 There are also other layout possibilities.  To use these, set the
1504 property @code{drumStyleTable} in context @internalsref{DrumVoice}.
1505 The following variables have been predefined
1506
1507 @table @code
1508 @item drums-style
1509 This is the default.  It typesets a typical drum kit on a five-line staff
1510
1511 @lilypond[quote,linewidth=10.0\cm]
1512 nam = \lyricmode {
1513   cymc cyms cymr hh hhc hho hhho hhp
1514   cb hc bd sn ss tomh tommh tomml toml tomfh tomfl }
1515 mus = \drummode {
1516   cymc cyms cymr hh hhc hho hhho hhp \break
1517   cb hc bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
1518 \score {
1519   << \new DrumStaff \with {
1520        \remove Bar_engraver
1521        \remove Time_signature_engraver
1522        \override Stem #'transparent = ##t
1523        \override Stem #'Y-extent-callback = ##f
1524        minimumVerticalExtent = #'(-4.0 . 5.0)
1525      } \mus
1526      \context Lyrics \nam
1527   >>
1528   \layout {
1529     \context {
1530       \Score
1531       \override LyricText #'font-family = #'typewriter
1532       \override BarNumber #'transparent =##T
1533     }
1534   }
1535 }
1536 @end lilypond
1537
1538 The drum scheme supports six different toms.  When there are fewer toms,
1539 simply select the toms that produce the desired result, i.e., to get toms
1540 on the three middle lines you use @code{tommh}, @code{tomml}, and
1541 @code{tomfh}.
1542
1543 @item timbales-style
1544 This typesets timbales on a two line staff
1545
1546 @lilypond[quote,raggedright]
1547 nam = \lyricmode { timh ssh timl ssl cb }
1548 mus = \drummode { timh ssh timl ssl cb s16 }
1549
1550 <<
1551   \context DrumStaff \with {
1552     \remove Bar_engraver
1553     \remove Time_signature_engraver
1554     \override Stem #'transparent = ##t
1555     \override Stem #'Y-extent-callback = ##f
1556     \override StaffSymbol #'line-count = #2
1557     \override StaffSymbol #'staff-space = #2
1558     minimumVerticalExtent = #'(-3.0 . 4.0)
1559     drumStyleTable = #timbales-style
1560   } \mus
1561   \context Lyrics {
1562     \override LyricText #'font-family = #'typewriter
1563     \nam
1564   }
1565 >>
1566 @end lilypond
1567
1568 @item congas-style
1569 This typesets congas on a two line staff
1570
1571 @lilypond[quote,raggedright]
1572 nam = \lyricmode { cgh cgho cghm ssh cgl cglo cglm ssl }
1573 mus = \drummode { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
1574
1575 <<
1576   \context DrumStaff \with {
1577     \remove Bar_engraver
1578     \remove Time_signature_engraver
1579     drumStyleTable = #congas-style
1580     \override StaffSymbol #'line-count = #2
1581
1582     %% this sucks; it will lengthen stems.
1583     \override StaffSymbol #'staff-space = #2
1584     \override Stem #'transparent = ##t
1585     \override Stem #'Y-extent-callback = ##f
1586   } \mus
1587   \context Lyrics {
1588     \override LyricText #'font-family = #'typewriter
1589     \nam
1590   }
1591 >>
1592 @end lilypond
1593
1594 @item bongos-style
1595 This typesets bongos on a two line staff
1596
1597 @lilypond[quote,raggedright]
1598 nam = \lyricmode { boh boho bohm ssh bol bolo bolm ssl }
1599 mus = \drummode { boh boho bohm ssh bol bolo bolm ssl s16 }
1600
1601 <<
1602   \context DrumStaff\with {
1603     \remove Bar_engraver
1604     \remove Time_signature_engraver
1605     \override StaffSymbol #'line-count = #2
1606     drumStyleTable = #bongos-style
1607
1608     %% this sucks; it will lengthen stems.
1609     \override StaffSymbol #'staff-space = #2
1610     \override Stem #'transparent = ##t
1611     \override Stem #'Y-extent-callback = ##f
1612   } \mus
1613   \context Lyrics {
1614     \override LyricText #'font-family = #'typewriter
1615     \nam
1616   }
1617 >>
1618 @end lilypond
1619
1620 @item percussion-style
1621 To typeset all kinds of simple percussion on one line staves.
1622
1623 @lilypond[quote,raggedright]
1624 nam = \lyricmode { tri trio trim gui guis guil cb cl tamb cab mar hc }
1625 mus = \drummode { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
1626
1627 <<
1628   \context DrumStaff\with{
1629     \remove Bar_engraver
1630     drumStyleTable = #percussion-style
1631     \override StaffSymbol #'line-count = #1
1632     \remove Time_signature_engraver
1633     \override Stem #'transparent = ##t
1634     \override Stem #'Y-extent-callback = ##f
1635   } \mus
1636   \context Lyrics {
1637     \override LyricText #'font-family = #'typewriter
1638     \nam
1639   }
1640 >>
1641 @end lilypond
1642 @end table
1643
1644 If you do not like any of the predefined lists you can define your own
1645 list at the top of your file
1646
1647 @lilypond[quote,raggedright,verbatim]
1648 #(define mydrums '(
1649          (bassdrum     default   #f         -1)
1650          (snare        default   #f         0)
1651          (hihat        cross     #f         1)
1652          (pedalhihat   xcircle   "stopped"  2)
1653          (lowtom       diamond   #f         3)))
1654 up = \drummode { hh8 hh hh hh hhp4 hhp }
1655 down = \drummode { bd4 sn bd toml8 toml }
1656
1657 \new DrumStaff <<
1658   \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
1659   \new DrumVoice { \voiceOne \up }
1660   \new DrumVoice { \voiceTwo \down }
1661 >>
1662 @end lilypond
1663
1664
1665 @seealso
1666
1667 Init files: @file{ly/@/drumpitch@/-init@/.ly}.
1668
1669 Program reference: @internalsref{DrumStaff}, @internalsref{DrumVoice}.
1670
1671 @refbugs
1672
1673 Because general MIDI does not contain rim shots, the sidestick is used
1674 for this purpose instead.
1675
1676
1677
1678 @node Guitar
1679 @section Guitar
1680
1681 @cindex tablature
1682 @cindex guitar tablature
1683
1684 @menu
1685 * String number indications::   
1686 * Tablatures basic::            
1687 * Non-guitar tablatures::       
1688 * Fret diagrams::               
1689 * Other guitar issues::         
1690 @end menu
1691
1692 @node String number indications
1693 @subsection String number indications
1694
1695 @cindex String numbers
1696
1697 String numbers can be added to chords, by indicating the string number
1698 with @code{\}@var{number}, 
1699
1700 @lilypond[relative,relative=1,raggedright,fragment]
1701 <c\1 e\2 g\3>
1702 @end lilypond
1703
1704 See also @inputfileref{input/regression,string-number.ly}.
1705
1706
1707 @seealso
1708
1709 Program reference: @internalsref{StringNumber}.
1710
1711
1712 @node Tablatures basic
1713 @subsection Tablatures basic
1714 @cindex Tablatures basic
1715
1716 Tablature notation is used for notating music for plucked string
1717 instruments.  Pitches are not denoted with note heads, but by
1718 numbers indicating on which string and fret a note must be played.  LilyPond
1719 offers limited support for tablature.
1720
1721 The string number associated to a note is given as a backslash
1722 followed by a number, e.g., @code{c4\3} for a C quarter on the third
1723 string.  By default, string 1 is the highest one, and the tuning
1724 defaults to the standard guitar tuning (with 6 strings).  The notes
1725 are printed as tablature, by using @internalsref{TabStaff} and
1726 @internalsref{TabVoice} contexts
1727
1728 @lilypond[quote,raggedright,fragment,verbatim]
1729 \context TabStaff {
1730   a,4\5 c'\2 a\3 e'\1
1731   e\4 c'\2 a\3 e'\1
1732 }
1733 @end lilypond
1734
1735 @cindex @code{minimumFret}
1736 @cindex fret
1737
1738 When no string is specified, the first string that does not give a
1739 fret number less than @code{minimumFret} is selected.  The default
1740 value for @code{minimumFret} is 0
1741
1742
1743 @example
1744 e16 fis gis a b4
1745 \set TabStaff.minimumFret = #8
1746 e16 fis gis a b4
1747 @end example
1748 @lilypond[quote,raggedright]
1749 frag = {
1750   \key e \major
1751   e16 fis gis a b4
1752   \set TabStaff.minimumFret = #8
1753   e16 fis gis a b4
1754 }
1755   \context StaffGroup <<
1756     \context Staff { \clef "G_8" \frag }
1757     \context TabStaff { \frag }
1758   >>
1759 @end lilypond
1760
1761 @seealso
1762
1763 Program reference: @internalsref{TabStaff}, @internalsref{TabVoice}.
1764
1765 @refbugs
1766
1767 Chords are not handled in a special way, and hence the automatic
1768 string selector may easily select the same string to two notes in a
1769 chord.
1770
1771
1772 @node Non-guitar tablatures
1773 @subsection Non-guitar tablatures
1774 @cindex Non-guitar tablatures
1775
1776 You can change the number of strings, by setting the number of lines
1777 in the @internalsref{TabStaff}.
1778
1779 You can change the tuning of the strings.  A string tuning is given as
1780 a Scheme list with one integer number for each string, the number
1781 being the pitch (measured in semitones relative to middle C) of an
1782 open string.  The numbers specified for @code{stringTuning} are the
1783 numbers of semitones to subtract or add, starting the specified pitch
1784 by default middle C, in string order.  In the next example,
1785 @code{stringTunings} is set for the pitches e, a, d, and g
1786
1787 @lilypond[quote,raggedright,fragment,verbatim]
1788 \context TabStaff <<
1789   \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
1790   {
1791     a,4 c' a e' e c' a e'
1792   }
1793 >>
1794 @end lilypond
1795
1796 @refbugs
1797
1798 No guitar special effects have been implemented.
1799
1800 @seealso
1801
1802 Program reference: @internalsref{Tab_note_heads_engraver}.
1803
1804
1805 @node Fret diagrams
1806 @subsection Fret diagrams
1807 @cindex fret diagrams
1808 @cindex chord diagrams
1809
1810 Fret diagrams can be added to music as a markup to the desired note.  The
1811 markup contains information about the desired fret diagram, as shown in the
1812 following example
1813
1814 @lilypond[verbatim, raggedright, quote]
1815 \context Voice {
1816   d'^\markup \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
1817   d' d' d'
1818   fis'^\markup \override #'(size . 0.75) {
1819     \override #'(finger-code . below-string) {
1820       \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
1821                                (place-fret 5 4 3) (place-fret 4 4 4)
1822                                (place-fret 3 3 2) (place-fret 2 2 1)
1823                                (place-fret 1 2 1))
1824     }
1825   }
1826   fis' fis' fis'
1827   c'^\markup \override #'(dot-radius . 0.35) {
1828     \override #'(finger-code . in-dot) {
1829       \override #'(dot-color . white) {
1830         \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
1831       }
1832     }
1833   }
1834   c' c' c'
1835 }
1836 @end lilypond
1837
1838
1839 There are three different fret-diagram markup interfaces: standard, terse,
1840 and verbose.  The three interfaces produce equivalent markups, but have
1841 varying amounts of information in the markup string.  Details about the
1842 markup interfaces are found at @ref{Overview of text markup commands}.
1843
1844 You can set a number of graphical properties according to your preference.
1845 Details about the property interface to fret diagrams are found at
1846 @internalsref{fret-diagram-interface}.
1847
1848
1849 @seealso
1850
1851 Examples: @inputfileref{input/@/test,fret@/-diagram@/.ly}
1852
1853
1854 @node Other guitar issues
1855 @subsection Other guitar issues
1856
1857 This example demonstrates how to include guitar position and
1858 barring indications.
1859
1860 @lilypond[quote,raggedright,fragment,verbatim,relative=0]
1861 \clef "G_8"
1862 b16 d16 g16 b16 e16
1863 \textSpannerDown
1864 \override TextSpanner #'edge-text = #'("XII " . "")
1865   g16\startTextSpan
1866   b16 e16 g16 e16 b16 g16\stopTextSpan
1867 e16 b16 g16 d16
1868 @end lilypond
1869
1870
1871 Stopped (X) note heads are used in guitar music to signal a place where the 
1872 guitarist must play a certain note or chord, with its fingers just 
1873 touching the strings instead of fully pressing them.  This gives the sound a 
1874 percussive noise-like sound that still maintains part of the original
1875 pitch.  It is notated with cross noteheads; this is
1876 demonstrated in @ref{Special noteheads}.
1877
1878
1879 @node Bagpipe
1880 @section Bagpipe
1881
1882 @cindex Bagpipe
1883
1884 @menu
1885 * Bagpipe definitions::         
1886 * Bagpipe example::             
1887 @end menu
1888
1889
1890 @node Bagpipe definitions
1891 @subsection Bagpipe definitions
1892
1893 LilyPond contains special definitions for bagpipe music; to use them, add
1894
1895 @example
1896 \include "bagpipe.ly"
1897 @end example
1898
1899 @noindent
1900 at the top of your input file.  This lets you add the special flourishes
1901 common to bagpipe music with short commands.  For example, you could
1902 write @code{\taor} instead of
1903
1904 @example
1905 \grace @{ \small G32[ d G e] @}
1906 @end example
1907
1908 @code{bagpipe.ly} also contains pitch definitions for the bagpipe
1909 notes in the appropiate octaves, so you do not need to worry about
1910 @code{\relative} or @code{\transpose}.
1911
1912 @ignore
1913 @lilypond[raggedright,verbatim,quote]
1914 \include "bagpipe.ly"
1915 { G4 a b c d e f g A B C }
1916 @end lilypond
1917 @end ignore
1918
1919
1920 @node Bagpipe example
1921 @subsection Bagpipe example
1922
1923 To be inserted soon.
1924
1925
1926 @node Ancient notation
1927 @section Ancient notation
1928
1929 @cindex Vaticana, Editio
1930 @cindex Medicaea, Editio
1931 @cindex hufnagel
1932 @cindex Petrucci
1933 @cindex mensural
1934
1935 Support for ancient notation includes features for mensural notation
1936 and Gregorian Chant notation.  There is also limited support for
1937 figured bass notation.
1938
1939 Many graphical objects provide a @code{style} property, see
1940 @itemize @bullet
1941 @item
1942 @ref{Ancient note heads},
1943 @item
1944 @ref{Ancient accidentals},
1945 @item
1946 @ref{Ancient rests},
1947 @item
1948 @ref{Ancient clefs},
1949 @item
1950 @ref{Ancient flags},
1951 @item
1952 @ref{Ancient time signatures}.
1953 @end itemize
1954
1955 By manipulating such a grob property, the typographical appearance of
1956 the affected graphical objects can be accommodated for a specific
1957 notation flavor without the need for introducing any new notational
1958 concept.
1959
1960 In addition to the standard articulation signs described in section
1961 @ref{Articulations}, specific articulation signs for ancient notation
1962 are provided.
1963
1964 @itemize @bullet
1965 @item
1966 @ref{Ancient articulations}
1967 @end itemize
1968
1969 Other aspects of ancient notation can not that easily be expressed
1970 in terms of just changing a style property of a graphical object or
1971 adding articulation signs.  Some notational concepts are introduced
1972 specifically for ancient notation,
1973
1974 @itemize @bullet
1975 @item
1976 @ref{Custodes},
1977 @item
1978 @ref{Divisiones},
1979 @item
1980 @ref{Ligatures}.
1981 @end itemize
1982
1983 If this all is too much of documentation for you, and you just want to
1984 dive into typesetting without worrying too much about the details on
1985 how to customize a context, you may have a look at the predefined
1986 contexts.  Use them to set up predefined style-specific voice and
1987 staff contexts, and directly go ahead with the note entry,
1988
1989 @itemize @bullet
1990 @item
1991 @ref{Gregorian Chant contexts},
1992 @item
1993 @ref{Mensural contexts}.
1994 @end itemize
1995
1996 There is limited support for figured bass notation which came
1997 up during the baroque period.
1998
1999 @itemize @bullet
2000 @item
2001 @ref{Figured bass}
2002 @end itemize
2003
2004 Here are all suptopics at a glance:
2005
2006 @menu
2007 * Ancient note heads::          
2008 * Ancient accidentals::         
2009 * Ancient rests::               
2010 * Ancient clefs::               
2011 * Ancient flags::               
2012 * Ancient time signatures::     
2013 * Ancient articulations::       
2014 * Custodes::                    
2015 * Divisiones::                  
2016 * Ligatures::                   
2017 * Gregorian Chant contexts::    
2018 * Mensural contexts::           
2019 * Musica ficta accidentals::    
2020 * Figured bass::                
2021 @end menu
2022
2023
2024
2025 @node Ancient note heads
2026 @subsection Ancient note heads
2027
2028 @cindex note heads
2029
2030
2031 For ancient notation, a note head style other than the @code{default}
2032 style may be chosen.  This is accomplished by setting the @code{style}
2033 property of the @internalsref{NoteHead} object to @code{baroque},
2034 @code{neomensural}, @code{mensural} or @code{petrucci}.  The
2035 @code{baroque} style differs from the @code{default} style only in
2036 using a square shape for @code{\breve} note heads.  The
2037 @code{neomensural} style differs from the @code{baroque} style in that
2038 it uses rhomboidal heads for whole notes and all smaller durations.
2039 Stems are centered on the note heads.  This style is particularly
2040 useful when transcribing mensural music, e.g., for the incipit.  The
2041 @code{mensural} style produces note heads that mimic the look of note
2042 heads in historic printings of the 16th century.  Finally, the
2043 @code{petrucci} style also mimicks historic printings, but uses bigger
2044 note heads.
2045
2046 The following example demonstrates the @code{neomensural} style
2047
2048 @lilypond[quote,fragment,raggedright,verbatim]
2049 \set Score.skipBars = ##t
2050 \override NoteHead #'style = #'neomensural
2051 a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
2052 @end lilypond
2053
2054 When typesetting a piece in Gregorian Chant notation, the
2055 @internalsref{Gregorian_ligature_engraver} will automatically select
2056 the proper note heads, so there is no need to explicitly set the
2057 note head style.  Still, the note head style can be set, e.g., to
2058 @code{vaticana_punctum} to produce punctum neumes.  Similarly, a
2059 @internalsref{Mensural_ligature_engraver} is used to automatically
2060 assemble mensural ligatures.  See @ref{Ligatures} for how ligature
2061 engravers work.
2062
2063 @seealso
2064
2065 Examples: @inputfileref{input/@/regression,note@/-head@/-style@/.ly} gives an
2066 overview over all available note head styles.
2067
2068
2069 @node Ancient accidentals
2070 @subsection Ancient accidentals
2071
2072 @cindex accidentals
2073
2074
2075 Use the @code{style} property of grob @internalsref{Accidental} to
2076 select ancient accidentals.   Supported styles are
2077 @code{mensural}, @code{vaticana}, @code{hufnagel}, and @code{medicaea}.
2078
2079 @lilypond[quote,raggedright,staffsize=26]
2080 \score {
2081 {
2082   \fatText
2083   s^\markup {
2084     \column {
2085       "vaticana"
2086       \line { " " \musicglyph #"accidentals.vaticana-1"
2087         " " \musicglyph #"accidentals.vaticana0" }
2088     }
2089     \column {
2090       "medicaea"
2091       \line { " " \musicglyph #"accidentals.medicaea-1" }
2092     }
2093     \column {
2094       "hufnagel"
2095       \line { " " \musicglyph #"accidentals.hufnagel-1" }
2096     }
2097     \column {
2098       "mensural"
2099       \line { " " \musicglyph #"accidentals.mensural-1"
2100         " " \musicglyph #"accidentals.mensural1" }
2101     }
2102   }
2103 }
2104 \layout {
2105   interscoreline = 1
2106   \context { \Score \remove "Bar_number_engraver" }
2107   \context { \Staff
2108       \remove "Clef_engraver"
2109       \remove "Key_engraver"
2110       \remove "Time_signature_engraver"
2111       \remove "Staff_symbol_engraver"
2112       minimumVerticalExtent = ##f
2113     }
2114   }
2115 }
2116 @end lilypond
2117
2118 As shown, not all accidentals are supported by each style.  When
2119 trying to access an unsupported accidental, LilyPond will switch to a
2120 different style, as demonstrated in
2121 @inputfileref{input/@/test,ancient@/-accidentals@/.ly}.
2122
2123 Similarly to local accidentals, the style of the key signature can be
2124 controlled by the @code{style} property of the
2125 @internalsref{KeySignature} grob.
2126
2127 @seealso
2128
2129 In this manual: @ref{Pitches}, @ref{Cautionary accidentals} and
2130 @ref{Automatic accidentals} give a general introduction of the use of
2131 accidentals.  @ref{Key signature} gives a general introduction of
2132 the use of key signatures.
2133
2134 Program reference: @internalsref{KeySignature}.
2135
2136 Examples: @inputfileref{input/@/test,ancient@/-accidentals@/.ly}.
2137
2138 @node Ancient rests
2139 @subsection Ancient rests
2140
2141 @cindex rests, ancient
2142
2143
2144 Use the @code{style} property of grob @internalsref{Rest} to select
2145 ancient rests.   Supported styles are @code{classical},
2146 @code{neomensural}, and @code{mensural}.  @code{classical} differs
2147 from the @code{default} style only in that the quarter rest looks like
2148 a horizontally mirrored 8th rest.  The @code{neomensural} style suits
2149 well for, e.g., the incipit of a transcribed mensural piece of music.
2150 The @code{mensural} style finally mimics the appearance of rests as
2151 in historic prints of the 16th century.
2152
2153 The following example demonstrates the @code{neomensural} style
2154
2155 @lilypond[quote,fragment,raggedright,verbatim]
2156 \set Score.skipBars = ##t
2157 \override Rest #'style = #'neomensural
2158 r\longa r\breve r1 r2 r4 r8 r16
2159 @end lilypond
2160
2161 There are no 32th and 64th rests specifically for the mensural or
2162 neo-mensural style.  Instead, the rests from the default style will be
2163 taken.  See @inputfileref{input/@/test,rests@/.ly} for a chart of all
2164 rests.
2165
2166 There are no rests in Gregorian Chant notation; instead, it uses
2167 @ref{Divisiones}.
2168
2169 @seealso
2170
2171 In this manual: @ref{Rests} gives a general introduction into the use of rests.
2172
2173
2174 @node Ancient clefs
2175 @subsection Ancient clefs
2176
2177 @cindex clefs
2178
2179
2180 LilyPond supports a variety of clefs, many of them ancient.
2181
2182 The following table shows all ancient clefs that are supported via the
2183 @code{\clef} command.  Some of the clefs use the same glyph, but
2184 differ only with respect to the line they are printed on.  In such
2185 cases, a trailing number in the name is used to enumerate these clefs.
2186 Still, you can manually force a clef glyph to be typeset on an
2187 arbitrary line, as described in @ref{Clef}.  The note printed to the
2188 right side of each clef in the example column denotes the @code{c'}
2189 with respect to that clef.
2190
2191 @multitable @columnfractions .4 .4 .2
2192 @item
2193 @b{Description}
2194 @tab
2195 @b{Supported Clefs}
2196 @tab
2197 @b{Example}
2198
2199 @item
2200 modern style mensural C clef
2201 @tab
2202 @code{neomensural-c1}, @code{neomensural-c2},@*
2203 @code{neomensural-c3}, @code{neomensural-c4}
2204 @tab
2205 @lilypond[fragment,relative=1,notime]
2206   \clef "neomensural-c2" c
2207 @end lilypond
2208
2209 @item
2210 petrucci style mensural C clefs, for use on different staff lines
2211 (the examples show the 2nd staff line C clef)
2212 @tab
2213 @code{petrucci-c1}, @code{petrucci-c2},@*
2214 @code{petrucci-c3}, @code{petrucci-c4},@*
2215 @code{petrucci-c5}
2216 @tab
2217 @lilypond[fragment,relative=1,notime]
2218   \clef "petrucci-c2"
2219   \override NoteHead #'style = #'mensural
2220   c
2221 @end lilypond
2222
2223 @item
2224 petrucci style mensural F clef
2225 @tab
2226 @code{petrucci-f}
2227 @tab
2228 @lilypond[fragment,relative=1,notime]
2229   \clef "petrucci-f"
2230   \override NoteHead #'style = #'mensural
2231   c
2232 @end lilypond
2233
2234 @item
2235 petrucci style mensural G clef
2236 @tab
2237 @code{petrucci-g}
2238 @tab
2239 @lilypond[fragment,relative=1,notime]
2240   \clef "petrucci-g"
2241   \override NoteHead #'style = #'mensural
2242   c
2243 @end lilypond
2244
2245 @item
2246 historic style mensural C clef
2247 @tab
2248 @code{mensural-c1}, @code{mensural-c2},@*
2249 @code{mensural-c3}, @code{mensural-c4}
2250 @tab
2251 @lilypond[fragment,relative=1,notime]
2252   \clef "mensural-c2"
2253   \override NoteHead #'style = #'mensural
2254   c
2255 @end lilypond
2256
2257 @item
2258 historic style mensural F clef
2259 @tab
2260 @code{mensural-f}
2261 @tab
2262 @lilypond[fragment,relative=1,notime]
2263   \clef "mensural-f"
2264   \override NoteHead #'style = #'mensural
2265   c
2266 @end lilypond
2267
2268 @item
2269 historic style mensural G clef
2270 @tab
2271 @code{mensural-g}
2272 @tab
2273 @lilypond[fragment,relative=1,notime]
2274   \clef "mensural-g"
2275   \override NoteHead #'style = #'mensural
2276   c
2277 @end lilypond
2278
2279 @item
2280 Editio Vaticana style do clef
2281 @tab
2282 @code{vaticana-do1}, @code{vaticana-do2},@*
2283 @code{vaticana-do3}
2284 @tab
2285 @lilypond[fragment,relative=1,notime]
2286   \override Staff.StaffSymbol #'line-count = #4
2287   \override Staff.StaffSymbol #'color = #red
2288   \override Staff.LedgerLineSpanner #'color = #red
2289   \override Voice.Stem #'transparent = ##t
2290   \override NoteHead #'style = #'vaticana.punctum
2291   \clef "vaticana-do2"
2292   c
2293 @end lilypond
2294
2295 @item
2296 Editio Vaticana style fa clef
2297 @tab
2298 @code{vaticana-fa1}, @code{vaticana-fa2}
2299 @tab
2300 @lilypond[fragment,relative=1,notime]
2301   \override Staff.StaffSymbol #'line-count = #4
2302   \override Staff.StaffSymbol #'color = #red
2303   \override Staff.LedgerLineSpanner #'color = #red
2304   \override Voice.Stem #'transparent = ##t
2305   \override NoteHead #'style = #'vaticana.punctum
2306   \clef "vaticana-fa2"
2307   c
2308 @end lilypond
2309
2310 @item
2311 Editio Medicaea style do clef
2312 @tab
2313 @code{medicaea-do1}, @code{medicaea-do2},@*
2314 @code{medicaea-do3}
2315 @tab
2316 @lilypond[fragment,relative=1,notime]
2317   \override Staff.StaffSymbol #'line-count = #4
2318   \override Staff.StaffSymbol #'color = #red
2319   \override Staff.LedgerLineSpanner #'color = #red
2320   \override Voice.Stem #'transparent = ##t
2321   \override NoteHead #'style = #'medicaea.punctum
2322   \clef "medicaea-do2"
2323   c
2324 @end lilypond
2325
2326 @item
2327 Editio Medicaea style fa clef
2328 @tab
2329 @code{medicaea-fa1}, @code{medicaea-fa2}
2330 @tab
2331 @lilypond[fragment,relative=1,notime]
2332   \override Staff.StaffSymbol #'line-count = #4
2333   \override Staff.StaffSymbol #'color = #red
2334   \override Staff.LedgerLineSpanner #'color = #red
2335   \override Voice.Stem #'transparent = ##t
2336   \override NoteHead #'style = #'medicaea.punctum
2337   \clef "medicaea-fa2"
2338   c
2339 @end lilypond
2340
2341 @item
2342 historic style hufnagel do clef
2343 @tab
2344 @code{hufnagel-do1}, @code{hufnagel-do2},@*
2345 @code{hufnagel-do3}
2346 @tab
2347 @lilypond[fragment,relative=1,notime]
2348   \override Staff.StaffSymbol #'line-count = #4
2349   \override Staff.StaffSymbol #'color = #red
2350   \override Staff.LedgerLineSpanner #'color = #red
2351   \override Voice.Stem #'transparent = ##t
2352   \override NoteHead #'style = #'hufnagel.punctum
2353   \clef "hufnagel-do2"
2354   c
2355 @end lilypond
2356
2357 @item
2358 historic style hufnagel fa clef
2359 @tab
2360 @code{hufnagel-fa1}, @code{hufnagel-fa2}
2361 @tab
2362 @lilypond[fragment,relative=1,notime]
2363   \override Staff.StaffSymbol #'line-count = #4
2364   \override Staff.StaffSymbol #'color = #red
2365   \override Staff.LedgerLineSpanner #'color = #red
2366   \override Voice.Stem #'transparent = ##t
2367   \override NoteHead #'style = #'hufnagel.punctum
2368   \clef "hufnagel-fa2"
2369   c
2370 @end lilypond
2371
2372 @item
2373 historic style hufnagel combined do/fa clef
2374 @tab
2375 @code{hufnagel-do-fa}
2376 @tab
2377 @lilypond[fragment,relative=1,notime]
2378   \override Staff.StaffSymbol #'color = #red
2379   \override Staff.LedgerLineSpanner #'color = #red
2380   \override Voice.Stem #'transparent = ##t
2381   \override NoteHead #'style = #'hufnagel.punctum
2382   \clef "hufnagel-do-fa"
2383   c
2384 @end lilypond
2385 @end multitable
2386
2387
2388
2389 @emph{Modern style} means ``as is typeset in contemporary editions of
2390 transcribed mensural music''.
2391
2392 @emph{Petrucci style} means ``inspired by printings published by the
2393 famous engraver Petrucci (1466-1539)''.
2394
2395 @emph{Historic style} means ``as was typeset or written in historic
2396 editions (other than those of Petrucci)''.
2397
2398 @emph{Editio XXX style} means ``as is/was printed in Editio XXX''.
2399
2400 Petrucci used C clefs with differently balanced left-side vertical
2401 beams, depending on which staff line it is printed.
2402
2403 @seealso
2404
2405 In this manual: see @ref{Clef}.
2406
2407 @refbugs
2408
2409 The mensural g clef is mapped to the Petrucci g clef.
2410
2411
2412
2413 @node Ancient flags
2414 @subsection Ancient flags
2415
2416 @cindex flags
2417
2418
2419 Use the @code{flag-style} property of grob @internalsref{Stem} to
2420 select ancient flags.  Besides the @code{default} flag style,
2421 only the @code{mensural} style is supported
2422
2423 @lilypond[quote,fragment,raggedright,verbatim]
2424 \override Stem #'flag-style = #'mensural
2425 \override Stem #'thickness = #1.0
2426 \override NoteHead #'style = #'mensural
2427 \autoBeamOff
2428 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
2429 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
2430 @end lilypond
2431
2432 Note that the innermost flare of each mensural flag always is
2433 vertically aligned with a staff line.
2434
2435 There is no particular flag style for neo-mensural notation.  Hence,
2436 when typesetting the incipit of a transcribed piece of mensural
2437 music, the default flag style should be used.  There are no flags in
2438 Gregorian Chant notation.
2439
2440 @refbugs
2441
2442 The attachment of ancient flags to stems is slightly off due to a
2443 change in early 2.3.x.
2444
2445 Vertically aligning each flag with a staff line assumes that stems
2446 always end either exactly on or exactly in the middle between two
2447 staff lines.  This may not always be true when using advanced layout
2448 features of classical notation (which however are typically out of
2449 scope for mensural notation).
2450
2451 @node Ancient time signatures
2452 @subsection Ancient time signatures
2453
2454 @cindex time signatures
2455
2456
2457 There is limited support for mensural time signatures.   The
2458 glyphs are hard-wired to particular time fractions.  In other words,
2459 to get a particular mensural signature glyph with the @code{\time n/m}
2460 command, @code{n} and @code{m} have to be chosen according to the
2461 following table
2462
2463 @lilypond[quote,raggedright]
2464 \layout {
2465   indent = 0.0
2466   \context {
2467     \Staff
2468     \remove Staff_symbol_engraver
2469     \remove Clef_engraver
2470     \remove Time_signature_engraver
2471   }
2472 }
2473 {
2474   \set Score.timing = ##f
2475   \set Score.barAlways = ##t
2476   s_\markup { "\\time 4/4" }^\markup { "       " \musicglyph #"timesig.neomensural44" }
2477   s
2478   s_\markup { "\\time 2/2" }^\markup { "       " \musicglyph #"timesig.neomensural22" }
2479   s
2480   s_\markup { "\\time 6/4" }^\markup { "       " \musicglyph #"timesig.neomensural64" }
2481   s
2482   s_\markup { "\\time 6/8" }^\markup { "       " \musicglyph #"timesig.neomensural68" }
2483   \break
2484   s_\markup { "\\time 3/2" }^\markup { "       " \musicglyph #"timesig.neomensural32" }
2485   s
2486   s_\markup { "\\time 3/4" }^\markup { "       " \musicglyph #"timesig.neomensural34" }
2487   s
2488   s_\markup { "\\time 9/4" }^\markup { "       " \musicglyph #"timesig.neomensural94" }
2489   s
2490   s_\markup { "\\time 9/8" }^\markup { "       " \musicglyph #"timesig.neomensural98" }
2491   \break
2492   s_\markup { "\\time 4/8" }^\markup { "       " \musicglyph #"timesig.neomensural48" }
2493   s
2494   s_\markup { "\\time 2/4" }^\markup { "       " \musicglyph #"timesig.neomensural24" }
2495 }
2496 @end lilypond
2497
2498 Use the @code{style} property of grob @internalsref{TimeSignature} to
2499 select ancient time signatures.  Supported styles are
2500 @code{neomensural} and @code{mensural}.  The above table uses the
2501 @code{neomensural} style.  This style is appropriate for the
2502 incipit of transcriptions of mensural pieces.  The @code{mensural}
2503 style mimics the look of historical printings of the 16th century.
2504
2505 The following examples show the differences in style,
2506
2507 @lilypond[raggedright,fragment,relative=1,quote]
2508 {
2509   \fatText
2510
2511   \time 2/2
2512   c1^\markup { \hspace #-2.0 \typewriter default }
2513
2514   \override Staff.TimeSignature #'style = #'numbered
2515   \time 2/2
2516   c1^\markup { \hspace #-2.0 \typewriter numbered }
2517
2518   \override Staff.TimeSignature #'style = #'mensural
2519   \time 2/2
2520   c1^\markup { \hspace #-2.0 \typewriter mensural }
2521
2522   \override Staff.TimeSignature #'style = #'neomensural
2523   \time 2/2
2524   c1^\markup { \hspace #-2.0 \typewriter neomensural }
2525   \override Staff.TimeSignature #'style = #'single-digit
2526   \time 2/2
2527   c1^\markup { \hspace #-2.0 \typewriter single-digit }
2528 }
2529 @end lilypond
2530
2531 @seealso
2532
2533 This manual: @ref{Time signature} gives a general introduction to
2534 the use of time signatures.
2535
2536 @refbugs
2537
2538 Ratios of note durations do not change with the time signature.  For
2539 example, the ratio of 1 brevis = 3 semibrevis (tempus perfectum) must
2540 be made by hand, by setting
2541
2542 @example
2543 breveTP = #(ly:make-duration -1 0 3 2)
2544 @dots{}
2545 @{ c\breveTP f1 @}
2546 @end example
2547
2548 @noindent
2549 This sets @code{breveTP} to 3/2 times 2 = 3 times a whole note.
2550
2551 The @code{old6/8alt} symbol (an alternate symbol for 6/8) is not
2552 addressable with @code{\time}.  Use a @code{\markup} instead
2553
2554 @node Ancient articulations
2555 @subsection Ancient articulations
2556
2557 @cindex articulations
2558
2559 In addition to the standard articulation signs described in section
2560 @ref{Articulations}, articulation signs for ancient notation are
2561 provided.  These are specifically designed for use with notation in
2562 Editio Vaticana style.
2563
2564 @lilypond[quote,raggedright,verbatim]
2565 \include "gregorian-init.ly"
2566 \score {
2567   \context VaticanaVoice {
2568     \override Staff.StaffSymbol #'color = #red
2569     \override Staff.LedgerLineSpanner #'color = #red
2570     \override TextScript #'font-family = #'typewriter
2571     \override TextScript #'font-shape = #'upright
2572     \override Script #'padding = #-0.1
2573     a4\ictus_"ictus" s1
2574     a4\circulus_"circulus" s1
2575     a4\semicirculus_"semicirculus" s1 s
2576     a4\accentus_"accentus" s1
2577     \[ a4_"episem" \episemInitium \pes b \flexa a \episemFinis \]
2578   }
2579 }
2580 @end lilypond
2581
2582 @refbugs
2583
2584 Some articulations are vertically placed too closely to the
2585 correpsonding note heads.
2586
2587 @node Custodes
2588 @subsection Custodes
2589
2590 @cindex custos
2591 @cindex custodes
2592
2593 A @emph{custos} (plural: @emph{custodes}; Latin word for `guard') is a
2594 symbol that appears at the end of a staff.  It anticipates the pitch
2595 of the first note(s) of the following line thus helping the performer
2596 to manage line breaks during performance.
2597
2598 Custodes were frequently used in music notation until the 17th
2599 century.  Nowadays, they have survived only in a few particular forms
2600 of musical notation such as contemporary editions of Gregorian chant
2601 like the @emph{editio vaticana}.  There are different custos glyphs
2602 used in different flavors of notational style.
2603
2604 For typesetting custodes, just put a @internalsref{Custos_engraver} into the
2605 @internalsref{Staff} context when declaring the @code{\layout} block,
2606 as shown in the following example
2607
2608 @example
2609 \layout @{
2610   \context @{
2611     \Staff
2612     \consists Custos_engraver
2613     Custos \override #'style = #'mensural
2614   @}
2615 @}
2616 @end example
2617
2618 The result looks like this
2619
2620 @lilypond[quote,raggedright]
2621 \score {
2622 {
2623   a'1
2624   \override Staff.Custos #'style = #'mensural
2625   \break
2626   g'
2627 }
2628 \layout {
2629   \context { \Staff \consists Custos_engraver }
2630   }
2631 }
2632 @end lilypond
2633
2634 The custos glyph is selected by the @code{style} property.  The styles
2635 supported are @code{vaticana}, @code{medicaea}, @code{hufnagel}, and
2636 @code{mensural}.  They are demonstrated in the following fragment
2637
2638 @lilypond[quote,raggedright,fragment]
2639 \new Lyrics \lyricmode {
2640   \markup { \column {
2641     \typewriter "vaticana"
2642     \line { " " \musicglyph #"custodes.vaticana.u0" }
2643   } }
2644   \markup { \column {
2645     \typewriter "medicaea"
2646     \line { " " \musicglyph #"custodes.medicaea.u0" }
2647   }}
2648   \markup { \column {
2649     \typewriter "hufnagel"
2650     \line { " " \musicglyph #"custodes.hufnagel.u0" }
2651   }}
2652   \markup { \column {
2653     \typewriter "mensural"
2654     \line { " " \musicglyph #"custodes.mensural.u0" }
2655   }}
2656 }
2657 @end lilypond
2658
2659 @seealso
2660
2661 Program reference: @internalsref{Custos}.
2662
2663 Examples: @inputfileref{input/@/regression,custos@/.ly}.
2664
2665
2666 @node Divisiones
2667 @subsection Divisiones
2668
2669 @cindex divisio
2670 @cindex divisiones
2671 @cindex finalis
2672
2673 A @emph{divisio} (plural: @emph{divisiones}; Latin word for
2674 `division') is a staff context symbol that is used to structure
2675 Gregorian music into phrases and sections.  The musical meaning of
2676 @emph{divisio minima}, @emph{divisio maior}, and @emph{divisio maxima}
2677 can be characterized as short, medium, and long pause, somewhat like
2678 the breathmarks from @ref{Breath marks}.  The @emph{finalis} sign not
2679 only marks the end of a chant, but is also frequently used within a
2680 single antiphonal/responsorial chant to mark the end of each section.
2681
2682
2683 To use divisiones, include the file @file{gregorian@/-init@/.ly}.  It
2684 contains definitions that you can apply by just inserting
2685 @code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
2686 and @code{\finalis} at proper places in the input.  Some editions use
2687 @emph{virgula} or @emph{caesura} instead of divisio minima.
2688 Therefore, @file{gregorian@/-init@/.ly} also defines @code{\virgula} and
2689 @code{\caesura}
2690
2691 @lilypondfile[quote,raggedright]{divisiones.ly}
2692
2693 @refcommands
2694
2695 @cindex @code{\virgula}
2696 @code{\virgula},
2697 @cindex @code{\caesura}
2698 @code{\caesura},
2699 @cindex @code{\divisioMinima}
2700 @code{\divisioMinima},
2701 @cindex @code{\divisioMaior}
2702 @code{\divisioMaior},
2703 @cindex @code{\divisioMaxima}
2704 @code{\divisioMaxima},
2705 @cindex @code{\finalis}
2706 @code{\finalis}.
2707
2708 @seealso
2709
2710 In this manual: @ref{Breath marks}.
2711
2712 Program reference: @internalsref{BreathingSign}.
2713
2714 Examples: @inputfileref{input/@/test,divisiones@/.ly}.
2715
2716 @node Ligatures
2717 @subsection Ligatures
2718
2719 @cindex Ligatures
2720
2721 @c TODO: Should double check if I recalled things correctly when I wrote
2722 @c down the following paragraph by heart.
2723
2724 A ligature is a graphical symbol that represents at least two distinct
2725 notes.  Ligatures originally appeared in the manuscripts of Gregorian
2726 chant notation to denote ascending or descending sequences of notes.
2727
2728 Ligatures are entered by enclosing them in @code{\[} and @code{\]}.
2729 Some ligature styles may need additional input syntax specific for
2730 this particular type of ligature.  By default, the
2731 @internalsref{LigatureBracket} engraver just puts a square bracket
2732 above the ligature
2733
2734 @lilypond[quote,raggedright,verbatim]
2735 \transpose c c' {
2736   \[ g c a f d' \]
2737   a g f
2738   \[ e f a g \]
2739 }
2740 @end lilypond
2741
2742 To select a specific style of ligatures, a proper ligature engraver
2743 has to be added to the @internalsref{Voice} context, as explained in
2744 the following subsections.   Only white mensural ligatures
2745 are supported with certain limitations.
2746
2747
2748
2749 @refbugs
2750
2751 Ligatures need special spacing that has not yet been implemented.  As
2752 a result, there is too much space between ligatures most of the time,
2753 and line breaking often is unsatisfactory.  Also, lyrics do not
2754 correctly align with ligatures.
2755
2756 Accidentals must not be printed within a ligature, but instead need to
2757 be collected and printed in front of it.
2758
2759 Augmentum dots within ligatures are not handled correctly.
2760
2761 The syntax still uses the deprecated infix style @code{\[ music expr
2762 \]}.  For consistency reasons, it will eventually be changed to
2763 postfix style @code{note\[ ... note\]}.  Alternatively, the file
2764 @file{gregorian@/-init@/.ly} can be included; it provides a scheme
2765 function
2766 @example
2767 \ligature @var{music expr}
2768 @end example
2769 with the same effect and is believed to be stable.
2770
2771 @menu
2772 * White mensural ligatures::    
2773 * Gregorian square neumes ligatures::  
2774 @end menu
2775
2776 @node White mensural ligatures
2777 @subsubsection White mensural ligatures
2778
2779 @cindex Mensural ligatures
2780 @cindex White mensural ligatures
2781
2782 There is limited support for white mensural ligatures.
2783
2784 To engrave white mensural ligatures, in the layout block put the
2785 @internalsref{Mensural_ligature_engraver} into the
2786 @internalsref{Voice} context, and remove the
2787 @internalsref{Ligature_bracket_engraver}, like this
2788
2789 @example
2790 \layout @{
2791   \context @{
2792     \Voice
2793     \remove Ligature_bracket_engraver
2794     \consists Mensural_ligature_engraver
2795   @}
2796 @}
2797 @end example
2798
2799 There is no additional input language to describe the shape of a
2800 white mensural ligature.  The shape is rather determined solely from
2801 the pitch and duration of the enclosed notes.  While this approach may
2802 take a new user a while to get accustomed to, it has the great advantage
2803 that the full musical information of the ligature is known internally.
2804 This is not only required for correct MIDI output, but also allows for
2805 automatic transcription of the ligatures.
2806
2807 For example,
2808
2809 @example
2810 \set Score.timing = ##f
2811 \set Score.defaultBarType = "empty"
2812 \override NoteHead #'style = #'neomensural
2813 \override Staff.TimeSignature #'style = #'neomensural
2814 \clef "petrucci-g"
2815 \[ c'\maxima g \]
2816 s4
2817 \[ d\longa c\breve f e d \]
2818 s4
2819 \[ c'\maxima d'\longa \]
2820 s4
2821 \[ e'1 a g\breve \]
2822 @end example
2823 @lilypond[quote,raggedright]
2824 \score {
2825   \transpose c c' {
2826     \set Score.timing = ##f
2827     \set Score.defaultBarType = "empty"
2828     \override NoteHead #'style = #'neomensural
2829     \override Staff.TimeSignature #'style = #'neomensural
2830     \clef "petrucci-g"
2831     \[ c'\maxima g \]
2832     s4
2833     \[ d\longa c\breve f e d \]
2834     s4
2835     \[ c'\maxima d'\longa \]
2836     s4
2837     \[ e'1 a g\breve \]
2838   }
2839   \layout {
2840     \context {
2841       \Voice
2842       \remove Ligature_bracket_engraver
2843       \consists Mensural_ligature_engraver
2844     }
2845   }
2846 }
2847 @end lilypond
2848
2849 Without replacing @internalsref{Ligature_bracket_engraver} with
2850 @internalsref{Mensural_ligature_engraver}, the same music transcribes
2851 to the following
2852
2853 @lilypond[quote,raggedright]
2854 \transpose c c' {
2855   \set Score.timing = ##f
2856   \set Score.defaultBarType = "empty"
2857   \override NoteHead #'style = #'neomensural
2858   \override Staff.TimeSignature #'style = #'neomensural
2859   \clef "petrucci-g"
2860   \[ c'\maxima g \]
2861   s4
2862   \[ d\longa c\breve f e d \]
2863   s4
2864   \[ c'\maxima d'\longa \]
2865   s4
2866   \[ e'1 a g\breve \]
2867 }
2868 @end lilypond
2869
2870 @refbugs
2871
2872 The invisible rests (@code{s4}) in the example are used to compensate
2873 for the poor horizontal spacing.
2874
2875 @node Gregorian square neumes ligatures
2876 @subsubsection Gregorian square neumes ligatures
2877
2878 @cindex Square neumes ligatures
2879 @cindex Gregorian square neumes ligatures
2880
2881 There is limited support for Gregorian square neumes notation
2882 (following the style of the Editio Vaticana).  Core ligatures can
2883 already be typeset, but essential issues for serious typesetting are
2884 still lacking, such as (among others) horizontal alignment of multiple
2885 ligatures, lyrics alignment and proper handling of accidentals.
2886
2887
2888 The following table contains the extended neumes table of the 2nd
2889 volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
2890 1983 by the monks of Solesmes.
2891
2892 @multitable @columnfractions .4 .2 .2 .2
2893
2894 @item
2895 @b{Neuma aut@*
2896 Neumarum Elementa}
2897 @tab
2898 @b{Figurae@*
2899 Rectae}
2900 @tab
2901 @b{Figurae@*
2902 Liquescentes@*
2903 Auctae}
2904 @tab
2905 @b{Figurae@*
2906 Liquescentes@*
2907 Deminutae}
2908
2909 @c TODO: \layout block is identical in all of the below examples.
2910 @c Therefore, it should somehow be included rather than duplicated all
2911 @c the time. --jr
2912
2913 @c why not make identifiers in ly/engraver-init.ly? --hwn
2914
2915 @c Because it's just used to typeset plain notes without
2916 @c a staff for demonstration purposes rather than something
2917 @c special of Gregorian chant notation. --jr
2918
2919 @item
2920 @code{1. Punctum}
2921 @tab
2922 @lilypond[staffsize=26,linewidth=1.5\cm]
2923 \include "gregorian-init.ly"
2924 \score {
2925   \transpose c c' {
2926     % Punctum
2927     \[ b \]
2928     \noBreak s^\markup {"a"} \noBreak
2929
2930     % Punctum Inclinatum
2931     \[ \inclinatum b \]
2932     \noBreak s^\markup {"b"}
2933   }
2934 \layout { \neumeDemoLayout }}
2935 @end lilypond
2936 @tab
2937 @lilypond[staffsize=26,linewidth=2.5\cm]
2938 \include "gregorian-init.ly"
2939 \score {
2940   \transpose c c' {
2941     % Punctum Auctum Ascendens
2942     \[ \auctum \ascendens b \]
2943     \noBreak s^\markup {"c"} \noBreak
2944
2945     % Punctum Auctum Descendens
2946     \[ \auctum \descendens b \]
2947     \noBreak s^\markup {"d"} \noBreak
2948
2949     % Punctum Inclinatum Auctum
2950     \[ \inclinatum \auctum b \]
2951     \noBreak s^\markup {"e"}
2952   }
2953 \layout { \neumeDemoLayout }}
2954 @end lilypond
2955 @tab
2956 @lilypond[staffsize=26,linewidth=1.0\cm]
2957 \include "gregorian-init.ly"
2958 \score {
2959   \transpose c c' {
2960     % Punctum Inclinatum Parvum
2961     \[ \inclinatum \deminutum b \]
2962     \noBreak s^\markup {"f"}
2963   }
2964 \layout { \neumeDemoLayout }}
2965 @end lilypond
2966
2967 @item
2968 @code{2. Virga}
2969 @tab
2970 @lilypond[staffsize=26,linewidth=1.0\cm]
2971 \include "gregorian-init.ly"
2972 \score {
2973   \transpose c c' {
2974     % Virga
2975     \[ \virga b \]
2976     \noBreak s^\markup {"g"}
2977   }
2978 \layout { \neumeDemoLayout }}
2979 @end lilypond
2980 @tab
2981 @tab
2982
2983 @item
2984 @code{3. Apostropha vel Stropha}
2985 @tab
2986 @lilypond[staffsize=26,linewidth=1.0\cm]
2987 \include "gregorian-init.ly"
2988 \score {
2989   \transpose c c' {
2990     % Stropha
2991     \[ \stropha b \]
2992     \noBreak s^\markup {"h"}
2993   }
2994 \layout { \neumeDemoLayout }}
2995 @end lilypond
2996 @tab
2997 @lilypond[staffsize=26,linewidth=1.0\cm]
2998 \include "gregorian-init.ly"
2999 \score {
3000   \transpose c c' {
3001     % Stropha Aucta
3002     \[ \stropha \auctum b \]
3003     \noBreak s^\markup {"i"}
3004   }
3005 \layout { \neumeDemoLayout }}
3006 @end lilypond
3007 @tab
3008
3009 @item
3010 @code{4. Oriscus}
3011 @tab
3012 @lilypond[staffsize=26,linewidth=1.0\cm]
3013 \include "gregorian-init.ly"
3014 \score {
3015   \transpose c c' {
3016     % Oriscus
3017     \[ \oriscus b \]
3018     \noBreak s^\markup {"j"}
3019   }
3020 \layout { \neumeDemoLayout }}
3021 @end lilypond
3022 @tab
3023 @tab
3024
3025 @item
3026 @code{5. Clivis vel Flexa}
3027 @tab
3028 @lilypond[staffsize=26,linewidth=1.0\cm]
3029 \include "gregorian-init.ly"
3030 \score {
3031   \transpose c c' {
3032     % Clivis vel Flexa
3033     \[ b \flexa g \]
3034     s^\markup {"k"}
3035   }
3036 \layout { \neumeDemoLayout }}
3037 @end lilypond
3038 @tab
3039 @lilypond[staffsize=26,linewidth=2.0\cm]
3040 \include "gregorian-init.ly"
3041 \score {
3042   \transpose c c' {
3043     % Clivis Aucta Descendens
3044     \[ b \flexa \auctum \descendens g \]
3045     \noBreak s^\markup {"l"} \noBreak
3046
3047     % Clivis Aucta Ascendens
3048     \[ b \flexa \auctum \ascendens g \]
3049     \noBreak s^\markup {"m"}
3050   }
3051 \layout { \neumeDemoLayout }}
3052 @end lilypond
3053 @tab
3054 @lilypond[staffsize=26,linewidth=1.0\cm]
3055 \include "gregorian-init.ly"
3056 \score {
3057   \transpose c c' {
3058     % Cephalicus
3059     \[ b \flexa \deminutum g \]
3060     s^\markup {"n"}
3061   }
3062 \layout { \neumeDemoLayout }}
3063 @end lilypond
3064
3065 @item
3066 @code{6. Podatus vel Pes}
3067 @tab
3068 @lilypond[staffsize=26,linewidth=1.0\cm]
3069 \include "gregorian-init.ly"
3070 \score {
3071   \transpose c c' {
3072     % Podatus vel Pes
3073     \[ g \pes b \]
3074     s^\markup {"o"}
3075   }
3076 \layout { \neumeDemoLayout }}
3077 @end lilypond
3078 @tab
3079 @lilypond[staffsize=26,linewidth=2.0\cm]
3080 \include "gregorian-init.ly"
3081 \score {
3082   \transpose c c' {
3083     % Pes Auctus Descendens
3084     \[ g \pes \auctum \descendens b \]
3085     \noBreak s^\markup {"p"} \noBreak
3086
3087     % Pes Auctus Ascendens
3088     \[ g \pes \auctum \ascendens b \]
3089     \noBreak s^\markup {"q"}
3090   }
3091 \layout { \neumeDemoLayout }}
3092 @end lilypond
3093 @tab
3094 @lilypond[staffsize=26,linewidth=1.0\cm]
3095 \include "gregorian-init.ly"
3096 \score {
3097   \transpose c c' {
3098     % Epiphonus
3099     \[ g \pes \deminutum b \]
3100     s^\markup {"r"}
3101   }
3102 \layout { \neumeDemoLayout }}
3103 @end lilypond
3104
3105 @item
3106 @code{7. Pes Quassus}
3107 @tab
3108 @lilypond[staffsize=26,linewidth=1.0\cm]
3109 \include "gregorian-init.ly"
3110 \score {
3111   \transpose c c' {
3112     % Pes Quassus
3113     \[ \oriscus g \pes \virga b \]
3114     s^\markup {"s"}
3115   }
3116 \layout { \neumeDemoLayout }}
3117 @end lilypond
3118 @tab
3119 @lilypond[staffsize=26,linewidth=1.0\cm]
3120 \include "gregorian-init.ly"
3121 \score {
3122   \transpose c c' {
3123     % Pes Quassus Auctus Descendens
3124     \[ \oriscus g \pes \auctum \descendens b \]
3125     s^\markup {"t"}
3126   }
3127 \layout { \neumeDemoLayout }}
3128 @end lilypond
3129 @tab
3130
3131 @item
3132 @code{8. Quilisma Pes}
3133 @tab
3134 @lilypond[staffsize=26,linewidth=1.0\cm]
3135 \include "gregorian-init.ly"
3136 \score {
3137   \transpose c c' {
3138     % Quilisma Pes
3139     \[ \quilisma g \pes b \]
3140     s^\markup {"u"}
3141   }
3142 \layout { \neumeDemoLayout }}
3143 @end lilypond
3144 @tab
3145 @lilypond[staffsize=26,linewidth=1.0\cm]
3146 \include "gregorian-init.ly"
3147 \score {
3148   \transpose c c' {
3149     % Quilisma Pes Auctus Descendens
3150     \[ \quilisma g \pes \auctum \descendens b \]
3151     s^\markup {"v"}
3152   }
3153 \layout { \neumeDemoLayout }}
3154 @end lilypond
3155 @tab
3156
3157 @item
3158 @code{9. Podatus Initio Debilis}
3159 @tab
3160 @lilypond[staffsize=26,linewidth=1.0\cm]
3161 \include "gregorian-init.ly"
3162 \score {
3163   \transpose c c' {
3164     % Pes Initio Debilis
3165     \[ \deminutum g \pes b \]
3166     s^\markup {"w"}
3167   }
3168 \layout { \neumeDemoLayout }}
3169 @end lilypond
3170 @tab
3171 @lilypond[staffsize=26,linewidth=1.0\cm]
3172 \include "gregorian-init.ly"
3173 \score {
3174   \transpose c c' {
3175     % Pes Auctus Descendens Initio Debilis
3176     \[ \deminutum g \pes \auctum \descendens b \]
3177     s^\markup {"x"}
3178   }
3179 \layout { \neumeDemoLayout }}
3180 @end lilypond
3181 @tab
3182
3183 @item
3184 @code{10. Torculus}
3185 @tab
3186 @lilypond[staffsize=26,linewidth=1.0\cm]
3187 \include "gregorian-init.ly"
3188 \score {
3189   \transpose c c' {
3190     % Torculus
3191     \[ a \pes b \flexa g \]
3192     s^\markup {"y"}
3193   }
3194 \layout { \neumeDemoLayout }}
3195 @end lilypond
3196 @tab
3197 @lilypond[staffsize=26,linewidth=1.0\cm]
3198 \include "gregorian-init.ly"
3199 \score {
3200   \transpose c c' {
3201     % Torculus Auctus Descendens
3202     \[ a \pes b \flexa \auctum \descendens g \]
3203     s^\markup {"z"}
3204   }
3205 \layout { \neumeDemoLayout }}
3206 @end lilypond
3207 @tab
3208 @lilypond[staffsize=26,linewidth=1.0\cm]
3209 \include "gregorian-init.ly"
3210 \score {
3211   \transpose c c' {
3212     % Torculus Deminutus
3213     \[ a \pes b \flexa \deminutum g \]
3214     s^\markup {"A"}
3215   }
3216 \layout { \neumeDemoLayout }}
3217 @end lilypond
3218
3219 @item
3220 @code{11. Torculus Initio Debilis}
3221 @tab
3222 @lilypond[staffsize=26,linewidth=1.0\cm]
3223 \include "gregorian-init.ly"
3224 \score {
3225   \transpose c c' {
3226     % Torculus Initio Debilis
3227     \[ \deminutum a \pes b \flexa g \]
3228     s^\markup {"B"}
3229   }
3230 \layout { \neumeDemoLayout }}
3231 @end lilypond
3232 @tab
3233 @lilypond[staffsize=26,linewidth=1.0\cm]
3234 \include "gregorian-init.ly"
3235 \score {
3236   \transpose c c' {
3237     % Torculus Auctus Descendens Initio Debilis
3238     \[ \deminutum a \pes b \flexa \auctum \descendens g \]
3239     s^\markup {"C"}
3240   }
3241 \layout { \neumeDemoLayout }}
3242 @end lilypond
3243 @tab
3244 @lilypond[staffsize=26,linewidth=1.0\cm]
3245 \include "gregorian-init.ly"
3246 \score {
3247   \transpose c c' {
3248     % Torculus Deminutus Initio Debilis
3249     \[ \deminutum a \pes b \flexa \deminutum g \]
3250     s^\markup {"D"}
3251   }
3252 \layout { \neumeDemoLayout }}
3253 @end lilypond
3254
3255 @item
3256 @code{12. Porrectus}
3257 @tab
3258 @lilypond[staffsize=26,linewidth=1.0\cm]
3259 \include "gregorian-init.ly"
3260 \score {
3261   \transpose c c' {
3262     % Porrectus
3263     \[ a \flexa g \pes b \]
3264     s^\markup {"E"}
3265   }
3266 \layout { \neumeDemoLayout }}
3267 @end lilypond
3268 @tab
3269 @lilypond[staffsize=26,linewidth=1.0\cm]
3270 \include "gregorian-init.ly"
3271 \score {
3272   \transpose c c' {
3273     % Porrectus Auctus Descendens
3274     \[ a \flexa g \pes \auctum \descendens b \]
3275     s^\markup {"F"}
3276   }
3277 \layout { \neumeDemoLayout }}
3278 @end lilypond
3279 @tab
3280 @lilypond[staffsize=26,linewidth=1.0\cm]
3281 \include "gregorian-init.ly"
3282 \score {
3283   \transpose c c' {
3284     % Porrectus Deminutus
3285     \[ a \flexa g \pes \deminutum b \]
3286     s^\markup {"G"}
3287   }
3288 \layout { \neumeDemoLayout }}
3289 @end lilypond
3290
3291 @item
3292 @code{13. Climacus}
3293 @tab
3294 @lilypond[staffsize=26,linewidth=1.0\cm]
3295 \include "gregorian-init.ly"
3296 \score {
3297   \transpose c c' {
3298     % Climacus
3299     \[ \virga b \inclinatum a \inclinatum g \]
3300     s^\markup {"H"}
3301   }
3302   \layout { \neumeDemoLayout }
3303 }
3304 @end lilypond
3305 @tab
3306 @lilypond[staffsize=26,linewidth=1.0\cm]
3307 \include "gregorian-init.ly"
3308 \score {
3309   \transpose c c' {
3310     % Climacus Auctus
3311     \[ \virga b \inclinatum a \inclinatum \auctum g \]
3312     s^\markup {"I"}
3313   }
3314 \layout { \neumeDemoLayout }}
3315 @end lilypond
3316 @tab
3317 @lilypond[staffsize=26,linewidth=1.0\cm]
3318 \include "gregorian-init.ly"
3319 \score {
3320   \transpose c c' {
3321     % Climacus Deminutus
3322     \[ \virga b \inclinatum a \inclinatum \deminutum g \]
3323     s^\markup {"J"}
3324   }
3325 \layout { \neumeDemoLayout }}
3326 @end lilypond
3327
3328 @item
3329 @code{14. Scandicus}
3330 @tab
3331 @lilypond[staffsize=26,linewidth=1.0\cm]
3332 \include "gregorian-init.ly"
3333 \score {
3334   \transpose c c' {
3335     % Scandicus
3336     \[ g \pes a \virga b \]
3337     s^\markup {"K"}
3338   }
3339 \layout { \neumeDemoLayout }}
3340 @end lilypond
3341 @tab
3342 @lilypond[staffsize=26,linewidth=1.0\cm]
3343 \include "gregorian-init.ly"
3344 \score {
3345   \transpose c c' {
3346     % Scandicus Auctus Descendens
3347     \[ g \pes a \pes \auctum \descendens b \]
3348     s^\markup {"L"}
3349   }
3350 \layout { \neumeDemoLayout }}
3351 @end lilypond
3352 @tab
3353 @lilypond[staffsize=26,linewidth=1.0\cm]
3354 \include "gregorian-init.ly"
3355 \score {
3356   \transpose c c' {
3357     % Scandicus Deminutus
3358     \[ g \pes a \pes \deminutum b \]
3359     s^\markup {"M"}
3360   }
3361 \layout { \neumeDemoLayout }}
3362 @end lilypond
3363
3364 @item
3365 @code{15. Salicus}
3366 @tab
3367 @lilypond[staffsize=26,linewidth=1.0\cm]
3368 \include "gregorian-init.ly"
3369 \score {
3370   \transpose c c' {
3371     % Salicus
3372     \[ g \oriscus a \pes \virga b \]
3373     s^\markup {"N"}
3374   }
3375 \layout { \neumeDemoLayout }}
3376 @end lilypond
3377 @tab
3378 @lilypond[staffsize=26,linewidth=1.0\cm]
3379 \include "gregorian-init.ly"
3380 \score {
3381   \transpose c c' {
3382     % Salicus Auctus Descendens
3383     \[ g \oriscus a \pes \auctum \descendens b \]
3384     s^\markup {"O"}
3385   }
3386 \layout { \neumeDemoLayout }}
3387 @end lilypond
3388 @tab
3389
3390 @item
3391 @code{16. Trigonus}
3392 @tab
3393 @lilypond[staffsize=26,linewidth=1.0\cm]
3394 \include "gregorian-init.ly"
3395 \score {
3396   \transpose c c' {
3397     % Trigonus
3398     \[ \stropha b \stropha b \stropha a \]
3399     s^\markup {"P"}
3400   }
3401   \layout { \neumeDemoLayout }
3402 }
3403 @end lilypond
3404 @tab
3405 @tab
3406
3407 @end multitable
3408
3409
3410 Unlike most other neumes notation systems, the input language for
3411 neumes does not reflect the typographical appearance, but is designed
3412 to focus on musical meaning.  For example, @code{\[ a \pes b
3413 \flexa g \]} produces a Torculus consisting of three Punctum heads,
3414 while @code{\[ a \flexa g \pes b \]} produces a Porrectus with a
3415 curved flexa shape and only a single Punctum head.  There is no
3416 command to explicitly typeset the curved flexa shape; the decision of
3417 when to typeset a curved flexa shape is based on the musical
3418 input.  The idea of this approach is to separate the musical aspects
3419 of the input from the notation style of the output.  This way, the
3420 same input can be reused to typeset the same music in a different
3421 style of Gregorian chant notation.
3422
3423 The following table shows the code fragments that produce the
3424 ligatures in the above neumes table.  The letter in the first column
3425 in each line of the below table indicates to which ligature in the
3426 above table it refers.  The second column gives the name of the
3427 ligature.  The third column shows the code fragment that produces this
3428 ligature, using @code{g}, @code{a}, and @code{b} as example pitches.
3429
3430 @multitable @columnfractions .02 .31 .67
3431 @item
3432 @b{#}
3433 @tab
3434 @b{Name}
3435 @tab
3436 @b{Input Language}
3437
3438 @item
3439 a
3440 @tab
3441 Punctum
3442 @tab
3443 @code{\[ b \]}
3444
3445 @item
3446 b
3447 @tab
3448 Punctum Inclinatum
3449 @tab
3450 @code{\[ \inclinatum b \]}
3451
3452 @item
3453 c
3454 @tab
3455 Punctum Auctum@*
3456 Ascendens
3457 @tab
3458 @code{\[ \auctum \ascendens b \]}
3459
3460 @item
3461 d
3462 @tab
3463 Punctum Auctum@*
3464 Descendens
3465 @tab
3466 @code{\[ \auctum \descendens b \]}
3467
3468 @item
3469 e
3470 @tab
3471 Punctum Inclinatum@*
3472 Auctum
3473 @tab
3474 @code{\[ \inclinatum \auctum b \]}
3475
3476 @item
3477 f
3478 @tab
3479 Punctum Inclinatum@*
3480 Parvum @tab
3481 @code{\[ \inclinatum \deminutum b \]}
3482
3483 @item
3484 g
3485 @tab
3486 Virga
3487 @tab
3488 @code{\[ \virga b \]}
3489
3490 @item
3491 h
3492 @tab
3493 Stropha
3494 @tab
3495 @code{\[ \stropha b \]}
3496
3497 @item
3498 i
3499 @tab
3500 Stropha Aucta
3501 @tab
3502 @code{\[ \stropha \auctum b \]}
3503
3504 @item
3505 j
3506 @tab
3507 Oriscus
3508 @tab
3509 @code{\[ \oriscus b \]}
3510
3511 @item
3512 k
3513 @tab
3514 Clivis vel Flexa
3515 @tab
3516 @code{\[ b \flexa g \]}
3517
3518 @item
3519 l
3520 @tab
3521 Clivis Aucta@*
3522 Descendens
3523 @tab
3524 @code{\[ b \flexa \auctum \descendens g \]}
3525
3526 @item
3527 m
3528 @tab
3529 Clivis Aucta@*
3530 Ascendens
3531 @tab
3532 @code{\[ b \flexa \auctum \ascendens g \]}
3533
3534 @item
3535 n
3536 @tab
3537 Cephalicus
3538 @tab
3539 @code{\[ b \flexa \deminutum g \]}
3540
3541 @item
3542 o
3543 @tab
3544 Podatus vel Pes
3545 @tab
3546 @code{\[ g \pes b \]}
3547
3548 @item
3549 p
3550 @tab
3551 Pes Auctus@*
3552 Descendens
3553 @tab
3554 @code{\[ g \pes \auctum \descendens b \]}
3555
3556 @item
3557 q
3558 @tab
3559 Pes Auctus@*
3560 Ascendens
3561 @tab
3562 @code{\[ g \pes \auctum \ascendens b \]}
3563
3564 @item
3565 r
3566 @tab
3567 Epiphonus
3568 @tab
3569 @code{\[ g \pes \deminutum b \]}
3570
3571 @item
3572 s
3573 @tab
3574 Pes Quassus
3575 @tab
3576 @code{\[ \oriscus g \pes \virga b \]}
3577
3578 @item
3579 t
3580 @tab
3581 Pes Quassus@*
3582 Auctus Descendens @tab
3583 @code{\[ \oriscus g \pes \auctum \descendens b \]}
3584
3585 @item
3586 u
3587 @tab
3588 Quilisma Pes
3589 @tab
3590 @code{\[ \quilisma g \pes b \]}
3591
3592 @item
3593 v
3594 @tab
3595 Quilisma Pes@*
3596 Auctus Descendens
3597 @tab
3598 @code{\[ \quilisma g \pes \auctum \descendens b \]}
3599
3600 @item
3601 w
3602 @tab
3603 Pes Initio Debilis
3604 @tab
3605 @code{\[ \deminutum g \pes b \]}
3606
3607 @item
3608 x
3609 @tab
3610 Pes Auctus Descendens@*
3611 Initio Debilis
3612 @tab
3613 @code{\[ \deminutum g \pes \auctum \descendens b \]}
3614
3615 @item
3616 y
3617 @tab
3618 Torculus
3619 @tab
3620 @code{\[ a \pes b \flexa g \]}
3621
3622 @item
3623 z
3624 @tab
3625 Torculus Auctus@*
3626 Descendens
3627 @tab
3628 @code{\[ a \pes b \flexa \auctum \descendens g \]}
3629
3630 @item
3631 A
3632 @tab
3633 Torculus Deminutus
3634 @tab
3635 @code{\[ a \pes b \flexa \deminutum g \]}
3636
3637 @item
3638 B
3639 @tab
3640 Torculus Initio Debilis
3641 @tab
3642 @code{\[ \deminutum a \pes b \flexa g \]}
3643
3644 @item
3645 C
3646 @tab
3647 Torculus Auctus@*
3648 Descendens Initio Debilis
3649 @tab
3650 @code{\[ \deminutum a \pes b \flexa \auctum \descendens g \]}
3651
3652 @item
3653 D
3654 @tab
3655 Torculus Deminutus@*
3656 Initio Debilis
3657 @tab
3658 @code{\[ \deminutum a \pes b \flexa \deminutum g \]}
3659
3660 @item
3661 E
3662 @tab
3663 Porrectus
3664 @tab
3665 @code{\[ a \flexa g \pes b \]}
3666
3667 @item
3668 F
3669 @tab
3670 Porrectus Auctus@*
3671 Descendens
3672 @tab
3673 @code{\[ a \flexa g \pes \auctum \descendens b \]}
3674
3675 @item
3676 G
3677 @tab
3678 Porrectus Deminutus
3679 @tab
3680 @code{\[ a \flexa g \pes \deminutum b \]}
3681
3682 @item
3683 H
3684 @tab
3685 Climacus
3686 @tab
3687 @code{\[ \virga b \inclinatum a \inclinatum g \]}
3688
3689 @item
3690 I
3691 @tab
3692 Climacus Auctus
3693 @tab
3694 @code{\[ \virga b \inclinatum a \inclinatum \auctum g \]}
3695
3696 @item
3697 J
3698 @tab
3699 Climacus Deminutus
3700 @tab
3701 @code{\[ \virga b \inclinatum a \inclinatum \deminutum g \]}
3702
3703 @item
3704 K
3705 @tab
3706 Scandicus
3707 @tab
3708 @code{\[ g \pes a \virga b \]}
3709
3710 @item
3711 L
3712 @tab
3713 Scandicus Auctus@*
3714 Descendens
3715 @tab
3716 @code{\[ g \pes a \pes \auctum \descendens b \]}
3717
3718 @item
3719 M
3720 @tab
3721 Scandicus Deminutus
3722 @tab
3723 @code{\[ g \pes a \pes \deminutum b \]}
3724
3725 @item
3726 N
3727 @tab
3728 Salicus
3729 @tab
3730 @code{\[ g \oriscus a \pes \virga b \]}
3731
3732 @item
3733 O
3734 @tab
3735 Salicus Auctus Descendens
3736 @tab
3737 @code{\[ g \oriscus a \pes \auctum \descendens b \]}
3738
3739 @item
3740 P
3741 @tab
3742 Trigonus
3743 @tab
3744 @code{\[ \stropha b \stropha b \stropha a \]}
3745 @end multitable
3746
3747 @refcommands
3748
3749 The following head prefixes are supported
3750
3751 @cindex @code{\virga}
3752 @code{\virga},
3753 @cindex @code{\stropha}
3754 @code{\stropha},
3755 @cindex @code{\inclinatum}
3756 @code{\inclinatum},
3757 @cindex @code{\auctum}
3758 @code{\auctum},
3759 @cindex @code{\descendens}
3760 @code{\descendens},
3761 @cindex @code{\ascendens}
3762 @code{\ascendens},
3763 @cindex @code{\oriscus}
3764 @code{\oriscus},
3765 @cindex @code{\quilisma}
3766 @code{\quilisma},
3767 @cindex @code{\deminutum}
3768 @code{\deminutum}.
3769
3770 Head prefixes can be accumulated, though restrictions apply.  For
3771 example, either @code{\descendens} or @code{\ascendens} can be applied
3772 to a head, but not both to the same head.
3773
3774 @cindex @code{\pes}
3775 @cindex @code{\flexa}
3776 Two adjacent heads can be tied together with the @code{\pes} and
3777 @code{\flexa} infix commands for a rising and falling line of melody,
3778 respectively.
3779
3780
3781
3782 @node Gregorian Chant contexts
3783 @subsection Gregorian Chant contexts
3784
3785 @cindex VaticanaVoiceContext
3786 @cindex VaticanaStaffContext
3787
3788 The predefined @code{VaticanaVoiceContext} and
3789 @code{VaticanaStaffContext} can be used to engrave a piece of
3790 Gregorian Chant in the style of the Editio Vaticana.  These contexts
3791 initialize all relevant context properties and grob properties to
3792 proper values, so you can immediately go ahead entering the chant, as
3793 the following excerpt demonstrates
3794
3795 @lilypond[quote,raggedright,packed,verbatim]
3796 \include "gregorian-init.ly"
3797 \score {
3798   <<
3799     \context VaticanaVoice = "cantus" {
3800       \override Staff.StaffSymbol #'color = #red
3801       \override Staff.LedgerLineSpanner #'color = #red
3802       \override Score.BarNumber #'transparent = ##t {
3803         \[ c'\melisma c' \flexa a \]
3804         \[ a \flexa \deminutum g\melismaEnd \]
3805         f \divisioMinima
3806         \[ f\melisma \pes a c' c' \pes d'\melismaEnd \]
3807         c' \divisioMinima \break
3808         \[ c'\melisma c' \flexa a \]
3809         \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
3810       }
3811     }
3812     \lyricsto "cantus" \new Lyrics {
3813       San- ctus, San- ctus, San- ctus
3814     }
3815   >>
3816 }
3817 @end lilypond
3818
3819
3820 @node Mensural contexts
3821 @subsection Mensural contexts
3822
3823 @cindex MensuralVoiceContext
3824 @cindex MensuralStaffContext
3825
3826 The predefined @code{MensuralVoiceContext} and
3827 @code{MensuralStaffContext} can be used to engrave a piece in mensural
3828 style.  These contexts initialize all relevant context properties and
3829 grob properties to proper values, so you can immediately go ahead
3830 entering the chant, as the following excerpt demonstrates
3831
3832 @lilypond[quote,raggedright,verbatim]
3833 \score {
3834   <<
3835     \context MensuralVoice = "discantus" \transpose c c' {
3836       \override Score.BarNumber #'transparent = ##t {
3837         c'1\melisma bes a g\melismaEnd
3838         f\breve
3839         \[ f1\melisma a c'\breve d'\melismaEnd \]
3840         c'\longa
3841         c'\breve\melisma a1 g1\melismaEnd
3842         fis\longa^\signumcongruentiae
3843       }
3844     }
3845     \lyricsto "discantus" \new Lyrics {
3846       San -- ctus, San -- ctus, San -- ctus
3847     }
3848   >>
3849 }
3850 @end lilypond
3851
3852 @node Musica ficta accidentals
3853 @subsection Musica ficta accidentals
3854
3855 In European music from before about 1600, singers were often expected
3856 to chromatically alter notes at their own initiative. This is called
3857 ``Musica Ficta''. In modern transcriptions, these accidentals are
3858 usually printed over the note.
3859
3860 @cindex Musica ficta
3861
3862 Support for such suggested accidentals is included, and can be
3863 switched on by setting @code{suggestAccidentals} to true.
3864
3865 @cindex @code{suggestAccidentals}
3866
3867 @lilypond[verbatim,fragment,relative=1]
3868 fis gis
3869 \set suggestAccidentals = ##t
3870 ais bis
3871 @end lilypond 
3872
3873 @seealso
3874
3875 Program reference: @internalsref{Accidental_engraver} engraver and the
3876 @internalsref{AccidentalSuggestion} object.
3877
3878 @node Figured bass
3879 @subsection Figured bass
3880
3881 @cindex Basso continuo
3882
3883 @c TODO: musicological blurb about FB
3884
3885
3886 LilyPond has limited support for figured bass
3887
3888 @lilypond[quote,raggedright,verbatim,fragment]
3889 <<
3890   \context Voice { \clef bass dis4 c d ais g fis}
3891   \context FiguredBass \figuremode {
3892     < 6 >4 < 7 >8 < 6+ [_!] >
3893     < 6 >4 <6 5 [3+] >
3894     < _ >4 < 6 >4
3895   }
3896 >>
3897 @end lilypond
3898
3899 The support for figured bass consists of two parts: there is an input
3900 mode, introduced by @code{\figuremode}, where you can enter bass figures
3901 as numbers, and there is a context called @internalsref{FiguredBass} that
3902 takes care of making @internalsref{BassFigure} objects.
3903
3904 In figures input mode, a group of bass figures is delimited by
3905 @code{<} and @code{>}.  The duration is entered after the @code{>}
3906 @example
3907 <4 6>
3908 @end example
3909 @lilypond[quote,raggedright,fragment]
3910 \context FiguredBass
3911 \figuremode { <4 6> }
3912 @end lilypond
3913
3914 Accidentals are added when you append @code{-}, @code{!}, and @code{+}
3915 to the numbers
3916
3917 @example
3918 <4- 6+ 7!>
3919 @end example
3920 @lilypond[quote,raggedright,fragment]
3921 \context FiguredBass
3922 \figuremode { <4- 6+ 7!> }
3923 @end lilypond
3924
3925 Spaces or dashes may be inserted by using @code{_}.  Brackets are
3926 introduced with @code{[} and @code{]}. You can also include text
3927 strings and text markups, see @ref{Overview of text markup commands}.
3928
3929 @example
3930 < [4 6] 8 [_! 12] > < 5 \markup @{ + \number 6 @} >
3931 @end example
3932 @lilypond[quote,raggedright,fragment]
3933 \context FiguredBass
3934 \figuremode { < [4 6] 8 [_! 12] > < 5 \markup{ + \number 6 } > }
3935 @end lilypond
3936
3937
3938 Although the support for figured bass may superficially resemble chord
3939 support, it works much simpler.  The @code{\figuremode} mode simply
3940 stores the numbers and @internalsref{FiguredBass} context prints
3941 them as entered.  There is no conversion to pitches and no
3942 realizations of the bass are played in the MIDI file.
3943
3944 Internally, the code produces markup texts.  You can use any of the
3945 markup text properties to override formatting.  For example, the
3946 vertical spacing of the figures may be set with @code{baseline-skip}.
3947
3948 @seealso
3949
3950 Program reference: @internalsref{BassFigure} object,
3951 @internalsref{FiguredBass} context.
3952
3953 @refbugs
3954
3955 Slash notation for alterations is not supported.
3956
3957
3958
3959 @node Other instrument specific notation
3960 @section Other instrument specific notation
3961
3962 This section includes extra information for writing for instruments.
3963
3964 @menu
3965 * Artificial harmonics (strings)::  
3966 @end menu
3967
3968 @node Artificial harmonics (strings)
3969 @subsection Artificial harmonics (strings)
3970
3971 @cindex artificial harmonics
3972
3973 Artificial harmonics are notated with a different notehead style.  They
3974 are entered by marking the harmonic pitch with @code{\harmonic}.
3975
3976 @lilypond[raggedright,verbatim,quote,fragment,relative=1]
3977 <c g'\harmonic>4
3978 @end lilypond
3979