]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/notation/fretted-strings.itely
Doc: cleanup @file{}, take 2: remove all @/ escaping sequences.
[lilypond.git] / Documentation / notation / fretted-strings.itely
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @ignore
3     Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
4
5     When revising a translation, copy the HEAD committish of the
6     version that you are working on.  For details, see the Contributors'
7     Guide, node Updating translation committishes..
8 @end ignore
9
10 @c \version "2.13.36"
11
12 @node Fretted string instruments
13 @section Fretted string instruments
14
15 @lilypondfile[quote]{fretted-headword.ly}
16
17 This section discusses several aspects of music notation that are unique
18 to fretted string instruments.
19
20 @cindex tablature
21 @cindex tablature, guitar
22 @cindex tablature, banjo
23 @cindex guitar tablature
24 @cindex banjo tablature
25
26 @menu
27 * Common notation for fretted strings::
28 * Guitar::
29 * Banjo::
30 @end menu
31
32 @node Common notation for fretted strings
33 @subsection Common notation for fretted strings
34
35 This section discusses common notation that is unique
36 to fretted string instruments.
37
38 @menu
39 * References for fretted strings::
40 * String number indications::
41 * Default tablatures::
42 * Custom tablatures::
43 * Fret diagram markups::
44 * Predefined fret diagrams::
45 * Automatic fret diagrams::
46 * Right-hand fingerings::
47 @end menu
48
49 @node References for fretted strings
50 @unnumberedsubsubsec References for fretted strings
51
52 Music for fretted string instruments is normally notated on
53 a single staff, either in traditional music notation or in
54 tablature.  Sometimes the two types are combined, and it is
55 especially common in popular music to use chord diagrams above
56 a staff of traditional notation.  The guitar and the banjo are
57 transposing instruments, sounding an octave lower than written.
58 Scores for these instruments should use the @code{"treble_8"} clef (or
59 @code{\transposition c} to get correct MIDI output).
60 Some other elements pertinent to fretted string instruments
61 are covered elsewhere:
62
63 @itemize
64 @item Fingerings are indicated as shown in @ref{Fingering instructions}.
65
66 @item Instructions for @notation{Laissez vibrer} ties
67 as well as ties on arpeggios and tremolos can be found in
68 @ref{Ties}.
69
70 @item Instructions for handling multiple voices can be found
71 in @ref{Collision resolution}.
72
73 @item Instructions for indicating harmonics can be found in
74 @ref{Harmonics}.
75
76 @end itemize
77
78
79 @seealso
80 Notation Reference:
81 @ref{Fingering instructions},
82 @ref{Ties},
83 @ref{Collision resolution},
84 @ref{Instrument names},
85 @ref{Writing music in parallel},
86 @ref{Arpeggio},
87 @ref{List of articulations},
88 @ref{Clef},
89 @ref{Instrument transpositions}.
90
91
92 @node String number indications
93 @unnumberedsubsubsec String number indications
94
95 @cindex string numbers
96 @cindex string vs. fingering numbers
97 @cindex fingering vs. string numbers
98
99 The string on which a note should be played may be indicated by
100 appending @code{\@var{number}} to a note inside a chord construct
101 @code{<>}.
102
103 @warning{String numbers @strong{must} be defined inside a chord
104 construct even if there is only a single note.}
105
106 @lilypond[verbatim,quote,relative=0]
107 \clef "treble_8"
108 <c\5>4 <e\4> <g\3>2
109 <c,\5 e\4 g\3>1
110 @end lilypond
111
112 When fingerings and string indications are used together, their
113 placement is controlled by the order in which the two items appear
114 in the code:
115
116 @lilypond[verbatim,quote,relative=1]
117 \clef "treble_8"
118 <g\3-0>2
119 <g-0\3>
120 @end lilypond
121
122 @snippets
123
124 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
125 {controlling-the-placement-of-chord-fingerings.ly}
126
127 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
128 {allowing-fingerings-to-be-printed-inside-the-staff.ly}
129
130
131 @seealso
132 Notation Reference:
133 @ref{Fingering instructions}.
134
135 Snippets:
136 @rlsr{Fretted strings}.
137
138 Internals Reference:
139 @rinternals{StringNumber},
140 @rinternals{Fingering}.
141
142
143 @node Default tablatures
144 @unnumberedsubsubsec Default tablatures
145
146 @cindex tablatures, basic
147 @cindex tablatures, default
148
149 @funindex TabStaff
150 @funindex TabVoice
151
152 Music for plucked string instruments is frequently notated using a
153 finger/touch notation or tablature.  In contrast to traditional
154 notation pitches are not denoted with note heads, but by numbers (or
155 letterlike symbols in historical intavolatura).  The numbers
156 indicate on which string and fret a note must be played.  The numbers
157 are printed on top of each other if they are to be played
158 simultaneously.
159
160 By default, string 1 is the highest, and the tuning defaults to the
161 standard guitar tuning (with 6 strings).  The notes are printed as
162 tablature, by using @code{TabStaff} and @code{TabVoice} contexts.  A
163 calligraphic tablature clef is added automatically.
164
165 @lilypond[quote,ragged-right,verbatim]
166 \new TabStaff \relative c' {
167   a,8 a' <c e> a
168   d,8 a' <d f> a
169 }
170 @end lilypond
171
172 Default tablatures do not contain any symbols for tone duration nor any
173 other musical symbols such as e.g. expressive marks.
174
175 @lilypond[quote,ragged-right,verbatim]
176 symbols = {
177   \time 3/4
178   c4-.^"Allegro" d( e)
179   f4-.\f g a^\fermata
180   \mark \default
181   c8_.\<\( c16 c~ c2\!
182   c'2.\prall\)
183 }
184
185 \score {
186   <<
187     \new Staff { \clef "G_8" \symbols }
188     \new TabStaff { \symbols }
189   >>
190 }
191 @end lilypond
192
193 @funindex \tabFullNotation
194
195 If all musical symbols used in traditional notation should also show up
196 in tablature one has to apply the command @code{\tabFullNotation} in a
197 @code{TabStaff}-context.  Please bear in mind that half notes are
198 double-stemmed in tablature in order to distinguish them from quarter
199 notes.
200
201 @lilypond[quote,ragged-right,verbatim]
202 symbols = {
203   \time 3/4
204   c4-.^"Allegro" d( e)
205   f4-.\f g a^\fermata
206   \mark \default
207   c8_.\<\( c16 c~ c2\!
208   c'2.\prall\)
209 }
210
211 \score {
212   \new TabStaff {
213     \tabFullNotation
214     \symbols
215   }
216 }
217 @end lilypond
218
219 @cindex fret
220
221 @funindex minimumFret
222
223 By default pitches are assigned to the lowest playing position on the
224 fret-board (first position).  Open strings are automatically preferred.
225 If you would like a certain pitch to be played on a specific string
226 you can add a string number indication to the pitch name.  If you
227 define pitch names and string numbers without a chord construct
228 (@code{<>}) the string number indications do not appear in traditional
229 notation.  It is much more comfortable to define the playing position
230 by using the value of @code{minimumFret}.  The default value for
231 minimumFret is 0.
232
233
234 @lilypond[quote,ragged-right,verbatim]
235 \new StaffGroup <<
236    \new Staff \relative c {
237      \clef "treble_8"
238      \time 2/4
239      c16 d e f g4
240      c,16\5 d\5 e\4 f\4 g4\4
241      c,16 d e f g4
242    }
243    \new TabStaff \relative c {
244      c16 d e f g4
245      c,16\5 d\5 e\4 f\4 g4\4
246      \set TabStaff.minimumFret = #5
247      c,16 d e f g4
248    }
249 >>
250 @end lilypond
251
252 @funindex \tabChordRepetition
253
254 Chord constructs can be repeated by the chord repetition symbol @code{q}.
255 To use this feature in combination with tablature, @code{\tabChordRepetition}
256 is provided.  It preserves the string information explicitly given within
257 chord constructs so repeated chords get identical tablature representations.
258
259 @lilypond[quote,verbatim]
260 \tabChordRepetition
261
262 guitar = \relative c' {
263   r8 <gis\4 cis\3 b\2>~ q4 q8~ q q4
264 }
265
266 \new StaffGroup <<
267   \new Staff {
268     \clef "treble_8"
269     \override Voice.StringNumber #'transparent = ##t
270     \guitar
271   }
272   \new TabStaff {
273     \guitar
274   }
275 >>
276 @end lilypond
277
278
279 Ties over a line break are parenthesized by default.  The same holds for
280 the second alternative of a repeat.
281
282 @lilypond[quote,ragged-right,verbatim]
283 ties = \relative c' {
284   \repeat volta 2 {
285     e2. f4~
286     f2 g2~
287   }
288   \alternative {
289      { g4 f2. }
290      { g4\repeatTie c,2. }
291   }
292   b1~
293   \break
294   b1
295   \bar "|."
296 }
297
298 \score {
299   <<
300     \new StaffGroup  <<
301       \context Staff {
302         \clef "treble_8"
303         \ties
304       }
305       \context TabStaff {
306         \ties
307       }
308     >>
309   >>
310   \layout {
311   indent = #0
312   ragged-right = ##t
313   }
314 }
315 @end lilypond
316
317 @funindex \hideSplitTiedTabNotes
318
319 The command @code{\hideSplitTiedTabNotes} cancels the behavior of
320 engraving fret numbers in parentheses:
321
322 @lilypond[quote,ragged-right,verbatim]
323 ties = \relative c' {
324   \repeat volta 2 {
325     e2. f4~
326     f2 g2~ }
327   \alternative {
328     { g4 f2. }
329     { g4\repeatTie c,2. }
330   }
331   b1~
332   \break
333   b1
334   \bar "|."
335 }
336
337 \score {
338   <<
339     \new StaffGroup  <<
340       \context Staff {
341         \clef "treble_8"
342         \ties
343       }
344       \context TabStaff {
345       \hideSplitTiedTabNotes
346         \ties
347       }
348     >>
349   >>
350   \layout {
351   indent = #0
352   ragged-right = ##t
353   }
354 }
355 @end lilypond
356
357 @cindex harmonic indications in tablature notation
358 @cindex tablature and harmonic indications
359 @cindex slides in tablature notation
360 @cindex tablature and slides
361
362 Harmonic indications and slides can be added to tablature
363 notation.
364
365 @lilypond[verbatim, quote, relative=1]
366 \new TabStaff {
367   \new TabVoice {
368     <c g'\harmonic>4 d\2\glissando e\2
369   }
370 }
371 @end lilypond
372
373
374 @snippets
375
376 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
377 {stem-and-beam-behavior-in-tablature.ly}
378
379 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
380 {polyphony-in-tablature.ly}
381
382
383 @seealso
384 Notation Reference:
385 @ref{Stems}.
386
387 Snippets:
388 @rlsr{Fretted strings}.
389
390 Internals Reference:
391 @rinternals{TabNoteHead},
392 @rinternals{TabStaff},
393 @rinternals{TabVoice},
394 @rinternals{Beam}.
395
396
397 @knownissues
398
399 Chords are not handled in a special way, and hence the automatic
400 string selector may easily select the same string for two notes in
401 a chord.
402
403 In order to handle @code{\partcombine}, a @code{TabStaff} must use
404 specially-created voices:
405
406 @lilypond[quote,ragged-right,verbatim]
407 melodia = \partcombine { e4 g g g } { e4 e e e }
408 <<
409   \new TabStaff <<
410     \new TabVoice = "one" s1
411     \new TabVoice = "two" s1
412     \new TabVoice = "shared" s1
413     \new TabVoice = "solo" s1
414     { \melodia }
415   >>
416 >>
417 @end lilypond
418
419 Guitar special effects are limited to harmonics and slides.
420
421 @node Custom tablatures
422 @unnumberedsubsubsec Custom tablatures
423
424 @cindex tablatures, custom
425 @cindex tablature, banjo
426 @cindex tablature, mandolin
427 @cindex tablature, guitar
428 @cindex tablature, bass guitar
429 @cindex tablature, ukulele
430 @cindex tablature, predefined string tunings
431 @cindex fretted instruments, predefined string tunings
432 @cindex predefined string tunings for fretted instruments
433
434 @funindex StringTunings
435
436 LilyPond tabulature automatically calculates the fret for
437 a note based on the string to which the note is assigned.
438 In order to do this, the tuning of the strings must be
439 specified.  The tuning of the strings is given in the
440 @code{stringTunings} property.
441
442 LilyPond comes with predefined string tunings for banjo, mandolin,
443 guitar, bass guitar and ukulele.  LilyPond automatically sets
444 the correct transposition for predefined tunings.  The following
445 example is for bass guitar, which sounds an octave lower than
446 written.
447
448 @lilypond[quote,ragged-right,verbatim]
449 <<
450   \new Staff {
451     \clef "bass_8"
452     \relative c, {
453       c4 d e f
454     }
455   }
456   \new TabStaff {
457     \set TabStaff.stringTunings = #bass-tuning
458     \relative c, {
459       c4 d e f
460     }
461   }
462 >>
463 @end lilypond
464
465 The default string tuning is @code{guitar-tuning}, which
466 is the standard EADGBE tuning.  Some other predefined tunings are
467 @code{guitar-open-g-tuning}, @code{mandolin-tuning} and
468 @code{banjo-open-g-tuning}.  The predefined string tunings
469 are found in @file{scm/tablature.scm}.
470
471 A string tuning is a Scheme list of string pitches,
472 one for each string, ordered by string number from 1 to N,
473 where string 1 is at the top of the tablature staff and
474 string N is at the bottom.  This ordinarily results in ordering
475 from highest pitch to lowest pitch, but some instruments
476 (e.g. ukulele) do not have strings ordered by pitch.
477
478 A string pitch in a string tuning list is the pitch difference
479 of the open string from middle C measured in semitones.  The
480 string pitch must be an integer.  LilyPond calculates the actual
481 pitch of the string by adding the string tuning pitch to the
482 actual pitch for middle C.
483
484 LilyPond automatically calculates the number of strings in the
485 @code{TabStaff} as the number of elements in @code{stringTunings}.
486
487 Any desired string tuning can be created.  For example, we can
488 define a string tuning for a four-string instrument with pitches
489 of @code{a''},  @code{d''},  @code{g'}, and @code{c'}:
490
491
492 @lilypond[quote,verbatim]
493 mynotes = {
494   c'4 e' g' c'' |
495   e''4 g'' b'' c'''
496 }
497
498 <<
499   \new Staff {
500     \clef treble
501     \mynotes
502   }
503   \new TabStaff {
504     \set TabStaff.stringTunings = #'(21 14 7 0)
505     \mynotes
506   }
507 >>
508 @end lilypond
509
510 @cindex moderntab clef
511 @cindex clef, moderntab
512 @cindex clef, tab
513 @cindex tab clef
514
515 A modern tab clef can also be used.
516
517 @lilypond[quote,ragged-right,verbatim]
518 \new TabStaff {
519   \clef moderntab
520   <a, e a>1
521   \break
522   \clef tab
523   <a, e a>1
524 }
525 @end lilypond
526
527 The modern tab clef supports tablatures from 4 to 7 strings.
528
529 @seealso
530 Installed Files:
531 @file{scm/tablature.scm}.
532
533 Snippets:
534 @rlsr{Fretted strings}.
535
536 Internals Reference:
537 @rinternals{Tab_note_heads_engraver}.
538
539 @knownissues
540 Automatic tablature calculations do not work properly in most
541 cases for instruments where string pitches do not vary
542 monotonically with string number, such as ukuleles.
543
544 @node Fret diagram markups
545 @unnumberedsubsubsec Fret diagram markups
546
547 @cindex fret diagrams
548 @cindex chord diagrams
549 @cindex diagrams, fret
550 @cindex diagrams, chord for fretted instruments
551 @cindex fret diagrams, custom
552 @cindex custom fret diagrams
553
554 Fret diagrams can be added to music as a markup to the desired
555 note.  The markup contains information about the desired fret
556 diagram.  There are three different fret-diagram markup
557 interfaces: standard, terse, and verbose.  The three interfaces
558 produce equivalent markups, but have varying amounts of
559 information in the markup string.  Details about the markup
560 interfaces are found at @ref{Text markup commands}.
561
562 The standard fret diagram markup string indicates the string
563 number and the fret number for each dot to be placed on the string.
564 In addition, open and unplayed (muted) strings can be indicated.
565
566 @lilypond[quote, verbatim]
567 <<
568   \context ChordNames {
569     \chordmode {
570       c1 d:m
571     }
572   }
573   \context Staff {
574     \clef "treble_8"
575     <c e g c' e'>1^\markup {
576       \fret-diagram #"6-x;5-3;4-2;3-o;2-1;1-o;"
577     }
578     <d a d' f'>1^\markup {
579       \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-1;"
580     }
581   }
582 >>
583 @end lilypond
584
585 @cindex barre indications
586
587 Barre indications can be added to the diagram from
588 the fret-diagram markup string.
589
590 @lilypond[quote, verbatim]
591 <<
592   \context ChordNames {
593      \chordmode {
594        f1 g
595      }
596   }
597   \context Staff {
598     \clef "treble_8"
599     <f, c f a c' f'>1^\markup {
600       \fret-diagram #"c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
601     }
602     <g, d g b d' g'>1^\markup {
603       \fret-diagram #"c:6-1-3;6-3;5-5;4-5;3-4;2-3;1-3;"
604     }
605   }
606 >>
607 @end lilypond
608
609 @cindex fret-diagram markup
610 @cindex ukulele
611
612 @funindex fret-diagram
613 @funindex \fret-diagram
614
615 The size of the fret diagram, and the number of frets in the diagram
616 can be changed in the fret-diagram markup string.
617
618 @lilypond[quote, verbatim]
619 <<
620   \context ChordNames {
621      \chordmode {
622        f1 g
623      }
624   }
625   \context Staff {
626     \clef "treble_8"
627     <f, c f a c' f'>1^\markup {
628       \fret-diagram #"s:1.5;c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
629     }
630     <g, b, d g b g'>1^\markup {
631       \fret-diagram #"h:6;6-3;5-2;4-o;3-o;2-o;1-3;"
632     }
633   }
634 >>
635 @end lilypond
636
637 The number of strings in a fret diagram can be changed to accommodate
638 different instruments such as banjos and ukuleles with the fret-diagram
639 markup string.
640
641 @lilypond[quote, verbatim]
642 <<
643   \context ChordNames {
644     \chordmode {
645       a1
646     }
647   }
648   \context Staff {
649     % An 'A' chord for ukulele
650     a'1^\markup {
651       \fret-diagram #"w:4;4-2-2;3-1-1;2-o;1-o;"
652     }
653   }
654 >>
655 @end lilypond
656
657 Fingering indications can be added, and the location of fingering labels
658 can be controlled by the fret-diagram markup string.
659
660 @lilypond[quote, verbatim]
661 <<
662   \context ChordNames {
663     \chordmode {
664       c1 d:m
665     }
666   }
667   \context Staff {
668     \clef "treble_8"
669     <c e g c' e'>1^\markup {
670       \fret-diagram #"f:1;6-x;5-3-3;4-2-2;3-o;2-1-1;1-o;"
671     }
672     <d a d' f'>1^\markup {
673       \fret-diagram #"f:2;6-x;5-x;4-o;3-2-2;2-3-3;1-1-1;"
674     }
675   }
676 >>
677 @end lilypond
678
679 Dot radius and dot position can be controlled with the fret-diagram
680 markup string.
681
682 @lilypond[quote, verbatim]
683 <<
684   \context ChordNames {
685     \chordmode {
686       c1 d:m
687     }
688   }
689   \context Staff {
690     \clef "treble_8"
691     <c e g c' e'>1^\markup {
692       \fret-diagram #"d:0.35;6-x;5-3;4-2;3-o;2-1;1-o;"
693     }
694     <d a d' f'>1^\markup {
695       \fret-diagram #"p:0.2;6-x;5-x;4-o;3-2;2-3;1-1;"
696     }
697   }
698 >>
699 @end lilypond
700
701 @cindex fret-diagram-terse markup
702
703 @funindex fret-diagram-terse
704 @funindex \fret-diagram-terse
705
706 The fret-diagram-terse markup string omits string numbers; the string
707 number is implied by the presence of semicolons.  There is one semicolon
708 for each string in the diagram.  The first semicolon corresponds to the
709 highest string number and the last semicolon corresponds to the first string.
710 Mute strings, open strings, and fret numbers can be indicated.
711
712 @lilypond[quote, verbatim]
713 <<
714   \context ChordNames {
715     \chordmode {
716       c1 d:m
717     }
718   }
719   \context Staff {
720     \clef "treble_8"
721     <c e g c' e'>1^\markup {
722       \fret-diagram-terse #"x;3;2;o;1;o;"
723     }
724     <d a d' f'>1^\markup {
725       \fret-diagram-terse #"x;x;o;2;3;1;"
726     }
727   }
728 >>
729 @end lilypond
730
731 Barre indicators can be included in the fret-diagram-terse markup string.
732
733 @lilypond[quote, verbatim]
734 <<
735   \context ChordNames {
736     \chordmode {
737       f1 g
738     }
739   }
740   \context Staff {
741     \clef "treble_8"
742     <f, c f a c' f'>1^\markup {
743       \fret-diagram-terse #"1-(;3;3;2;1;1-);"
744     }
745     <g, d g b d' g'>1^\markup {
746       \fret-diagram-terse #"3-(;5;5;4;3;3-);"
747     }
748   }
749 >>
750 @end lilypond
751
752 Fingering indications can be included in the fret-diagram-terse markup string.
753
754 @c Need to use override to enable fingerings to show this -- can we do so?
755 @lilypond[quote, verbatim]
756 <<
757   \context ChordNames {
758     \chordmode {
759       c1 d:m
760     }
761   }
762   \context Staff {
763     \override Voice.TextScript
764       #'(fret-diagram-details finger-code) = #'below-string
765     \clef "treble_8"
766     <c e g c' e'>1^\markup {
767       \fret-diagram-terse #"x;3-3;2-2;o;1-1;o;"
768     }
769     <d a d' f'>1^\markup {
770       \fret-diagram-terse #"x;x;o;2-2;3-3;1-1;"
771     }
772   }
773 >>
774 @end lilypond
775
776 Other fret diagram properties must be adjusted using @code{\override} when using
777 the fret-diagram-terse markup.
778
779 @cindex fret-diagram-verbose markup
780 @cindex capo
781
782 @funindex fret-diagram-verbose
783 @funindex \fret-diagram-verbose
784
785 The fret-diagram-verbose markup string is in the format of a Scheme list.  Each
786 element of the list indicates an item to be placed on the fret diagram.
787
788 @lilypond[quote, verbatim]
789 <<
790     \context ChordNames {
791       \chordmode {
792         c1 d:m
793       }
794     }
795   \context Staff {
796     \clef "treble_8"
797     <c e g c' e'>1^\markup {
798       \fret-diagram-verbose #'(
799         (mute 6)
800         (place-fret 5 3)
801         (place-fret 4 2)
802         (open 3)
803         (place-fret 2 1)
804         (open 1)
805       )
806     }
807     <d a d' f'>1^\markup {
808       \fret-diagram-verbose #'(
809         (mute 6)
810         (mute 5)
811         (open 4)
812         (place-fret 3 2)
813         (place-fret 2 3)
814         (place-fret 1 1)
815       )
816     }
817   }
818 >>
819 @end lilypond
820
821 Fingering indications and barres can be included in a
822 fret-diagram-verbose markup string.  Unique to the
823 fret-diagram-verbose interface is a capo indication that
824 can be placed on the fret diagram.  The capo indication is
825 a thick bar that covers all strings.  The fret with the
826 capo will be the lowest fret in the fret diagram.
827
828 @c \override is necessary to make fingering visible
829 @lilypond[quote, verbatim]
830 <<
831     \context ChordNames {
832       \chordmode {
833         f1 g c
834       }
835     }
836   \context Staff {
837     \clef "treble_8"
838     \override Voice.TextScript
839       #'(fret-diagram-details finger-code) = #'below-string
840     <f, c f a c' f'>1^\markup {
841       \fret-diagram-verbose #'(
842         (place-fret 6 1)
843         (place-fret 5 3)
844         (place-fret 4 3)
845         (place-fret 3 2)
846         (place-fret 2 1)
847         (place-fret 1 1)
848         (barre 6 1 1)
849       )
850     }
851     <g, b, d g b g'>1^\markup {
852       \fret-diagram-verbose #'(
853         (place-fret 6 3 2)
854         (place-fret 5 2 1)
855         (open 4)
856         (open 3)
857         (open 2)
858         (place-fret 1 3 3)
859       )
860     }
861     <c e g c' e'>1^\markup {
862       \fret-diagram-verbose #'(
863         (capo 3)
864         (mute 6)
865         (place-fret 4 5 1)
866         (place-fret 3 5 2)
867         (place-fret 2 5 3)
868       )
869     }
870   }
871 >>
872 @end lilypond
873
874 All other fret diagram properties must be adjusted using @code{\override}
875 when using the fret-diagram-verbose markup.
876
877 @ignore
878 The following example shows the three fret-diagram markup
879 interfaces, along with examples of common tweaks.  For example,
880 the size of the verbose fret diagram is reduced to 0.75, and the
881 finger indications are specified to appear below the diagram.  The
882 terse diagram includes tweaks to specify placement of finger code
883 and color of dots.
884
885 @lilypond[verbatim,ragged-right,quote]
886 \new Voice {
887   \clef "treble_8"
888   d4^\markup {
889     \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
890   }
891   d4 d d
892   fis^\markup {
893     \override #'(size . 0.75) {
894       \override #'(finger-code . below-string) {
895         \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
896                                  (place-fret 5 4 3)
897                                  (place-fret 4 4 4)
898                                  (place-fret 3 3 2)
899                                  (place-fret 2 2 1)
900                                  (place-fret 1 2 1))
901       }
902     }
903   }
904   fis4 fis fis
905   c^\markup {
906     \override #'(dot-radius . 0.35) {
907       \override #'(finger-code . in-dot) {
908         \override #'(dot-color . white) {
909           \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
910         }
911       }
912     }
913   }
914   c4 c c
915 }
916 @end lilypond
917 @end ignore
918
919 @cindex customized fret diagram
920 @cindex fret diagram, customized
921 @cindex diagram, fret, customized
922
923 @funindex fret-diagram-interface
924
925 The graphical layout of a fret diagram can be customized according to
926 user preference through the properties of the @code{fret-diagram-interface}.
927 Details are found at @rinternals{fret-diagram-interface}.  For a fret diagram
928 markup, the interface properties belong to @code{Voice.TextScript}.
929
930 @snippets
931
932 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
933 {changing-fret-orientations.ly}
934
935 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
936 {customizing-markup-fret-diagrams.ly}
937
938 @seealso
939 Notation Reference:
940 @ref{Text markup commands}.
941
942 Snippets:
943 @rlsr{Fretted strings}.
944
945 Internals Reference:
946 @rinternals{fret-diagram-interface}.
947
948
949 @node Predefined fret diagrams
950 @unnumberedsubsubsec Predefined fret diagrams
951
952
953 @cindex fret diagrams
954 @cindex fret diagrams, ukulele
955 @cindex chord diagrams
956
957 @funindex FretBoards
958 @funindex stringTunings
959
960 Fret diagrams can be displayed using the @code{FretBoards} context.  By
961 default, the @code{FretBoards} context will display fret diagrams that
962 are stored in a lookup table:
963
964 @lilypond[verbatim, ragged-right, quote]
965 \include "predefined-guitar-fretboards.ly"
966 \context FretBoards {
967   \chordmode {
968     c1 d
969   }
970 }
971 @end lilypond
972
973 The default predefined fret diagrams are contained in the file
974 @file{predefined-guitar-fretboards.ly}.  Fret diagrams are
975 stored based on the pitches of a chord and the value of
976 @code{stringTunings} that is currently in use.
977 @file{predefined-guitar-fretboards.ly} contains predefined
978 fret diagrams only for @code{guitar-tuning}.  Predefined fret
979 diagrams can be added for other instruments or other tunings
980 by following the examples found in
981 @file{predefined-guitar-fretboards.ly}.
982
983 Fret diagrams for the ukulele are contained in the file
984 @file{predefined-ukulele-fretboards.ly}.
985
986 @lilypond[verbatim, ragged-right, quote]
987 \include "predefined-ukulele-fretboards.ly"
988
989 myChords = \chordmode { a1 a:m a:aug }
990
991 \new ChordNames {
992   \myChords
993 }
994
995 \new FretBoards {
996   \set stringTunings = #ukulele-tuning
997   \myChords
998 }
999 @end lilypond
1000
1001 Chord pitches can be entered
1002 either as simultaneous music or using chord mode (see
1003 @ref{Chord mode overview}).
1004
1005 @lilypond[verbatim, ragged-right,quote]
1006 \include "predefined-guitar-fretboards.ly"
1007 \context FretBoards {
1008   \chordmode { c1 }
1009   <c' e' g'>1
1010 }
1011 @end lilypond
1012
1013 @cindex chord names with fret diagrams
1014 @cindex fret diagrams with chord names
1015
1016 @funindex ChordNames
1017 @funindex chordmode
1018 @funindex \chordmode
1019
1020 It is common that both chord names and fret diagrams are displayed together.
1021 This is achieved by putting a @code{ChordNames} context in parallel with
1022 a @code{FretBoards} context and giving both contexts the same music.
1023
1024 @lilypond[verbatim, ragged-right, quote]
1025 \include "predefined-guitar-fretboards.ly"
1026 mychords = \chordmode{
1027   c1 f g
1028 }
1029
1030 <<
1031   \context ChordNames {
1032     \mychords
1033   }
1034   \context FretBoards {
1035     \mychords
1036   }
1037 >>
1038 @end lilypond
1039
1040 @cindex transposing fret diagrams
1041 @cindex fret diagrams, transposing
1042 @cindex diagrams, fret, transposing
1043
1044 Predefined fret diagrams are transposable, as long as a diagram for the
1045 transposed chord is stored in the fret diagram table.
1046
1047 @lilypond[verbatim, ragged-right, quote]
1048 \include "predefined-guitar-fretboards.ly"
1049 mychords = \chordmode{
1050   c1 f g
1051 }
1052
1053 mychordlist = {
1054   \mychords
1055   \transpose c e { \mychords }
1056 }
1057 <<
1058   \context ChordNames {
1059     \mychordlist
1060   }
1061   \context FretBoards {
1062     \mychordlist
1063   }
1064 >>
1065 @end lilypond
1066
1067
1068 The predefined fret diagram table for guitar contains eight chords (major, minor,
1069 augmented, diminished, dominant seventh, major seventh, minor seventh, dominant ninth)
1070 for each of 17 keys.
1071 The predefined fret diagram table for ukulele contains these chords
1072 plus an additional three chords (major sixth, suspended second, and
1073 suspended fourth).
1074 A complete list of the predefined fret diagrams is
1075 shown in @ref{Predefined fretboard diagrams}.  If there is no entry in
1076 the table for a chord, the FretBoards engraver will calculate a
1077 fret-diagram using the automatic fret diagram functionality described in
1078 @ref{Automatic fret diagrams}.
1079
1080 @lilypond[verbatim, ragged-right, quote]
1081 \include "predefined-guitar-fretboards.ly"
1082 mychords = \chordmode{
1083   c1 c:maj9
1084 }
1085
1086 <<
1087   \context ChordNames {
1088     \mychords
1089   }
1090   \context FretBoards {
1091     \mychords
1092   }
1093 >>
1094 @end lilypond
1095
1096 @cindex fret diagrams, adding custom
1097 @cindex custom fret diagrams, adding
1098 @cindex adding custom fret diagrams
1099
1100 Fret diagrams can be added to the fret diagram table.  To add a diagram,
1101 you must specify the hash table for the diagram, the chord for the
1102 diagram, the tuning to be used, and
1103 a definition for the diagram.  Normally, the hash table will be
1104 @var{default-fret-table}.  The diagram definition can be either a
1105 fret-diagram-terse definition string or a fret-diagram-verbose
1106 marking list.
1107
1108 @lilypond[verbatim, ragged-right, quote]
1109 \include "predefined-guitar-fretboards.ly"
1110
1111 \storePredefinedDiagram #default-fret-table
1112                         \chordmode { c:maj9 }
1113                         #guitar-tuning
1114                         #"x;3-2;o;o;o;o;"
1115
1116 mychords = \chordmode {
1117   c1 c:maj9
1118 }
1119
1120 <<
1121   \context ChordNames {
1122     \mychords
1123   }
1124   \context FretBoards {
1125     \mychords
1126   }
1127 >>
1128 @end lilypond
1129
1130 Different fret diagrams for the same chord name can be stored using different
1131 octaves of pitches.  The different octave should be at least two octaves
1132 above or below the default octave, because the octaves above and  below the
1133 default octave are used for transposing fretboards.
1134
1135 @lilypond[verbatim, ragged-right, quote]
1136 \include "predefined-guitar-fretboards.ly"
1137
1138 \storePredefinedDiagram #default-fret-table
1139                         \chordmode { c'' }
1140                         #guitar-tuning
1141                         #(offset-fret 2 (chord-shape 'bes guitar-tuning))
1142
1143 mychords = \chordmode {
1144   c1 c''
1145 }
1146
1147 <<
1148   \context ChordNames {
1149     \mychords
1150   }
1151   \context FretBoards {
1152     \mychords
1153   }
1154 >>
1155 @end lilypond
1156
1157 @cindex fretted instruments, chord shapes
1158 @cindex chord shapes for fretted instruments
1159
1160 @funindex \addChordShape
1161 @funindex addChordShape
1162 @funindex storePredefinedDiagram
1163 @funindex \storePredefinedDiagram
1164
1165 In addition to fret diagrams, LilyPond stores an internal list of chord
1166 shapes.  The chord shapes are fret diagrams that can be shifted along
1167 the neck to different positions to provide different chords.  Chord
1168 shapes can be added to the internal list and then used to define
1169 predefined fret diagrams.  Because they can be moved to various
1170 positions on the neck, chord shapes will normally not contain
1171 any open strings.  Like fret diagrams, chord shapes can be
1172 entered as either fret-diagram-terse strings or fret-diagram-verbose
1173 marking lists.
1174
1175 @lilypond[verbatim, ragged-right, quote]
1176 \include "predefined-guitar-fretboards.ly"
1177
1178 % Add a new chord shape
1179
1180 \addChordShape #'powerf #guitar-tuning #"1-1;3-3;3-4;x;x;x;"
1181
1182 % add some new chords based on the power chord shape
1183
1184 \storePredefinedDiagram #default-fret-table
1185                         \chordmode { f'' }
1186                         #guitar-tuning
1187                         #(chord-shape 'powerf guitar-tuning)
1188 \storePredefinedDiagram #default-fret-table
1189                         \chordmode { g'' }
1190                         #guitar-tuning
1191                         #(offset-fret 2 (chord-shape 'powerf guitar-tuning))
1192
1193 mychords = \chordmode{
1194   f1 f'' g g''
1195 }
1196
1197 <<
1198   \context ChordNames {
1199     \mychords
1200   }
1201   \context FretBoards {
1202     \mychords
1203   }
1204 >>
1205 @end lilypond
1206
1207 The graphical layout of a fret diagram can be customized according to
1208 user preference through the properties of the @code{fret-diagram-interface}.
1209 Details are found at @rinternals{fret-diagram-interface}.  For a
1210 predefined fret diagram, the interface properties belong to
1211 @code{FretBoards.FretBoard}.
1212
1213 @snippets
1214
1215 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1216 {customizing-fretboard-fret-diagrams.ly}
1217
1218 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1219 {defining-predefined-fretboards-for-other-instruments.ly}
1220
1221 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1222 {chordchanges-for-fretboards.ly}
1223
1224 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1225 {fretboards-alternate-tables.ly}
1226
1227
1228 @seealso
1229 Notation Reference:
1230 @ref{Custom tablatures},
1231 @ref{Automatic fret diagrams},
1232 @ref{Chord mode overview},
1233 @ref{Predefined fretboard diagrams}.
1234
1235 Installed Files:
1236 @file{ly/predefined-guitar-fretboards.ly},
1237 @file{ly/predefined-guitar-ninth-fretboards.ly},
1238 @file{ly/predefined-ukulele-fretboards.ly}.
1239
1240 Snippets:
1241 @rlsr{Fretted strings}.
1242
1243 Internals Reference:
1244 @rinternals {fret-diagram-interface}.
1245
1246
1247 @node Automatic fret diagrams
1248 @unnumberedsubsubsec Automatic fret diagrams
1249
1250 @cindex fret diagrams, automatic
1251 @cindex chord diagrams, automatic
1252 @cindex automatic fret diagrams
1253 @cindex automatic chord diagrams
1254
1255 Fret diagrams can be automatically created from entered notes using the
1256 @code{FretBoards} context.  If no predefined diagram is available for
1257 the entered notes in the active @code{stringTunings}, this context
1258 calculates strings and frets that can be used to play the notes.
1259
1260 @lilypond[quote,ragged-right,verbatim]
1261 <<
1262   \context ChordNames {
1263     \chordmode {
1264       f1 g
1265     }
1266   }
1267   \context FretBoards {
1268     <f, c f a c' f'>1
1269     <g,\6 b, d g b g'>1
1270   }
1271   \context Staff {
1272     \clef "treble_8"
1273     <f, c f a c' f'>1
1274     <g, b, d g b' g'>1
1275   }
1276 >>
1277 @end lilypond
1278
1279 @funindex predefinedFretboardsOff
1280 @funindex \predefinedFretboardsOff
1281 @funindex predefinedFretboardsOn
1282 @funindex \predefinedFretboardsOn
1283
1284 As no predefined diagrams are loaded by default, automatic calculation
1285 of fret diagrams is the default behavior.  Once default diagrams are
1286 loaded, automatic calculation can be enabled and disabled with predefined
1287 commands:
1288
1289 @lilypond[quote,ragged-right,verbatim]
1290
1291 \storePredefinedDiagram #default-fret-table
1292                         <c e g c' e'>
1293                         #guitar-tuning
1294                         #"x;3-1-(;5-2;5-3;5-4;3-1-1-);"
1295 <<
1296   \context ChordNames {
1297     \chordmode {
1298       c1 c c
1299     }
1300   }
1301   \context FretBoards {
1302     <c e g c' e'>1
1303     \predefinedFretboardsOff
1304     <c e g c' e'>1
1305     \predefinedFretboardsOn
1306     <c e g c' e'>1
1307   }
1308   \context Staff {
1309     \clef "treble_8"
1310     <c e g c' e'>1
1311     <c e g c' e'>1
1312     <c e g c' e'>1
1313   }
1314 >>
1315 @end lilypond
1316
1317
1318
1319 Sometimes the fretboard calculator will be unable to find
1320 an acceptable diagram.  This can often be remedied by
1321 manually assigning a note to a string.  In many cases, only one
1322 note need be manually placed on a string; the rest of
1323 the notes will then be placed appropriately by the @code{FretBoards}
1324 context.
1325
1326 @cindex fret diagrams, adding fingerings
1327 @cindex fingerings, adding to fret diagrams
1328
1329 Fingerings can be added to FretBoard fret diagrams.
1330
1331 @lilypond[quote, verbatim]
1332 <<
1333   \context ChordNames {
1334     \chordmode {
1335       c1 d:m
1336     }
1337   }
1338   \context FretBoards {
1339     <c-3 e-2 g c'-1 e'>1
1340     <d a-2 d'-3 f'-1>1
1341   }
1342   \context Staff {
1343     \clef "treble_8"
1344     <c e g c' e'>1
1345     <d a d' f'>1
1346   }
1347 >>
1348 @end lilypond
1349
1350 @funindex minimumFret
1351
1352 The minimum fret to be used in calculating strings and frets for
1353 the FretBoard context can be set with the @code{minimumFret}
1354 property.
1355
1356 @lilypond[quote, verbatim]
1357 <<
1358   \context ChordNames {
1359     \chordmode {
1360       d1:m d:m
1361     }
1362   }
1363   \context FretBoards {
1364     <d a d' f'>1
1365     \set FretBoards.minimumFret = #5
1366     <d a d' f'>1
1367   }
1368   \context Staff {
1369     \clef "treble_8"
1370     <d a d' f'>1
1371     <d a d' f'>1
1372   }
1373 >>
1374 @end lilypond
1375
1376 The strings and frets for the @code{FretBoards} context depend
1377 on the @code{stringTunings} property, which has the same meaning
1378 as in the TabStaff context.  See @ref{Custom tablatures} for
1379 information on the @code{stringTunings} property.
1380
1381 The graphical layout of a fret diagram can be customized according to
1382 user preference through the properties of the @code{fret-diagram-interface}.
1383 Details are found at @rinternals{fret-diagram-interface}.  For a
1384 @code{FretBoards} fret diagram, the interface properties belong to
1385 @code{FretBoards.FretBoard}.
1386
1387
1388 @predefined
1389 @code{\predefinedFretboardsOff},
1390 @code{\predefinedFretboardsOn}.
1391 @endpredefined
1392
1393
1394 @seealso
1395 Notation Reference:
1396 @ref{Custom tablatures}.
1397
1398 Snippets:
1399 @rlsr{Fretted strings}.
1400
1401 Internals Reference:
1402 @rinternals {fret-diagram-interface}.
1403
1404 @knownissues
1405 Automatic fretboard calculations do not work properly for instruments
1406 with non-monotonic tunings.
1407
1408
1409 @node Right-hand fingerings
1410 @unnumberedsubsubsec Right-hand fingerings
1411
1412 @cindex fretted instruments, right hand fingerings
1413 @cindex fingerings, right hand for fretted instruments
1414 @cindex right hand fingerings for fretted instruments
1415
1416 @funindex rightHandFinger
1417 @funindex \rightHandFinger
1418
1419 Right-hand fingerings @var{p-i-m-a} must be entered within a
1420 chord construct @code{<>} for them to be printed in the score,
1421 even when applied to a single note.
1422
1423 @warning{There @strong{must} be a hyphen before
1424 @code{@bs{}rightHandFinger} and a space before the closing @code{>}.}
1425
1426 @lilypond[quote,verbatim,relative=0]
1427 \clef "treble_8"
1428 <c-\rightHandFinger #1 >4
1429 <e-\rightHandFinger #2 >
1430 <g-\rightHandFinger #3 >
1431 <c-\rightHandFinger #4 >
1432 <c,-\rightHandFinger #1 e-\rightHandFinger #2
1433  g-\rightHandFinger #3 c-\rightHandFinger #4 >1
1434 @end lilypond
1435
1436 For convenience, you can abbreviate @code{\rightHandFinger} to something
1437 short, for example @code{RH},
1438
1439 @example
1440 #(define RH rightHandFinger)
1441 @end example
1442
1443
1444 @snippets
1445
1446 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1447 {placement-of-right-hand-fingerings.ly}
1448
1449 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1450 {fingerings,-string-indications,-and-right-hand-fingerings.ly}
1451
1452
1453 @seealso
1454 Snippets:
1455 @rlsr{Fretted strings}.
1456
1457 Internals Reference:
1458 @rinternals{StrokeFinger}.
1459
1460
1461 @node Guitar
1462 @subsection Guitar
1463
1464 Most of the notational issues associated with guitar music are
1465 covered sufficiently in the general fretted strings section, but there
1466 are a few more worth covering here.  Occasionally users want to
1467 create songbook-type documents having only lyrics with chord
1468 indications above them.  Since LilyPond is a music typesetter,
1469 it is not recommended for documents that have no music notation
1470 in them.  A better alternative is a word processor, text editor,
1471 or, for experienced users, a typesetter like GuitarTeX.
1472
1473 @menu
1474 * Indicating position and barring::
1475 * Indicating harmonics and dampened notes::
1476 * Indicating power chords::
1477 @end menu
1478
1479 @node Indicating position and barring
1480 @unnumberedsubsubsec Indicating position and barring
1481
1482 @cindex indicating position and barring for fretted instruments
1483 @cindex fretted instruments, indicating position and barring
1484
1485 This example demonstrates how to include guitar position and
1486 barring indications.
1487
1488 @lilypond[quote,ragged-right,verbatim,relative=0]
1489 \clef "treble_8"
1490 b16 d g b e
1491 \textSpannerDown
1492 \override TextSpanner #'(bound-details left text) = #"XII "
1493 g16\startTextSpan
1494 b16 e g e b g\stopTextSpan
1495 e16 b g d
1496 @end lilypond
1497
1498
1499 @seealso
1500 Notation Reference:
1501 @ref{Text spanners}.
1502
1503 Snippets:
1504 @rlsr{Fretted strings},
1505 @rlsr{Expressive marks}.
1506
1507
1508 @node Indicating harmonics and dampened notes
1509 @unnumberedsubsubsec Indicating harmonics and dampened notes
1510
1511 @cindex fretted instruments, dampened notes
1512 @cindex fretted instruments, harmonics
1513 @cindex dampened notes on fretted instruments
1514 @cindex harmonics on fretted instruments
1515
1516 Special note heads can be used to indicate dampened notes or
1517 harmonics.  Harmonics are normally further explained with a
1518 text markup.
1519
1520 @lilypond[quote,ragged-right,verbatim]
1521 \relative c' {
1522   \clef "treble_8"
1523   \override Staff.NoteHead #'style = #'harmonic-mixed
1524   d^\markup { \italic { \fontsize #-2 { "harm. 12" }}} <g b>1
1525 }
1526 @end lilypond
1527
1528 Dampened notes (also called @notation{dead notes}) are supported
1529 within normal and tablature staves:
1530
1531 @lilypond[quote,ragged-right,verbatim]
1532 music = \relative c' {
1533   < a\3 \deadNote c\2 a'\1 >4
1534   < b\3 \deadNote d\2 b'\1 >
1535   < c\3 \deadNote e\2 c'\1 >
1536   \deadNotesOn
1537   \times 2/3 { g8 b e }
1538   \deadNotesOff
1539   < a,\3 c\2 e\1 >1
1540 }
1541 \new StaffGroup <<
1542   \new Staff {
1543     \clef "treble_8"
1544     \music
1545   }
1546   \new TabStaff {
1547     \music
1548   }
1549 >>
1550 @end lilypond
1551
1552 Another playing technique (especially used on electric guitars) is
1553 called @notation{palm mute}.  The string is hereby partly muted by the
1554 palm of the striking hand (hence the name).  Lilypond supports
1555 the notation of palm mute-style notes by changing the note head to a
1556 triangle shape.
1557
1558 @lilypond[quote,ragged-right,verbatim]
1559 \new Voice { % Warning: explicit Voice instantiation is
1560              %    required to have palmMuteOff work properly
1561              %    when palmMuteOn comes at the beginning of
1562              %    the piece.
1563   \relative c, {
1564     \clef "G_8"
1565     \palmMuteOn
1566     e8^\markup { \musicglyph #"noteheads.u2do"  = palm mute }
1567     < e b' e > e
1568     \palmMuteOff
1569     e e  \palmMute e e e |
1570     e8 \palmMute { e e e } e e e e |
1571     < \palmMute e b' e >8 \palmMute { e e e } < \palmMute e b' e >2
1572   }
1573 }
1574 @end lilypond
1575
1576 @seealso
1577 Snippets:
1578 @rlsr{Fretted strings}.
1579
1580 Notation Reference:
1581 @ref{Special note heads},
1582 @ref{Note head styles}.
1583
1584
1585 @node Indicating power chords
1586 @unnumberedsubsubsec Indicating power chords
1587
1588 @funindex powerChords
1589 @funindex \powerChords
1590
1591 @cindex power chords
1592 @cindex chords, power
1593
1594 Power chords and their symbols can be engraved in chord mode or as chord
1595 constructs:
1596
1597 @lilypond[quote,ragged-right,verbatim]
1598 ChordsAndSymbols = {
1599   \chordmode {
1600     \powerChords
1601     e,,1:1.5
1602     a,,1:1.5.8
1603     \set minimumFret = #8
1604     c,1:1.5
1605     f,1:1.5.8
1606   }
1607   \set minimumFret = #5
1608   <a, e>1
1609   <g d' g'>1
1610 }
1611 \score {
1612   <<
1613     \new ChordNames {
1614     \ChordsAndSymbols
1615     }
1616     \new Staff {
1617       \clef "treble_8"
1618       \ChordsAndSymbols
1619     }
1620     \new TabStaff {
1621       \ChordsAndSymbols
1622     }
1623   >>
1624 }
1625 @end lilypond
1626
1627 Power chord symbols are automatically switched off as soon as one of the
1628 other common chord modifier is used:
1629
1630 @lilypond[quote,ragged-right,verbatim]
1631 mixedChords = \chordmode {
1632   c,1
1633   \powerChords
1634   b,,1:1.5
1635   fis,,1:1.5.8
1636   g,,1:m
1637 }
1638 \score {
1639   <<
1640     \new ChordNames {
1641       \mixedChords
1642     }
1643     \new Staff {
1644       \clef "treble_8"
1645       \mixedChords
1646     }
1647     \new TabStaff {
1648       \mixedChords
1649     }
1650   >>
1651 }
1652 @end lilypond
1653
1654 @seealso
1655 Music Glossary:
1656 @rglos{power chord}.
1657
1658 Notation Reference:
1659 @ref{Extended and altered chords},
1660 @ref{Printing chord names}.
1661
1662 Snippets:
1663 @rlsr{Fretted strings}.
1664
1665
1666 @node Banjo
1667 @subsection Banjo
1668
1669 @menu
1670 * Banjo tablatures::
1671 @end menu
1672
1673 @node Banjo tablatures
1674 @unnumberedsubsubsec Banjo tablatures
1675
1676 @cindex banjo tablatures
1677 @cindex tablature, banjo
1678
1679 LilyPond has basic support for the five-string banjo.  When making tablatures
1680 for five-string banjo, use the banjo tablature format function to get
1681 correct fret numbers for the fifth string:
1682
1683 @c due to crazy intervals of banjo music, absolute pitch is recommended
1684
1685 @lilypond[quote,ragged-right,verbatim]
1686 \new TabStaff <<
1687   \set TabStaff.tablatureFormat = #fret-number-tablature-format-banjo
1688   \set TabStaff.stringTunings = #banjo-open-g-tuning
1689   {
1690     \stemDown
1691     g8 d' g'\5 a b g e d' |
1692     g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
1693     g4
1694   }
1695 >>
1696 @end lilypond
1697
1698 @cindex banjo tunings
1699 @cindex tunings, banjo
1700
1701 @funindex banjo-c-tuning
1702 @funindex banjo-modal-tuning
1703 @funindex banjo-open-d-tuning
1704 @funindex banjo-open-dm-tuning
1705 @funindex four-string-banjo
1706
1707 A number of common tunings for banjo are predefined in LilyPond:
1708 @code{banjo-c-tuning} (gCGBD), @code{banjo-modal-tuning} (gDGCD),
1709 @code{banjo-open-d-tuning} (aDF#AD) and @code{banjo-open-dm-tuning}
1710 (aDFAD).
1711
1712 These tunings may be converted to four-string banjo tunings using the
1713 @code{four-string-banjo} function:
1714
1715 @example
1716 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
1717 @end example
1718
1719
1720 @seealso
1721 Snippets:
1722 @rlsr{Fretted strings}.
1723
1724 Installed Files:
1725 @file{scm/output-lib.scm} contains predefined banjo tunings.