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