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]
124 @lilypondfile[verbatim,quote,texidoc,doctitle]
125 {controlling-the-placement-of-chord-fingerings.ly}
127 @lilypondfile[verbatim,quote,texidoc,doctitle]
128 {allowing-fingerings-to-be-printed-inside-the-staff.ly}
132 @ref{Fingering instructions}.
135 @rlsr{Fretted strings}.
138 @rinternals{StringNumber},
139 @rinternals{Fingering}.
142 @node Default tablatures
143 @unnumberedsubsubsec Default tablatures
145 @cindex tablatures, basic
146 @cindex tablatures, default
151 Music for plucked string instruments is frequently notated using a
152 finger/touch notation or tablature. In contrast to traditional
153 notation pitches are not denoted with note heads, but by numbers (or
154 letter-like symbols in historical intavolatura). The staff lines
155 in tablature indicate the string on which the note is to be played,
156 and a number placed on a staff line indicated the fret at which
157 the corresponding string is to be pressed.
158 Notes that are to be played simultaneously are vertically aligned.
160 By default, string 1 is the highest string, and corresponds to the top
161 line on the @code{TabStaff}. The tuning of the @code{TabStaff}
162 strings defaults to the
163 standard guitar tuning (with 6 strings). The notes are printed as
164 tablature, by using @code{TabStaff} and @code{TabVoice} contexts. A
165 calligraphic tablature clef is added automatically.
167 @lilypond[quote,ragged-right,verbatim]
168 \new TabStaff \relative c' {
174 Default tablatures do not contain any symbols for tone duration nor any
175 other musical symbols such as e.g. expressive marks.
177 @lilypond[quote,ragged-right,verbatim]
189 \new Staff { \clef "G_8" \symbols }
190 \new TabStaff { \symbols }
195 @funindex \tabFullNotation
197 If all musical symbols used in traditional notation should also show up
198 in tablature one has to apply the command @code{\tabFullNotation} in a
199 @code{TabStaff}-context. Please bear in mind that half notes are
200 double-stemmed in tablature in order to distinguish them from quarter
203 @lilypond[quote,ragged-right,verbatim]
223 @funindex minimumFret
224 @funindex restrainOpenStrings
226 By default pitches are assigned to the lowest playing position on the
227 fret-board (first position). Open strings are automatically preferred.
228 If you would like a certain pitch to be played on a specific string you
229 can add a string number indication to the pitch name. If you don't want
230 to have string number indications appear in traditional notation, you
231 can override the respective stencil. Usually it will be more
232 comfortable to define the playing position by using the value of
233 @code{minimumFret}. The default value for minimumFret is 0.
235 Even when @code{minimumFret} is set, open strings are used whenever
236 possible. This behaviour can be changed by setting @code{restrainOpenStrings}
239 @lilypond[quote,ragged-right,verbatim]
240 \layout { \omit Voice.StringNumber }
242 \new Staff \relative c {
246 c,16\5 d\5 e\4 f\4 g4\4
249 \new TabStaff \relative c {
251 c,16\5 d\5 e\4 f\4 g4\4
252 \set TabStaff.minimumFret = #5
253 \set TabStaff.restrainOpenStrings = ##t
259 @funindex \tabChordRepeats
260 @funindex \chordRepeats
261 @cindex chord, repetition
262 @cindex repetition, using @code{q}
263 @cindex @code{q}, chord repetition
265 Chord constructs can be repeated by the chord repetition symbol
266 @code{q}. In combination with tabulatures, its behavior of removing
267 string and finger numbers alongside with other events is cumbersome, so
270 \chordRepeats #'(string-number-event fingering-event)
272 explicitly on music expressions in tabulature using @ref{Chord
273 repetition}. This particular command is so common that it is available
274 as @code{\tabChordRepeats}.
276 @lilypond[quote,verbatim]
277 guitar = \relative c' {
278 r8 <gis-2 cis-3 b-0>~ q4 q8~ 8 q4
287 \tabChordRepeats \guitar
292 Ties over a line break are parenthesized by default. The same holds for
293 the second alternative of a repeat.
295 @lilypond[quote,ragged-right,verbatim]
296 ties = \relative c' {
303 { g4\repeatTie c,2. }
330 @funindex \hideSplitTiedTabNotes
332 The command @code{\hideSplitTiedTabNotes} cancels the behavior of
333 engraving fret numbers in parentheses:
335 @lilypond[quote,ragged-right,verbatim]
336 ties = \relative c' {
342 { g4\repeatTie c,2. }
358 \hideSplitTiedTabNotes
370 @cindex harmonic indications in tablature notation
371 @cindex tablature and harmonic indications
373 @funindex \harmonicByFret
374 @funindex \harmonicByRatio
376 Harmonic indications can be added to tablature notation as sounding
379 @lilypond[verbatim,quote]
380 \layout { \omit Voice.StringNumber }
392 \new TabStaff { \firstHarmonic }
397 Note that the command @code{\harmonic} must always be attached to single
398 notes (possibly inside of a chord) instead of whole chords.
399 It only makes sense for open-string harmonics
400 in the 12th fret. All other harmonics should be calculated by LilyPond.
401 This can be achieved by indicating the fret where a finger of the
402 fretting hand should touch a string.
404 @lilypond[verbatim,quote]
406 \harmonicByFret #5 d16\4
407 \harmonicByFret #4 d16\4
408 \harmonicByFret #3 d8\4
409 \harmonicByFret #5 <g\3 b\2>2.
417 \new TabStaff { \fretHarmonics }
422 Alternatively, harmonics can be computed by defining the ratio of
423 string lengths above and below the harmonic fingering.
425 @lilypond[verbatim,quote]
427 \harmonicByRatio #1/2 <g\3 b\2 e'\1>4
428 \harmonicByRatio #1/3 <g\3 b\2 e'\1>4
429 \harmonicByRatio #1/4 { g8\3 b8\2 e'4\1 }
437 \new TabStaff { \ratioHarmonics }
443 @lilypondfile[verbatim,quote,texidoc,doctitle]
444 {stem-and-beam-behavior-in-tablature.ly}
446 @lilypondfile[verbatim,quote,texidoc,doctitle]
447 {polyphony-in-tablature.ly}
449 @lilypondfile[verbatim,quote,texidoc,doctitle]
450 {open-string-harmonics-in-tablature.ly}
452 @lilypondfile[verbatim,quote,texidoc,doctitle]
453 {fretted-string-harmonics-in-tablature.ly}
455 @cindex slides in tablature notation
456 @cindex tablature and slides
458 @lilypondfile[verbatim,quote,texidoc,doctitle]
459 {slides-in-tablature.ly}
461 @cindex chord glissandi
463 @lilypondfile[verbatim,quote,texidoc,doctitle]
464 {chord-glissando-in-tablature.ly}
469 @lilypondfile[verbatim,quote,texidoc,doctitle]
470 {hammer-on-and-pull-off.ly}
472 @lilypondfile[verbatim,quote,texidoc,doctitle]
473 {hammer-on-and-pull-off-using-voices.ly}
475 @lilypondfile[verbatim,quote,texidoc,doctitle]
476 {hammer-on-and-pull-off-using-chords.ly}
480 @ref{Chord repetition},
484 @ref{Written-out repeats}.
487 @rlsr{Fretted strings}.
490 @rinternals{TabNoteHead},
491 @rinternals{TabStaff},
492 @rinternals{TabVoice},
496 Chords are not handled in a special way, and hence the automatic
497 string selector may easily select the same string for two notes in
500 In order to handle @code{\partcombine}, a @code{TabStaff} must use
501 specially-created voices:
503 @lilypond[quote,ragged-right,verbatim]
504 melodia = \partcombine { e4 g g g } { e4 e e e }
507 \new TabVoice = "one" s1
508 \new TabVoice = "two" s1
509 \new TabVoice = "shared" s1
510 \new TabVoice = "solo" s1
516 Guitar special effects are limited to harmonics and slides.
519 @node Custom tablatures
520 @unnumberedsubsubsec Custom tablatures
522 @cindex tablatures, custom
523 @cindex tablature, banjo
524 @cindex tablature, mandolin
525 @cindex tablature, guitar
526 @cindex tablature, bass guitar
527 @cindex tablature, ukulele
528 @cindex tablature, predefined string tunings
529 @cindex fretted instruments, predefined string tunings
530 @cindex predefined string tunings for fretted instruments
531 @cindex tablature, violin
532 @cindex tablature, viola
533 @cindex tablature, cello
534 @cindex tablature, bass
535 @cindex tablature, double bass
537 @funindex stringTunings
539 LilyPond tablature automatically calculates the fret for
540 a note based on the string to which the note is assigned.
541 In order to do this, the tuning of the strings must be
542 specified. The tuning of the strings is given in the
543 @code{stringTunings} property.
545 LilyPond comes with predefined string tunings for banjo, mandolin,
546 guitar, bass guitar, ukulele, violin, viola, cello, and double bass.
547 LilyPond automatically sets
548 the correct transposition for predefined tunings. The following
549 example is for bass guitar, which sounds an octave lower than
552 @lilypond[quote,ragged-right,verbatim]
562 \new TabStaff \with {
563 stringTunings = #bass-tuning
572 The default string tuning is @code{guitar-tuning}, which
573 is the standard EADGBE tuning. Some other predefined tunings are
574 @code{guitar-open-g-tuning}, @code{mandolin-tuning} and
575 @code{banjo-open-g-tuning}. The predefined string tunings
576 are found in @file{ly/string-tunings-init.ly}.
578 @funindex stringTuning
579 @funindex \stringTuning
580 @cindex tablature, custom string tunings
581 @cindex custom string tunings
583 Any desired string tuning can be created. The
584 @code{\stringTuning} function can be
585 used to define a string tuning which can be used
586 to set @code{stringTunings} for the current context.
588 Its argument is a chord construct
589 defining the pitches of each string in the tuning.
590 The chord construct must be in absolute octave mode,
591 see @ref{Absolute octave entry}. The string
592 with the highest number (generally the lowest string) must
593 come first in the chord. For example, we can
594 define a string tuning for a four-string instrument with pitches
595 of @code{a''}, @code{d''}, @code{g'}, and @code{c'}:
597 @lilypond[quote,verbatim]
610 \set Staff.stringTunings = \stringTuning <c' g' d'' a''>
616 The @code{stringTunings} property is also used by
617 @code{FretBoards} to calculate automatic fret diagrams.
619 String tunings are used as part of the hash key
620 for predefined fret diagrams
621 (see @ref{Predefined fret diagrams}).
623 The previous example could also be written as follows:
625 @lilypond[quote,verbatim]
626 custom-tuning = \stringTuning <c' g' d'' a''>
639 \set TabStaff.stringTunings = #custom-tuning
645 Internally, a string tuning is a Scheme list of string pitches,
646 one for each string, ordered by string number from 1 to N,
647 where string 1 is at the top of the tablature staff and
648 string N is at the bottom. This ordinarily results in ordering
649 from highest pitch to lowest pitch, but some instruments
650 (e.g. ukulele) do not have strings ordered by pitch.
652 A string pitch in a string tuning list is a LilyPond pitch
653 object. Pitch objects are created with the Scheme function
654 @code{ly:make-pitch} (see @ref{Scheme functions}).
656 @code{\stringTuning} creates such an object from chord input.
658 LilyPond automatically calculates the number of lines in the
659 @code{TabStaff} and the number of strings in an automatically
660 calculated @code{FretBoard} as the number of elements
661 in @code{stringTunings}.
663 To let all TabStaff contexts use the same custom tuning by default,
670 stringTunings = \stringTuning <c' g' d'' a''>
676 @cindex moderntab clef
677 @cindex clef, moderntab
681 A modern tab clef can also be used.
683 @lilypond[quote,ragged-right,verbatim]
693 The modern tab clef supports tablatures from 4 to 7 strings.
697 @ref{Absolute octave entry},
698 @ref{Predefined fret diagrams},
699 @ref{Scheme functions}.
702 @file{ly/string-tunings-init.ly},
703 @file{scm/tablature.scm}.
706 @rlsr{Fretted strings}.
709 @rinternals{Tab_note_heads_engraver}.
712 Automatic tablature calculations do not work properly in most
713 cases for instruments where string pitches do not vary
714 monotonically with string number, such as ukuleles.
717 @node Fret diagram markups
718 @unnumberedsubsubsec Fret diagram markups
720 @cindex fret diagrams
721 @cindex chord diagrams
722 @cindex diagrams, fret
723 @cindex diagrams, chord for fretted instruments
724 @cindex fret diagrams, custom
725 @cindex custom fret diagrams
727 Fret diagrams can be added to music as a markup to the desired
728 note. The markup contains information about the desired fret
729 diagram. There are three different fret-diagram markup
730 interfaces: standard, terse, and verbose. The three interfaces
731 produce equivalent markups, but have varying amounts of
732 information in the markup string. Details about the
733 syntax of the different markup strings used to define
734 fret diagrams are found at @ref{Instrument Specific Markup}.
736 The standard fret diagram markup string indicates the string
737 number and the fret number for each dot to be placed on the string.
738 In addition, open and unplayed (muted) strings can be indicated.
740 @lilypond[quote, verbatim]
749 <c e g c' e'>1^\markup {
750 \fret-diagram #"6-x;5-3;4-2;3-o;2-1;1-o;"
752 <d a d' f'>1^\markup {
753 \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-1;"
759 @cindex barre indications
761 Barre indications can be added to the diagram from
762 the fret-diagram markup string.
764 @lilypond[quote, verbatim]
773 <f, c f a c' f'>1^\markup {
774 \fret-diagram #"c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
776 <g, d g b d' g'>1^\markup {
777 \fret-diagram #"c:6-1-3;6-3;5-5;4-5;3-4;2-3;1-3;"
783 @cindex fret-diagram markup
786 @funindex fret-diagram
787 @funindex \fret-diagram
789 The size of the fret diagram, and the number of frets in the diagram
790 can be changed in the fret-diagram markup string.
792 @lilypond[quote, verbatim]
801 <f, c f a c' f'>1^\markup {
802 \fret-diagram #"s:1.5;c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
804 <g, b, d g b g'>1^\markup {
805 \fret-diagram #"h:6;6-3;5-2;4-o;3-o;2-o;1-3;"
811 The number of strings in a fret diagram can be changed to accommodate
812 different instruments such as banjos and ukuleles with the fret-diagram
815 @lilypond[quote, verbatim]
823 % An 'A' chord for ukulele
825 \fret-diagram #"w:4;4-2-2;3-1-1;2-o;1-o;"
831 Fingering indications can be added, and the location of fingering labels
832 can be controlled by the fret-diagram markup string.
834 @lilypond[quote, verbatim]
843 <c e g c' e'>1^\markup {
844 \fret-diagram #"f:1;6-x;5-3-3;4-2-2;3-o;2-1-1;1-o;"
846 <d a d' f'>1^\markup {
847 \fret-diagram #"f:2;6-x;5-x;4-o;3-2-2;2-3-3;1-1-1;"
853 Dot radius and dot position can be controlled with the fret-diagram
856 @lilypond[quote, verbatim]
865 <c e g c' e'>1^\markup {
866 \fret-diagram #"d:0.35;6-x;5-3;4-2;3-o;2-1;1-o;"
868 <d a d' f'>1^\markup {
869 \fret-diagram #"p:0.2;6-x;5-x;4-o;3-2;2-3;1-1;"
875 @cindex fret-diagram-terse markup
877 @funindex fret-diagram-terse
878 @funindex \fret-diagram-terse
880 The fret-diagram-terse markup string omits string numbers; the string
881 number is implied by the presence of semicolons. There is one semicolon
882 for each string in the diagram. The first semicolon corresponds to the
883 highest string number and the last semicolon corresponds to the first string.
884 Mute strings, open strings, and fret numbers can be indicated.
886 @lilypond[quote, verbatim]
895 <c e g c' e'>1^\markup {
896 \fret-diagram-terse #"x;3;2;o;1;o;"
898 <d a d' f'>1^\markup {
899 \fret-diagram-terse #"x;x;o;2;3;1;"
905 Barre indicators can be included in the fret-diagram-terse markup string.
907 @lilypond[quote, verbatim]
916 <f, c f a c' f'>1^\markup {
917 \fret-diagram-terse #"1-(;3;3;2;1;1-);"
919 <g, d g b d' g'>1^\markup {
920 \fret-diagram-terse #"3-(;5;5;4;3;3-);"
926 Fingering indications can be included in the fret-diagram-terse markup string.
928 @c Need to use override to enable fingerings to show this -- can we do so?
929 @lilypond[quote, verbatim]
937 \override Voice.TextScript.fret-diagram-details.finger-code = #'below-string
939 <c e g c' e'>1^\markup {
940 \fret-diagram-terse #"x;3-3;2-2;o;1-1;o;"
942 <d a d' f'>1^\markup {
943 \fret-diagram-terse #"x;x;o;2-2;3-3;1-1;"
949 Other fret diagram properties must be adjusted using
950 @code{\override} when using the fret-diagram-terse markup.
952 @cindex fret-diagram-verbose markup
955 @funindex fret-diagram-verbose
956 @funindex \fret-diagram-verbose
958 The fret-diagram-verbose markup string is in the format of a Scheme list. Each
959 element of the list indicates an item to be placed on the fret diagram.
961 @lilypond[quote, verbatim]
970 <c e g c' e'>1^\markup {
971 \fret-diagram-verbose #'(
980 <d a d' f'>1^\markup {
981 \fret-diagram-verbose #'(
994 Fingering indications and barres can be included in a
995 fret-diagram-verbose markup string. Unique to the
996 fret-diagram-verbose interface is a capo indication that
997 can be placed on the fret diagram. The capo indication is
998 a thick bar that covers all strings. The fret with the
999 capo will be the lowest fret in the fret diagram.
1001 @c \override is necessary to make fingering visible
1002 @lilypond[quote, verbatim]
1011 \override Voice.TextScript.fret-diagram-details.finger-code = #'below-string
1012 <f, c f a c' f'>1^\markup {
1013 \fret-diagram-verbose #'(
1023 <g, b, d g b g'>1^\markup {
1024 \fret-diagram-verbose #'(
1033 <c g c' e' g'>1^\markup {
1034 \fret-diagram-verbose #'(
1046 All other fret diagram properties must be adjusted using
1047 @code{\override} when using the fret-diagram-verbose markup.
1050 The following example shows the three fret-diagram markup
1051 interfaces, along with examples of common tweaks. For example,
1052 the size of the verbose fret diagram is reduced to 0.75, and the
1053 finger indications are specified to appear below the diagram. The
1054 terse diagram includes tweaks to specify placement of finger code
1057 @lilypond[verbatim,ragged-right,quote]
1061 \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
1065 \override #'(size . 0.75) {
1066 \override #'(finger-code . below-string) {
1067 \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
1078 \override #'(dot-radius . 0.35) {
1079 \override #'(finger-code . in-dot) {
1080 \override #'(dot-color . white) {
1081 \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
1091 @cindex customized fret diagram
1092 @cindex fret diagram, customized
1093 @cindex diagram, fret, customized
1095 @funindex fret-diagram-interface
1097 The graphical layout of a fret diagram can be customized according to
1098 user preference through the properties of the
1099 @code{fret-diagram-interface}. Details are found at
1100 @rinternals{fret-diagram-interface}. For a fret diagram
1101 markup, the interface properties belong to @code{Voice.TextScript}.
1105 @lilypondfile[verbatim,quote,texidoc,doctitle]
1106 {changing-fret-orientations.ly}
1108 @lilypondfile[verbatim,quote,texidoc,doctitle]
1109 {customizing-markup-fret-diagrams.ly}
1113 @ref{Instrument Specific Markup}.
1116 @rlsr{Fretted strings}.
1118 Internals Reference:
1119 @rinternals{fret-diagram-interface}.
1122 @node Predefined fret diagrams
1123 @unnumberedsubsubsec Predefined fret diagrams
1125 @cindex fret diagrams
1126 @cindex fret diagrams, ukulele
1127 @cindex fret diagrams, mandolin
1128 @cindex chord diagrams
1130 @funindex FretBoards
1131 @funindex stringTunings
1133 Fret diagrams can be displayed using the @code{FretBoards} context. By
1134 default, the @code{FretBoards} context will display fret diagrams that
1135 are stored in a lookup table:
1137 @lilypond[verbatim, ragged-right, quote]
1138 \include "predefined-guitar-fretboards.ly"
1146 The default predefined fret diagrams are contained in the file
1147 @file{predefined-guitar-fretboards.ly}. Fret diagrams are
1148 stored based on the pitches of a chord and the value of
1149 @code{stringTunings} that is currently in use.
1150 @file{predefined-guitar-fretboards.ly} contains predefined
1151 fret diagrams only for @code{guitar-tuning}. Predefined fret
1152 diagrams can be added for other instruments or other tunings
1153 by following the examples found in
1154 @file{predefined-guitar-fretboards.ly}.
1156 Fret diagrams for the ukulele are contained in the file @*
1157 @file{predefined-ukulele-fretboards.ly}.
1159 @lilypond[verbatim, ragged-right, quote]
1160 \include "predefined-ukulele-fretboards.ly"
1162 myChords = \chordmode { a1 a:m a:aug }
1169 \set Staff.stringTunings = #ukulele-tuning
1174 Fret diagrams for the mandolin are contained in the file @*
1175 @file{predefined-mandolin-fretboards.ly}.
1177 @lilypond[verbatim, ragged-right, quote]
1178 \include "predefined-mandolin-fretboards.ly"
1180 myChords = \chordmode { c1 c:m7.5- c:aug }
1187 \set Staff.stringTunings = #mandolin-tuning
1192 Chord pitches can be entered
1193 either as simultaneous music or using chord mode (see
1194 @ref{Chord mode overview}).
1196 @lilypond[verbatim, ragged-right,quote]
1197 \include "predefined-guitar-fretboards.ly"
1204 @cindex chord names with fret diagrams
1205 @cindex fret diagrams with chord names
1207 @funindex ChordNames
1209 @funindex \chordmode
1211 It is common that both chord names and fret diagrams are displayed together.
1212 This is achieved by putting a @code{ChordNames} context in parallel with
1213 a @code{FretBoards} context and giving both contexts the same music.
1215 @lilypond[verbatim, ragged-right, quote]
1216 \include "predefined-guitar-fretboards.ly"
1217 mychords = \chordmode{
1231 @cindex transposing fret diagrams
1232 @cindex fret diagrams, transposing
1233 @cindex diagrams, fret, transposing
1235 Predefined fret diagrams are transposable, as long as a diagram for the
1236 transposed chord is stored in the fret diagram table.
1238 @lilypond[verbatim, ragged-right, quote]
1239 \include "predefined-guitar-fretboards.ly"
1240 mychords = \chordmode{
1246 \transpose c e { \mychords }
1259 The predefined fret diagram table for guitar contains eight chords (major, minor,
1260 augmented, diminished, dominant seventh, major seventh, minor seventh, dominant ninth)
1261 for each of 17 keys.
1262 The predefined fret diagram table for ukulele contains these chords
1263 plus an additional three chords (major sixth, suspended second, and
1265 A complete list of the predefined fret diagrams is
1266 shown in @ref{Predefined fretboard diagrams}. If there is no entry in
1267 the table for a chord, the FretBoards engraver will calculate a
1268 fret-diagram using the automatic fret diagram functionality described in
1269 @ref{Automatic fret diagrams}.
1271 @lilypond[verbatim, ragged-right, quote]
1272 \include "predefined-guitar-fretboards.ly"
1273 mychords = \chordmode{
1287 @cindex fret diagrams, adding custom
1288 @cindex custom fret diagrams, adding
1289 @cindex adding custom fret diagrams
1291 Fret diagrams can be added to the fret diagram table. To add a diagram,
1292 you must specify the hash table for the diagram, the chord for the
1293 diagram, the tuning to be used, and
1294 a definition for the diagram. Normally, the hash table will be
1295 @var{default-fret-table}. The diagram definition can be either a
1296 fret-diagram-terse definition string or a fret-diagram-verbose
1299 @lilypond[verbatim, ragged-right, quote]
1300 \include "predefined-guitar-fretboards.ly"
1302 \storePredefinedDiagram #default-fret-table
1303 \chordmode { c:maj9 }
1307 mychords = \chordmode {
1321 Different fret diagrams for the same chord name can be stored using different
1322 octaves of pitches. The different octave should be at least two octaves
1323 above or below the default octave, because the octaves above and below the
1324 default octave are used for transposing fretboards.
1326 @lilypond[verbatim, ragged-right, quote]
1327 \include "predefined-guitar-fretboards.ly"
1329 \storePredefinedDiagram #default-fret-table
1332 #(offset-fret 2 (chord-shape 'bes guitar-tuning))
1334 mychords = \chordmode {
1348 @cindex fretted instruments, chord shapes
1349 @cindex chord shapes for fretted instruments
1351 @funindex \addChordShape
1352 @funindex addChordShape
1353 @funindex storePredefinedDiagram
1354 @funindex \storePredefinedDiagram
1356 In addition to fret diagrams, LilyPond stores an internal list of chord
1357 shapes. The chord shapes are fret diagrams that can be shifted along
1358 the neck to different positions to provide different chords. Chord
1359 shapes can be added to the internal list and then used to define
1360 predefined fret diagrams. Because they can be moved to various
1361 positions on the neck, chord shapes will normally not contain
1362 any open strings. Like fret diagrams, chord shapes can be
1363 entered as either fret-diagram-terse strings or fret-diagram-verbose
1366 @lilypond[verbatim, ragged-right, quote]
1367 \include "predefined-guitar-fretboards.ly"
1369 % Add a new chord shape
1371 \addChordShape #'powerf #guitar-tuning #"1-1;3-3;3-4;x;x;x;"
1373 % add some new chords based on the power chord shape
1375 \storePredefinedDiagram #default-fret-table
1378 #(chord-shape 'powerf guitar-tuning)
1379 \storePredefinedDiagram #default-fret-table
1382 #(offset-fret 2 (chord-shape 'powerf guitar-tuning))
1384 mychords = \chordmode{
1398 The graphical layout of a fret diagram can be customized according to
1399 user preference through the properties of the
1400 @code{fret-diagram-interface}. Details are found at
1401 @rinternals{fret-diagram-interface}. For a predefined fret diagram,
1402 the interface properties belong to @code{FretBoards.FretBoard}.
1406 @lilypondfile[verbatim,quote,texidoc,doctitle]
1407 {customizing-fretboard-fret-diagrams.ly}
1409 @lilypondfile[verbatim,quote,texidoc,doctitle]
1410 {defining-predefined-fretboards-for-other-instruments.ly}
1412 @lilypondfile[verbatim,quote,texidoc,doctitle,ragged-right]
1413 {chordchanges-for-fretboards.ly}
1415 @lilypondfile[verbatim,quote,texidoc,doctitle]
1416 {fretboards-alternate-tables.ly}
1420 @ref{Custom tablatures},
1421 @ref{Automatic fret diagrams},
1422 @ref{Chord mode overview},
1423 @ref{Predefined fretboard diagrams}.
1426 @file{ly/predefined-guitar-fretboards.ly}, @*
1427 @file{ly/predefined-guitar-ninth-fretboards.ly}, @*
1428 @file{ly/predefined-ukulele-fretboards.ly}, @*
1429 @file{ly/predefined-mandolin-fretboards.ly}.
1432 @rlsr{Fretted strings}.
1434 Internals Reference:
1435 @rinternals {fret-diagram-interface}.
1438 @node Automatic fret diagrams
1439 @unnumberedsubsubsec Automatic fret diagrams
1441 @cindex fret diagrams, automatic
1442 @cindex chord diagrams, automatic
1443 @cindex automatic fret diagrams
1444 @cindex automatic chord diagrams
1446 Fret diagrams can be automatically created from entered notes using the
1447 @code{FretBoards} context. If no predefined diagram is available for
1448 the entered notes in the active @code{stringTunings}, this context
1449 calculates strings and frets that can be used to play the notes.
1451 @lilypond[quote,ragged-right,verbatim]
1470 @funindex predefinedFretboardsOff
1471 @funindex \predefinedFretboardsOff
1472 @funindex predefinedFretboardsOn
1473 @funindex \predefinedFretboardsOn
1475 As no predefined diagrams are loaded by default, automatic calculation
1476 of fret diagrams is the default behavior. Once default diagrams are
1477 loaded, automatic calculation can be enabled and disabled with predefined
1480 @lilypond[quote,ragged-right,verbatim]
1482 \storePredefinedDiagram #default-fret-table
1485 #"x;3-1-(;5-2;5-3;5-4;3-1-1-);"
1494 \predefinedFretboardsOff
1496 \predefinedFretboardsOn
1510 Sometimes the fretboard calculator will be unable to find
1511 an acceptable diagram. This can often be remedied by
1512 manually assigning a note to a string. In many cases, only one
1513 note need be manually placed on a string; the rest of
1514 the notes will then be placed appropriately by the
1515 @code{FretBoards} context.
1517 @cindex fret diagrams, adding fingerings
1518 @cindex fingerings, adding to fret diagrams
1520 Fingerings can be added to FretBoard fret diagrams.
1522 @lilypond[quote, verbatim]
1530 <c-3 e-2 g c'-1 e'>1
1541 @funindex minimumFret
1543 The minimum fret to be used in calculating strings and frets for
1544 the FretBoard context can be set with the @code{minimumFret}
1547 @lilypond[quote, verbatim]
1556 \set FretBoards.minimumFret = #5
1567 The strings and frets for the @code{FretBoards} context depend
1568 on the @code{stringTunings} property, which has the same meaning
1569 as in the TabStaff context. See @ref{Custom tablatures} for
1570 information on the @code{stringTunings} property.
1572 The graphical layout of a fret diagram can be customized according to
1573 user preference through the properties of the
1574 @code{fret-diagram-interface}. Details are found at
1575 @rinternals{fret-diagram-interface}. For a @code{FretBoards} fret
1576 diagram, the interface properties belong to
1577 @code{FretBoards.FretBoard}.
1581 @code{\predefinedFretboardsOff},
1582 @code{\predefinedFretboardsOn}.
1587 @ref{Custom tablatures}.
1590 @rlsr{Fretted strings}.
1592 Internals Reference:
1593 @rinternals {fret-diagram-interface}.
1596 Automatic fretboard calculations do not work properly for instruments
1597 with non-monotonic tunings.
1600 @node Right-hand fingerings
1601 @unnumberedsubsubsec Right-hand fingerings
1603 @cindex fretted instruments, right hand fingerings
1604 @cindex fingerings, right hand for fretted instruments
1605 @cindex right hand fingerings for fretted instruments
1607 @funindex rightHandFinger
1608 @funindex \rightHandFinger
1610 Right-hand fingerings @var{p-i-m-a} must be entered using
1611 @code{\rightHandFinger} followed by a number.
1613 @warning{If the number is entered in Scheme notation, remember to append
1614 a space before following it with a closing @code{>} or similar.}
1616 @lilypond[quote,verbatim,relative=0]
1618 c4\rightHandFinger #1
1619 e\rightHandFinger #2
1620 g\rightHandFinger #3
1621 c\rightHandFinger #4
1622 <c,\rightHandFinger #1 e\rightHandFinger #2
1623 g\rightHandFinger #3 c\rightHandFinger #4 >1
1626 For convenience, you can abbreviate @code{\rightHandFinger} to something
1627 short, for example @code{RH},
1636 @lilypondfile[verbatim,quote,texidoc,doctitle]
1637 {placement-of-right-hand-fingerings.ly}
1639 @lilypondfile[verbatim,quote,texidoc,doctitle]
1640 {fingerings,-string-indications,-and-right-hand-fingerings.ly}
1644 @rlsr{Fretted strings}.
1646 Internals Reference:
1647 @rinternals{StrokeFinger}.
1653 Most of the notational issues associated with guitar music are
1654 covered sufficiently in the general fretted strings section, but there
1655 are a few more worth covering here. Occasionally users want to
1656 create songbook-type documents having only lyrics with chord
1657 indications above them. Since LilyPond is a music typesetter,
1658 it is not recommended for documents that have no music notation
1659 in them. A better alternative is a word processor, text editor,
1660 or, for experienced users, a typesetter like GuitarTeX.
1663 * Indicating position and barring::
1664 * Indicating harmonics and dampened notes::
1665 * Indicating power chords::
1668 @node Indicating position and barring
1669 @unnumberedsubsubsec Indicating position and barring
1671 @cindex indicating position and barring for fretted instruments
1672 @cindex fretted instruments, indicating position and barring
1674 This example demonstrates how to include guitar position and
1675 barring indications.
1677 @lilypond[quote,ragged-right,verbatim,relative=0]
1681 \override TextSpanner.bound-details.left.text = #"XII "
1683 b16 e g e b g\stopTextSpan
1689 @ref{Text spanners}.
1692 @rlsr{Fretted strings},
1693 @rlsr{Expressive marks}.
1696 @node Indicating harmonics and dampened notes
1697 @unnumberedsubsubsec Indicating harmonics and dampened notes
1699 @cindex fretted instruments, dampened notes
1700 @cindex fretted instruments, harmonics
1701 @cindex dampened notes on fretted instruments
1702 @cindex harmonics on fretted instruments
1704 Special note heads can be used to indicate dampened notes or
1705 harmonics. Harmonics are normally further explained with a
1708 @lilypond[quote,ragged-right,verbatim]
1711 \override Staff.NoteHead.style = #'harmonic-mixed
1712 d^\markup { \italic { \fontsize #-2 { "harm. 12" }}} <g b>1
1716 Dampened notes (also called @notation{dead notes}) are supported
1717 within normal and tablature staves:
1719 @lilypond[quote,ragged-right,verbatim]
1720 music = \relative c' {
1721 < a\3 \deadNote c\2 a'\1 >4
1722 < b\3 \deadNote d\2 b'\1 >
1723 < c\3 \deadNote e\2 c'\1 >
1725 \tuplet 3/2 { g8 b e }
1740 Another playing technique (especially used on electric guitars) is
1741 called @notation{palm mute}. The string is hereby partly muted by the
1742 palm of the striking hand (hence the name). Lilypond supports
1743 the notation of palm mute-style notes by changing the note head to a
1746 @lilypond[quote,ragged-right,verbatim]
1747 \new Voice { % Warning: explicit Voice instantiation is
1748 % required to have palmMuteOff work properly
1749 % when palmMuteOn comes at the beginning of
1754 e8^\markup { \musicglyph #"noteheads.u2do" = palm mute }
1757 e e \palmMute e e e |
1758 e8 \palmMute { e e e } e e e e |
1759 < \palmMute e b' e >8 \palmMute { e e e } < \palmMute e b' e >2
1766 @rlsr{Fretted strings}.
1769 @ref{Special note heads},
1770 @ref{Note head styles}.
1773 @node Indicating power chords
1774 @unnumberedsubsubsec Indicating power chords
1776 @funindex powerChords
1777 @funindex \powerChords
1779 @cindex power chords
1780 @cindex chords, power
1782 Power chords and their symbols can be engraved in chord mode or as chord
1785 @lilypond[quote,ragged-right,verbatim]
1786 ChordsAndSymbols = {
1791 \set minimumFret = #8
1795 \set minimumFret = #5
1815 Power chord symbols are automatically switched off as soon as one of the
1816 other common chord modifier is used:
1818 @lilypond[quote,ragged-right,verbatim]
1819 mixedChords = \chordmode {
1844 @rglos{power chord}.
1847 @ref{Extended and altered chords},
1848 @ref{Printing chord names}.
1851 @rlsr{Fretted strings}.
1858 * Banjo tablatures::
1861 @node Banjo tablatures
1862 @unnumberedsubsubsec Banjo tablatures
1864 @cindex banjo tablatures
1865 @cindex tablature, banjo
1867 LilyPond has basic support for the five-string banjo. When making tablatures
1868 for five-string banjo, use the banjo tablature format function to get
1869 correct fret numbers for the fifth string:
1871 @c due to crazy intervals of banjo music, absolute pitch is recommended
1873 @lilypond[quote,ragged-right,verbatim]
1875 g8 d' g'\5 a b g e d' |
1876 g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
1881 \new Staff \with { \omit StringNumber }
1882 { \clef "treble_8" \music }
1883 \new TabStaff \with {
1884 tablatureFormat = #fret-number-tablature-format-banjo
1885 stringTunings = #banjo-open-g-tuning
1891 @cindex banjo tunings
1892 @cindex tunings, banjo
1894 @funindex banjo-c-tuning
1895 @funindex banjo-modal-tuning
1896 @funindex banjo-open-d-tuning
1897 @funindex banjo-open-dm-tuning
1898 @funindex four-string-banjo
1900 A number of common tunings for the five-string banjo are predefined:
1901 @code{banjo-c-tuning} (gCGBD), @code{banjo-modal-tuning} (gDGCD),
1902 @code{banjo-open-d-tuning} (aDF#AD) and @code{banjo-open-dm-tuning}
1905 These may be converted to four-string tunings using the
1906 @code{four-string-banjo} function:
1909 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
1914 @file{ly/string-tunings-init.ly}.
1917 @rlsr{Fretted strings}.