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