1 @c -*- coding: utf-8; mode: texinfo; -*-
3 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
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..
12 @node Fretted string instruments
13 @section Fretted string instruments
15 @lilypondfile[quote]{fretted-headword.ly}
17 This section discusses several aspects of music notation that are unique
18 to fretted string instruments.
21 @cindex tablature, guitar
22 @cindex tablature, banjo
23 @cindex guitar tablature
24 @cindex banjo tablature
27 * Common notation for fretted strings::
32 @node Common notation for fretted strings
33 @subsection Common notation for fretted strings
35 This section discusses common notation that is unique
36 to fretted string instruments.
39 * References for fretted strings::
40 * String number indications::
41 * Default tablatures::
43 * Fret diagram markups::
44 * Predefined fret diagrams::
45 * Automatic fret diagrams::
46 * Right-hand fingerings::
49 @node References for fretted strings
50 @unnumberedsubsubsec References for fretted strings
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
59 (or @code{\transposition c} to get correct MIDI output).
60 Some other elements pertinent to fretted string instruments
61 are covered elsewhere:
64 @item Fingerings are indicated as shown in
65 @ref{Fingering instructions}.
67 @item Instructions for @notation{Laissez vibrer} ties
68 as well as ties on arpeggios and tremolos can be found in
71 @item Instructions for handling multiple voices can be found
72 in @ref{Collision resolution}.
74 @item Instructions for indicating harmonics can be found in
81 @ref{Fingering instructions},
83 @ref{Collision resolution},
84 @ref{Instrument names},
85 @ref{Writing music in parallel},
87 @ref{List of articulations},
89 @ref{Instrument transpositions}.
92 @node String number indications
93 @unnumberedsubsubsec String number indications
95 @cindex string numbers
96 @cindex string vs. fingering numbers
97 @cindex fingering vs. string numbers
99 The string on which a note should be played may be indicated by
100 appending @code{\@var{number}} to a note.
102 @lilypond[verbatim,quote,relative=0]
108 When fingerings and string indications are used together, their
109 placement can be controlled by the order in which the two items appear
110 in the code @emph{only} if they appear inside of an explicit chord:
111 applied to whole chords or single notes @emph{outside} of chords,
112 fingerings are placed using a different mechanism.
114 @lilypond[verbatim,quote,relative=1]
122 String numbers may also, as is customary with unfretted strings,
123 be printed in Roman numerals and placed below the staff rather
126 @lilypond[verbatim,quote,relative=2]
131 \set stringNumberOrientations = #'(down)
139 @lilypondfile[verbatim,quote,texidoc,doctitle]
140 {controlling-the-placement-of-chord-fingerings.ly}
142 @lilypondfile[verbatim,quote,texidoc,doctitle]
143 {allowing-fingerings-to-be-printed-inside-the-staff.ly}
146 @code{\arabicStringNumbers},
147 @code{\romanStringNumbers}.
152 @ref{Fingering instructions}.
155 @rlsr{Fretted strings}.
158 @rinternals{StringNumber},
159 @rinternals{Fingering}.
162 @node Default tablatures
163 @unnumberedsubsubsec Default tablatures
165 @cindex tablatures, basic
166 @cindex tablatures, default
171 Music for plucked string instruments is frequently notated using a
172 finger/touch notation or tablature. In contrast to traditional
173 notation pitches are not denoted with note heads, but by numbers (or
174 letter-like symbols in historical intavolatura). The staff lines
175 in tablature indicate the string on which the note is to be played,
176 and a number placed on a staff line indicated the fret at which
177 the corresponding string is to be pressed.
178 Notes that are to be played simultaneously are vertically aligned.
180 By default, string 1 is the highest string, and corresponds to the top
181 line on the @code{TabStaff}. The tuning of the @code{TabStaff}
182 strings defaults to the
183 standard guitar tuning (with 6 strings). The notes are printed as
184 tablature, by using @code{TabStaff} and @code{TabVoice} contexts. A
185 calligraphic tablature clef is added automatically.
187 @lilypond[quote,ragged-right,verbatim]
188 \new TabStaff \relative {
194 Default tablatures do not contain any symbols for tone duration nor any
195 other musical symbols such as e.g. expressive marks.
197 @lilypond[quote,ragged-right,verbatim]
209 \new Staff { \clef "G_8" \symbols }
210 \new TabStaff { \symbols }
215 @funindex \tabFullNotation
217 If all musical symbols used in traditional notation should also show up
218 in tablature one has to apply the command @code{\tabFullNotation} in a
219 @code{TabStaff}-context. Please bear in mind that half notes are
220 double-stemmed in tablature in order to distinguish them from quarter
223 @lilypond[quote,ragged-right,verbatim]
243 @funindex minimumFret
244 @funindex restrainOpenStrings
246 By default pitches are assigned to the lowest playing position on the
247 fret-board (first position). Open strings are automatically preferred.
248 If you would like a certain pitch to be played on a specific string you
249 can add a string number indication to the pitch name. If you don't want
250 to have string number indications appear in traditional notation, you
251 can override the respective stencil. Usually it will be more
252 comfortable to define the playing position by using the value of
253 @code{minimumFret}. The default value for minimumFret is 0.
255 Even when @code{minimumFret} is set, open strings are used whenever
256 possible. This behaviour can be changed by setting @code{restrainOpenStrings}
259 @lilypond[quote,ragged-right,verbatim]
260 \layout { \omit Voice.StringNumber }
262 \new Staff \relative {
266 c,16\5 d\5 e\4 f\4 g4\4
269 \new TabStaff \relative {
271 c,16\5 d\5 e\4 f\4 g4\4
272 \set TabStaff.minimumFret = #5
273 \set TabStaff.restrainOpenStrings = ##t
279 @funindex \tabChordRepeats
280 @funindex \chordRepeats
281 @cindex chord, repetition
282 @cindex repetition, using @code{q}
283 @cindex @code{q}, chord repetition
285 Chord constructs can be repeated by the chord repetition symbol
286 @code{q}. In combination with tabulatures, its behavior of removing
287 string and finger numbers alongside with other events is cumbersome, so
290 \chordRepeats #'(string-number-event fingering-event)
292 explicitly on music expressions in tabulature using @ref{Chord
293 repetition}. This particular command is so common that it is available
294 as @code{\tabChordRepeats}.
296 @lilypond[quote,verbatim]
298 r8 <gis-2 cis-3 b-0>~ q4 q8~ 8 q4
307 \tabChordRepeats \guitar
312 Ties over a line break are parenthesized by default. The same holds for
313 the second alternative of a repeat.
315 @lilypond[quote,ragged-right,verbatim]
316 ties = \relative c' {
323 { g4\repeatTie c,2. }
350 @funindex \hideSplitTiedTabNotes
352 The command @code{\hideSplitTiedTabNotes} cancels the behavior of
353 engraving fret numbers in parentheses:
355 @lilypond[quote,ragged-right,verbatim]
356 ties = \relative c' {
362 { g4\repeatTie c,2. }
378 \hideSplitTiedTabNotes
390 @cindex harmonic indications in tablature notation
391 @cindex tablature and harmonic indications
393 @funindex \harmonicByFret
394 @funindex \harmonicByRatio
396 Harmonic indications can be added to tablature notation as sounding
399 @lilypond[verbatim,quote]
400 \layout { \omit Voice.StringNumber }
412 \new TabStaff { \firstHarmonic }
417 Note that the command @code{\harmonic} must always be attached to single
418 notes (possibly inside of a chord) instead of whole chords.
419 It only makes sense for open-string harmonics
420 in the 12th fret. All other harmonics should be calculated by LilyPond.
421 This can be achieved by indicating the fret where a finger of the
422 fretting hand should touch a string.
424 @lilypond[verbatim,quote]
426 \harmonicByFret #5 d16\4
427 \harmonicByFret #4 d16\4
428 \harmonicByFret #3 d8\4
429 \harmonicByFret #5 <g\3 b\2>2.
437 \new TabStaff { \fretHarmonics }
442 Alternatively, harmonics can be computed by defining the ratio of
443 string lengths above and below the harmonic fingering.
445 @lilypond[verbatim,quote]
447 \harmonicByRatio #1/2 <g\3 b\2 e'\1>4
448 \harmonicByRatio #1/3 <g\3 b\2 e'\1>4
449 \harmonicByRatio #1/4 { g8\3 b8\2 e'4\1 }
457 \new TabStaff { \ratioHarmonics }
463 @lilypondfile[verbatim,quote,texidoc,doctitle]
464 {stem-and-beam-behavior-in-tablature.ly}
466 @lilypondfile[verbatim,quote,texidoc,doctitle]
467 {polyphony-in-tablature.ly}
469 @lilypondfile[verbatim,quote,texidoc,doctitle]
470 {open-string-harmonics-in-tablature.ly}
472 @lilypondfile[verbatim,quote,texidoc,doctitle]
473 {fretted-string-harmonics-in-tablature.ly}
475 @cindex slides in tablature notation
476 @cindex tablature and slides
478 @lilypondfile[verbatim,quote,texidoc,doctitle]
479 {slides-in-tablature.ly}
481 @cindex chord glissandi
483 @lilypondfile[verbatim,quote,texidoc,doctitle]
484 {chord-glissando-in-tablature.ly}
489 @lilypondfile[verbatim,quote,texidoc,doctitle]
490 {hammer-on-and-pull-off.ly}
492 @lilypondfile[verbatim,quote,texidoc,doctitle]
493 {hammer-on-and-pull-off-using-voices.ly}
495 @lilypondfile[verbatim,quote,texidoc,doctitle]
496 {hammer-on-and-pull-off-using-chords.ly}
500 @ref{Chord repetition},
504 @ref{Written-out repeats}.
507 @rlsr{Fretted strings}.
510 @rinternals{TabNoteHead},
511 @rinternals{TabStaff},
512 @rinternals{TabVoice},
516 Chords are not handled in a special way, and hence the automatic
517 string selector may easily select the same string for two notes in
520 In order to handle @code{\partcombine}, a @code{TabStaff} must use
521 specially-created voices:
523 @lilypond[quote,ragged-right,verbatim]
524 melodia = \partcombine { e4 g g g } { e4 e e e }
527 \new TabVoice = "one" s1
528 \new TabVoice = "two" s1
529 \new TabVoice = "shared" s1
530 \new TabVoice = "solo" s1
536 Guitar special effects are limited to harmonics and slides.
539 @node Custom tablatures
540 @unnumberedsubsubsec Custom tablatures
542 @cindex tablatures, custom
543 @cindex tablature, banjo
544 @cindex tablature, mandolin
545 @cindex tablature, guitar
546 @cindex tablature, bass guitar
547 @cindex tablature, ukulele
548 @cindex tablature, predefined string tunings
549 @cindex fretted instruments, predefined string tunings
550 @cindex predefined string tunings for fretted instruments
551 @cindex tablature, violin
552 @cindex tablature, viola
553 @cindex tablature, cello
554 @cindex tablature, bass
555 @cindex tablature, double bass
557 @funindex stringTunings
559 LilyPond tablature automatically calculates the fret for
560 a note based on the string to which the note is assigned.
561 In order to do this, the tuning of the strings must be
562 specified. The tuning of the strings is given in the
563 @code{stringTunings} property.
565 LilyPond comes with predefined string tunings for banjo, mandolin,
566 guitar, bass guitar, ukulele, violin, viola, cello, and double bass.
567 LilyPond automatically sets
568 the correct transposition for predefined tunings. The following
569 example is for bass guitar, which sounds an octave lower than
572 @lilypond[quote,ragged-right,verbatim]
582 \new TabStaff \with {
583 stringTunings = #bass-tuning
592 The default string tuning is @code{guitar-tuning}, which
593 is the standard EADGBE tuning. Some other predefined tunings are
594 @code{guitar-open-g-tuning}, @code{mandolin-tuning} and
595 @code{banjo-open-g-tuning}. The predefined string tunings
596 are found in @file{ly/string-tunings-init.ly}.
598 @funindex stringTuning
599 @funindex \stringTuning
600 @cindex tablature, custom string tunings
601 @cindex custom string tunings
603 Any desired string tuning can be created. The
604 @code{\stringTuning} function can be
605 used to define a string tuning which can be used
606 to set @code{stringTunings} for the current context.
608 Its argument is a chord construct
609 defining the pitches of each string in the tuning.
610 The chord construct must be in absolute octave mode,
611 see @ref{Absolute octave entry}. The string
612 with the highest number (generally the lowest string) must
613 come first in the chord. For example, we can
614 define a string tuning for a four-string instrument with pitches
615 of @code{a''}, @code{d''}, @code{g'}, and @code{c'}:
617 @lilypond[quote,verbatim]
630 \set Staff.stringTunings = \stringTuning <c' g' d'' a''>
636 The @code{stringTunings} property is also used by
637 @code{FretBoards} to calculate automatic fret diagrams.
639 String tunings are used as part of the hash key
640 for predefined fret diagrams
641 (see @ref{Predefined fret diagrams}).
643 The previous example could also be written as follows:
645 @lilypond[quote,verbatim]
646 custom-tuning = \stringTuning <c' g' d'' a''>
659 \set TabStaff.stringTunings = #custom-tuning
665 Internally, a string tuning is a Scheme list of string pitches,
666 one for each string, ordered by string number from 1 to N,
667 where string 1 is at the top of the tablature staff and
668 string N is at the bottom. This ordinarily results in ordering
669 from highest pitch to lowest pitch, but some instruments
670 (e.g. ukulele) do not have strings ordered by pitch.
672 A string pitch in a string tuning list is a LilyPond pitch
673 object. Pitch objects are created with the Scheme function
674 @code{ly:make-pitch} (see @ref{Scheme functions}).
676 @code{\stringTuning} creates such an object from chord input.
678 LilyPond automatically calculates the number of lines in the
679 @code{TabStaff} and the number of strings in an automatically
680 calculated @code{FretBoard} as the number of elements
681 in @code{stringTunings}.
683 To let all TabStaff contexts use the same custom tuning by default,
690 stringTunings = \stringTuning <c' g' d'' a''>
696 @cindex moderntab clef
697 @cindex clef, moderntab
701 A modern tab clef can also be used.
703 @lilypond[quote,ragged-right,verbatim]
713 The modern tab clef supports tablatures from 4 to 7 strings.
717 @ref{Absolute octave entry},
718 @ref{Predefined fret diagrams},
719 @ref{Scheme functions}.
722 @file{ly/string-tunings-init.ly},
723 @file{scm/tablature.scm}.
726 @rlsr{Fretted strings}.
729 @rinternals{Tab_note_heads_engraver}.
732 Automatic tablature calculations do not work properly in most
733 cases for instruments where string pitches do not vary
734 monotonically with string number, such as ukuleles.
737 @node Fret diagram markups
738 @unnumberedsubsubsec Fret diagram markups
740 @cindex fret diagrams
741 @cindex chord diagrams
742 @cindex diagrams, fret
743 @cindex diagrams, chord for fretted instruments
744 @cindex fret diagrams, custom
745 @cindex custom fret diagrams
747 Fret diagrams can be added to music as a markup to the desired
748 note. The markup contains information about the desired fret
749 diagram. There are three different fret-diagram markup
750 interfaces: standard, terse, and verbose. The three interfaces
751 produce equivalent markups, but have varying amounts of
752 information in the markup string. Details about the
753 syntax of the different markup strings used to define
754 fret diagrams are found at @ref{Instrument Specific Markup}.
756 The standard fret diagram markup string indicates the string
757 number and the fret number for each dot to be placed on the string.
758 In addition, open and unplayed (muted) strings can be indicated.
760 @lilypond[quote, verbatim]
769 <c e g c' e'>1^\markup {
770 \fret-diagram #"6-x;5-3;4-2;3-o;2-1;1-o;"
772 <d a d' f'>1^\markup {
773 \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-1;"
779 @cindex barre indications
781 Barre indications can be added to the diagram from
782 the fret-diagram markup string.
784 @lilypond[quote, verbatim]
793 <f, c f a c' f'>1^\markup {
794 \fret-diagram #"c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
796 <g, d g b d' g'>1^\markup {
797 \fret-diagram #"c:6-1-3;6-3;5-5;4-5;3-4;2-3;1-3;"
803 @cindex fret-diagram markup
806 @funindex fret-diagram
807 @funindex \fret-diagram
809 The size of the fret diagram, and the number of frets in the diagram
810 can be changed in the fret-diagram markup string.
812 @lilypond[quote, verbatim]
821 <f, c f a c' f'>1^\markup {
822 \fret-diagram #"s:1.5;c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
824 <g, b, d g b g'>1^\markup {
825 \fret-diagram #"h:6;6-3;5-2;4-o;3-o;2-o;1-3;"
831 The number of strings in a fret diagram can be changed to accommodate
832 different instruments such as banjos and ukuleles with the fret-diagram
835 @lilypond[quote, verbatim]
843 % An 'A' chord for ukulele
845 \fret-diagram #"w:4;4-2-2;3-1-1;2-o;1-o;"
851 Fingering indications can be added, and the location of fingering labels
852 can be controlled by the fret-diagram markup string.
854 @lilypond[quote, verbatim]
863 <c e g c' e'>1^\markup {
864 \fret-diagram #"f:1;6-x;5-3-3;4-2-2;3-o;2-1-1;1-o;"
866 <d a d' f'>1^\markup {
867 \fret-diagram #"f:2;6-x;5-x;4-o;3-2-2;2-3-3;1-1-1;"
873 Dot radius and dot position can be controlled with the fret-diagram
876 @lilypond[quote, verbatim]
885 <c e g c' e'>1^\markup {
886 \fret-diagram #"d:0.35;6-x;5-3;4-2;3-o;2-1;1-o;"
888 <d a d' f'>1^\markup {
889 \fret-diagram #"p:0.2;6-x;5-x;4-o;3-2;2-3;1-1;"
895 @cindex fret-diagram-terse markup
897 @funindex fret-diagram-terse
898 @funindex \fret-diagram-terse
900 The fret-diagram-terse markup string omits string numbers; the string
901 number is implied by the presence of semicolons. There is one semicolon
902 for each string in the diagram. The first semicolon corresponds to the
903 highest string number and the last semicolon corresponds to the first string.
904 Mute strings, open strings, and fret numbers can be indicated.
906 @lilypond[quote, verbatim]
915 <c e g c' e'>1^\markup {
916 \fret-diagram-terse #"x;3;2;o;1;o;"
918 <d a d' f'>1^\markup {
919 \fret-diagram-terse #"x;x;o;2;3;1;"
925 Barre indicators can be included in the fret-diagram-terse markup string.
927 @lilypond[quote, verbatim]
936 <f, c f a c' f'>1^\markup {
937 \fret-diagram-terse #"1-(;3;3;2;1;1-);"
939 <g, d g b d' g'>1^\markup {
940 \fret-diagram-terse #"3-(;5;5;4;3;3-);"
946 Fingering indications can be included in the fret-diagram-terse markup string.
948 @c Need to use override to enable fingerings to show this -- can we do so?
949 @lilypond[quote, verbatim]
957 \override Voice.TextScript.fret-diagram-details.finger-code = #'below-string
959 <c e g c' e'>1^\markup {
960 \fret-diagram-terse #"x;3-3;2-2;o;1-1;o;"
962 <d a d' f'>1^\markup {
963 \fret-diagram-terse #"x;x;o;2-2;3-3;1-1;"
969 Other fret diagram properties must be adjusted using
970 @code{\override} when using the fret-diagram-terse markup.
972 @cindex fret-diagram-verbose markup
975 @funindex fret-diagram-verbose
976 @funindex \fret-diagram-verbose
978 The fret-diagram-verbose markup string is in the format of a Scheme list. Each
979 element of the list indicates an item to be placed on the fret diagram.
981 @lilypond[quote, verbatim]
990 <c e g c' e'>1^\markup {
991 \fret-diagram-verbose #'(
1000 <d a d' f'>1^\markup {
1001 \fret-diagram-verbose #'(
1014 Fingering indications and barres can be included in a
1015 fret-diagram-verbose markup string. Unique to the
1016 fret-diagram-verbose interface is a capo indication that
1017 can be placed on the fret diagram. The capo indication is
1018 a thick bar that covers all strings. The fret with the
1019 capo will be the lowest fret in the fret diagram.
1021 Fingering indication dots can be colored as well as parenthesized;
1022 the parenthesis's color can also be altered independently.
1024 @c \override is necessary to make fingering visible
1025 @lilypond[quote, verbatim]
1034 \override Voice.TextScript.fret-diagram-details.finger-code = #'below-string
1035 <f, c f a c' f'>1^\markup {
1036 \fret-diagram-verbose #'(
1046 <g, b, d g b g'>1^\markup {
1047 \fret-diagram-verbose #'(
1056 <c g c' e' g'>1^\markup {
1057 \fret-diagram-verbose #'(
1065 \override Voice.TextScript.size = 1.5
1066 <c g c' e' g'>1^\markup {
1067 \fret-diagram-verbose #'(
1068 (place-fret 6 3 1 red parenthesized default-paren-color)
1069 (place-fret 5 3 1 inverted)
1070 (place-fret 4 5 2 blue parenthesized)
1071 (place-fret 3 5 3 blue)
1072 (place-fret 2 5 4 blue)
1073 (place-fret 1 3 1 inverted)
1080 All other fret diagram properties must be adjusted using
1081 @code{\override} when using the fret-diagram-verbose markup.
1084 The following example shows the three fret-diagram markup
1085 interfaces, along with examples of common tweaks. For example,
1086 the size of the verbose fret diagram is reduced to 0.75, and the
1087 finger indications are specified to appear below the diagram. The
1088 terse diagram includes tweaks to specify placement of finger code
1091 @lilypond[verbatim,ragged-right,quote]
1095 \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
1099 \override #'(size . 0.75) {
1100 \override #'(finger-code . below-string) {
1101 \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
1112 \override #'(dot-radius . 0.35) {
1113 \override #'(finger-code . in-dot) {
1114 \override #'(dot-color . white) {
1115 \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
1125 @cindex customized fret diagram
1126 @cindex fret diagram, customized
1127 @cindex diagram, fret, customized
1129 @funindex fret-diagram-interface
1131 The graphical layout of a fret diagram can be customized according to
1132 user preference through the properties of the
1133 @code{fret-diagram-interface}. Details are found at
1134 @rinternals{fret-diagram-interface}. For a fret diagram
1135 markup, the interface properties belong to @code{Voice.TextScript}.
1139 @lilypondfile[verbatim,quote,texidoc,doctitle]
1140 {changing-fret-orientations.ly}
1142 @lilypondfile[verbatim,quote,texidoc,doctitle]
1143 {customizing-markup-fret-diagrams.ly}
1147 @ref{Instrument Specific Markup}.
1150 @rlsr{Fretted strings}.
1152 Internals Reference:
1153 @rinternals{fret-diagram-interface}.
1156 @node Predefined fret diagrams
1157 @unnumberedsubsubsec Predefined fret diagrams
1159 @cindex fret diagrams
1160 @cindex fret diagrams, ukulele
1161 @cindex fret diagrams, mandolin
1162 @cindex chord diagrams
1164 @funindex FretBoards
1165 @funindex stringTunings
1167 Fret diagrams can be displayed using the @code{FretBoards} context. By
1168 default, the @code{FretBoards} context will display fret diagrams that
1169 are stored in a lookup table:
1171 @lilypond[verbatim, ragged-right, quote]
1172 \include "predefined-guitar-fretboards.ly"
1180 The default predefined fret diagrams are contained in the file
1181 @file{predefined-guitar-fretboards.ly}. Fret diagrams are
1182 stored based on the pitches of a chord and the value of
1183 @code{stringTunings} that is currently in use.
1184 @file{predefined-guitar-fretboards.ly} contains predefined
1185 fret diagrams only for @code{guitar-tuning}. Predefined fret
1186 diagrams can be added for other instruments or other tunings
1187 by following the examples found in
1188 @file{predefined-guitar-fretboards.ly}.
1190 Fret diagrams for the ukulele are contained in the file @*
1191 @file{predefined-ukulele-fretboards.ly}.
1193 @lilypond[verbatim, ragged-right, quote]
1194 \include "predefined-ukulele-fretboards.ly"
1196 myChords = \chordmode { a1 a:m a:aug }
1203 \set Staff.stringTunings = #ukulele-tuning
1208 Fret diagrams for the mandolin are contained in the file @*
1209 @file{predefined-mandolin-fretboards.ly}.
1211 @lilypond[verbatim, ragged-right, quote]
1212 \include "predefined-mandolin-fretboards.ly"
1214 myChords = \chordmode { c1 c:m7.5- c:aug }
1221 \set Staff.stringTunings = #mandolin-tuning
1226 Chord pitches can be entered
1227 either as simultaneous music or using chord mode (see
1228 @ref{Chord mode overview}).
1230 @lilypond[verbatim, ragged-right,quote]
1231 \include "predefined-guitar-fretboards.ly"
1238 @cindex chord names with fret diagrams
1239 @cindex fret diagrams with chord names
1241 @funindex ChordNames
1243 @funindex \chordmode
1245 It is common that both chord names and fret diagrams are displayed together.
1246 This is achieved by putting a @code{ChordNames} context in parallel with
1247 a @code{FretBoards} context and giving both contexts the same music.
1249 @lilypond[verbatim, ragged-right, quote]
1250 \include "predefined-guitar-fretboards.ly"
1251 mychords = \chordmode{
1265 @cindex transposing fret diagrams
1266 @cindex fret diagrams, transposing
1267 @cindex diagrams, fret, transposing
1269 Predefined fret diagrams are transposable, as long as a diagram for the
1270 transposed chord is stored in the fret diagram table.
1272 @lilypond[verbatim, ragged-right, quote]
1273 \include "predefined-guitar-fretboards.ly"
1274 mychords = \chordmode{
1280 \transpose c e { \mychords }
1293 The predefined fret diagram table for guitar contains eight chords (major, minor,
1294 augmented, diminished, dominant seventh, major seventh, minor seventh, dominant ninth)
1295 for each of 17 keys.
1296 The predefined fret diagram table for ukulele contains these chords
1297 plus an additional three chords (major sixth, suspended second, and
1299 A complete list of the predefined fret diagrams is
1300 shown in @ref{Predefined fretboard diagrams}. If there is no entry in
1301 the table for a chord, the FretBoards engraver will calculate a
1302 fret-diagram using the automatic fret diagram functionality described in
1303 @ref{Automatic fret diagrams}.
1305 @lilypond[verbatim, ragged-right, quote]
1306 \include "predefined-guitar-fretboards.ly"
1307 mychords = \chordmode{
1321 @cindex fret diagrams, adding custom
1322 @cindex custom fret diagrams, adding
1323 @cindex adding custom fret diagrams
1325 Fret diagrams can be added to the fret diagram table. To add a diagram,
1326 you must specify the hash table for the diagram, the chord for the
1327 diagram, the tuning to be used, and
1328 a definition for the diagram. Normally, the hash table will be
1329 @var{default-fret-table}. The diagram definition can be either a
1330 fret-diagram-terse definition string or a fret-diagram-verbose
1333 @lilypond[verbatim, ragged-right, quote]
1334 \include "predefined-guitar-fretboards.ly"
1336 \storePredefinedDiagram #default-fret-table
1337 \chordmode { c:maj9 }
1341 mychords = \chordmode {
1355 Different fret diagrams for the same chord name can be stored using different
1356 octaves of pitches. The different octave should be at least two octaves
1357 above or below the default octave, because the octaves above and below the
1358 default octave are used for transposing fretboards.
1360 @lilypond[verbatim, ragged-right, quote]
1361 \include "predefined-guitar-fretboards.ly"
1363 \storePredefinedDiagram #default-fret-table
1366 #(offset-fret 2 (chord-shape 'bes guitar-tuning))
1368 mychords = \chordmode {
1382 @cindex fretted instruments, chord shapes
1383 @cindex chord shapes for fretted instruments
1385 @funindex \addChordShape
1386 @funindex addChordShape
1387 @funindex storePredefinedDiagram
1388 @funindex \storePredefinedDiagram
1390 In addition to fret diagrams, LilyPond stores an internal list of chord
1391 shapes. The chord shapes are fret diagrams that can be shifted along
1392 the neck to different positions to provide different chords. Chord
1393 shapes can be added to the internal list and then used to define
1394 predefined fret diagrams. Because they can be moved to various
1395 positions on the neck, chord shapes will normally not contain
1396 any open strings. Like fret diagrams, chord shapes can be
1397 entered as either fret-diagram-terse strings or fret-diagram-verbose
1400 @lilypond[verbatim, ragged-right, quote]
1401 \include "predefined-guitar-fretboards.ly"
1403 % Add a new chord shape
1405 \addChordShape #'powerf #guitar-tuning #"1-1;3-3;3-4;x;x;x;"
1407 % add some new chords based on the power chord shape
1409 \storePredefinedDiagram #default-fret-table
1412 #(chord-shape 'powerf guitar-tuning)
1413 \storePredefinedDiagram #default-fret-table
1416 #(offset-fret 2 (chord-shape 'powerf guitar-tuning))
1418 mychords = \chordmode{
1432 The graphical layout of a fret diagram can be customized according to
1433 user preference through the properties of the
1434 @code{fret-diagram-interface}. Details are found at
1435 @rinternals{fret-diagram-interface}. For a predefined fret diagram,
1436 the interface properties belong to @code{FretBoards.FretBoard}.
1440 @lilypondfile[verbatim,quote,texidoc,doctitle]
1441 {customizing-fretboard-fret-diagrams.ly}
1443 @lilypondfile[verbatim,quote,texidoc,doctitle]
1444 {defining-predefined-fretboards-for-other-instruments.ly}
1446 @lilypondfile[verbatim,quote,texidoc,doctitle,ragged-right]
1447 {chordchanges-for-fretboards.ly}
1449 @lilypondfile[verbatim,quote,texidoc,doctitle]
1450 {fretboards-alternate-tables.ly}
1454 @ref{Custom tablatures},
1455 @ref{Automatic fret diagrams},
1456 @ref{Chord mode overview},
1457 @ref{Predefined fretboard diagrams}.
1460 @file{ly/predefined-guitar-fretboards.ly}, @*
1461 @file{ly/predefined-guitar-ninth-fretboards.ly}, @*
1462 @file{ly/predefined-ukulele-fretboards.ly}, @*
1463 @file{ly/predefined-mandolin-fretboards.ly}.
1466 @rlsr{Fretted strings}.
1468 Internals Reference:
1469 @rinternals {fret-diagram-interface}.
1472 @node Automatic fret diagrams
1473 @unnumberedsubsubsec Automatic fret diagrams
1475 @cindex fret diagrams, automatic
1476 @cindex chord diagrams, automatic
1477 @cindex automatic fret diagrams
1478 @cindex automatic chord diagrams
1480 Fret diagrams can be automatically created from entered notes using the
1481 @code{FretBoards} context. If no predefined diagram is available for
1482 the entered notes in the active @code{stringTunings}, this context
1483 calculates strings and frets that can be used to play the notes.
1485 @lilypond[quote,ragged-right,verbatim]
1504 @funindex predefinedFretboardsOff
1505 @funindex \predefinedFretboardsOff
1506 @funindex predefinedFretboardsOn
1507 @funindex \predefinedFretboardsOn
1509 As no predefined diagrams are loaded by default, automatic calculation
1510 of fret diagrams is the default behavior. Once default diagrams are
1511 loaded, automatic calculation can be enabled and disabled with predefined
1514 @lilypond[quote,ragged-right,verbatim]
1516 \storePredefinedDiagram #default-fret-table
1519 #"x;3-1-(;5-2;5-3;5-4;3-1-1-);"
1528 \predefinedFretboardsOff
1530 \predefinedFretboardsOn
1544 Sometimes the fretboard calculator will be unable to find
1545 an acceptable diagram. This can often be remedied by
1546 manually assigning a note to a string. In many cases, only one
1547 note need be manually placed on a string; the rest of
1548 the notes will then be placed appropriately by the
1549 @code{FretBoards} context.
1551 @cindex fret diagrams, adding fingerings
1552 @cindex fingerings, adding to fret diagrams
1554 Fingerings can be added to FretBoard fret diagrams.
1556 @lilypond[quote, verbatim]
1564 <c-3 e-2 g c'-1 e'>1
1575 @funindex minimumFret
1577 The minimum fret to be used in calculating strings and frets for
1578 the FretBoard context can be set with the @code{minimumFret}
1581 @lilypond[quote, verbatim]
1590 \set FretBoards.minimumFret = #5
1601 The strings and frets for the @code{FretBoards} context depend
1602 on the @code{stringTunings} property, which has the same meaning
1603 as in the TabStaff context. See @ref{Custom tablatures} for
1604 information on the @code{stringTunings} property.
1606 The graphical layout of a fret diagram can be customized according to
1607 user preference through the properties of the
1608 @code{fret-diagram-interface}. Details are found at
1609 @rinternals{fret-diagram-interface}. For a @code{FretBoards} fret
1610 diagram, the interface properties belong to
1611 @code{FretBoards.FretBoard}.
1615 @code{\predefinedFretboardsOff},
1616 @code{\predefinedFretboardsOn}.
1621 @ref{Custom tablatures}.
1624 @rlsr{Fretted strings}.
1626 Internals Reference:
1627 @rinternals {fret-diagram-interface}.
1630 Automatic fretboard calculations do not work properly for instruments
1631 with non-monotonic tunings.
1634 @node Right-hand fingerings
1635 @unnumberedsubsubsec Right-hand fingerings
1637 @cindex fretted instruments, right hand fingerings
1638 @cindex fingerings, right hand for fretted instruments
1639 @cindex right hand fingerings for fretted instruments
1641 @funindex rightHandFinger
1642 @funindex \rightHandFinger
1644 Right-hand fingerings @var{p-i-m-a} must be entered using
1645 @code{\rightHandFinger} followed by a number.
1647 @warning{If the number is entered in Scheme notation, remember to append
1648 a space before following it with a closing @code{>} or similar.}
1650 @lilypond[quote,verbatim,relative=0]
1652 c4\rightHandFinger #1
1653 e\rightHandFinger #2
1654 g\rightHandFinger #3
1655 c\rightHandFinger #4
1656 <c,\rightHandFinger #1 e\rightHandFinger #2
1657 g\rightHandFinger #3 c\rightHandFinger #4 >1
1660 For convenience, you can abbreviate @code{\rightHandFinger} to something
1661 short, for example @code{RH},
1670 @lilypondfile[verbatim,quote,texidoc,doctitle]
1671 {placement-of-right-hand-fingerings.ly}
1673 @lilypondfile[verbatim,quote,texidoc,doctitle]
1674 {fingerings,-string-indications,-and-right-hand-fingerings.ly}
1678 @rlsr{Fretted strings}.
1680 Internals Reference:
1681 @rinternals{StrokeFinger}.
1687 Most of the notational issues associated with guitar music are
1688 covered sufficiently in the general fretted strings section, but there
1689 are a few more worth covering here. Occasionally users want to
1690 create songbook-type documents having only lyrics with chord
1691 indications above them. Since LilyPond is a music typesetter,
1692 it is not recommended for documents that have no music notation
1693 in them. A better alternative is a word processor, text editor,
1694 or, for experienced users, a typesetter like GuitarTeX.
1697 * Indicating position and barring::
1698 * Indicating harmonics and dampened notes::
1699 * Indicating power chords::
1702 @node Indicating position and barring
1703 @unnumberedsubsubsec Indicating position and barring
1705 @cindex indicating position and barring for fretted instruments
1706 @cindex fretted instruments, indicating position and barring
1708 This example demonstrates how to include guitar position and
1709 barring indications.
1711 @lilypond[quote,ragged-right,verbatim,relative=0]
1715 \override TextSpanner.bound-details.left.text = #"XII "
1717 b16 e g e b g\stopTextSpan
1723 @ref{Text spanners}.
1726 @rlsr{Fretted strings},
1727 @rlsr{Expressive marks}.
1730 @node Indicating harmonics and dampened notes
1731 @unnumberedsubsubsec Indicating harmonics and dampened notes
1733 @cindex fretted instruments, dampened notes
1734 @cindex fretted instruments, harmonics
1735 @cindex dampened notes on fretted instruments
1736 @cindex harmonics on fretted instruments
1738 Special note heads can be used to indicate dampened notes or
1739 harmonics. Harmonics are normally further explained with a
1742 @lilypond[quote,ragged-right,verbatim]
1745 \override Staff.NoteHead.style = #'harmonic-mixed
1746 d^\markup { \italic { \fontsize #-2 { "harm. 12" }}} <g b>1
1750 Dampened notes (also called @notation{dead notes}) are supported
1751 within normal and tablature staves:
1753 @lilypond[quote,ragged-right,verbatim]
1755 < a\3 \deadNote c\2 a'\1 >4
1756 < b\3 \deadNote d\2 b'\1 >
1757 < c\3 \deadNote e\2 c'\1 >
1759 \tuplet 3/2 { g8 b e }
1774 Another playing technique (especially used on electric guitars) is
1775 called @notation{palm mute}. The string is hereby partly muted by the
1776 palm of the striking hand (hence the name). Lilypond supports
1777 the notation of palm mute-style notes by changing the note head to a
1780 @lilypond[quote,ragged-right,verbatim]
1781 \new Voice { % Warning: explicit Voice instantiation is
1782 % required to have palmMuteOff work properly
1783 % when palmMuteOn comes at the beginning of
1788 e8^\markup { \musicglyph #"noteheads.u2do" = palm mute }
1791 e e \palmMute e e e |
1792 e8 \palmMute { e e e } e e e e |
1793 < \palmMute e b' e >8 \palmMute { e e e } < \palmMute e b' e >2
1800 @rlsr{Fretted strings}.
1803 @ref{Special note heads},
1804 @ref{Note head styles}.
1807 @node Indicating power chords
1808 @unnumberedsubsubsec Indicating power chords
1810 @funindex powerChords
1811 @funindex \powerChords
1813 @cindex power chords
1814 @cindex chords, power
1816 Power chords and their symbols can be engraved in chord mode or as chord
1819 @lilypond[quote,ragged-right,verbatim]
1820 ChordsAndSymbols = {
1825 \set minimumFret = #8
1829 \set minimumFret = #5
1849 Power chord symbols are automatically switched off as soon as one of the
1850 other common chord modifier is used:
1852 @lilypond[quote,ragged-right,verbatim]
1853 mixedChords = \chordmode {
1878 @rglos{power chord}.
1881 @ref{Extended and altered chords},
1882 @ref{Printing chord names}.
1885 @rlsr{Fretted strings}.
1892 * Banjo tablatures::
1895 @node Banjo tablatures
1896 @unnumberedsubsubsec Banjo tablatures
1898 @cindex banjo tablatures
1899 @cindex tablature, banjo
1901 LilyPond has basic support for the five-string banjo. When making tablatures
1902 for five-string banjo, use the banjo tablature format function to get
1903 correct fret numbers for the fifth string:
1905 @c due to crazy intervals of banjo music, absolute pitch is recommended
1907 @lilypond[quote,ragged-right,verbatim]
1909 g8 d' g'\5 a b g e d' |
1910 g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
1915 \new Staff \with { \omit StringNumber }
1916 { \clef "treble_8" \music }
1917 \new TabStaff \with {
1918 tablatureFormat = #fret-number-tablature-format-banjo
1919 stringTunings = #banjo-open-g-tuning
1925 @cindex banjo tunings
1926 @cindex tunings, banjo
1928 @funindex banjo-c-tuning
1929 @funindex banjo-modal-tuning
1930 @funindex banjo-open-d-tuning
1931 @funindex banjo-open-dm-tuning
1932 @funindex four-string-banjo
1934 A number of common tunings for the five-string banjo are predefined:
1935 @code{banjo-c-tuning} (gCGBD), @code{banjo-modal-tuning} (gDGCD),
1936 @code{banjo-open-d-tuning} (aDF#AD) and @code{banjo-open-dm-tuning}
1939 These may be converted to four-string tunings using the
1940 @code{four-string-banjo} function:
1943 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
1948 @file{ly/string-tunings-init.ly}.
1951 @rlsr{Fretted strings}.