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