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