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 Fingering indication dots can be colored as well as parenthesized;
1002 the parenthesis's color can also be altered independently.
1004 @c \override is necessary to make fingering visible
1005 @lilypond[quote, verbatim]
1014 \override Voice.TextScript.fret-diagram-details.finger-code = #'below-string
1015 <f, c f a c' f'>1^\markup {
1016 \fret-diagram-verbose #'(
1026 <g, b, d g b g'>1^\markup {
1027 \fret-diagram-verbose #'(
1036 <c g c' e' g'>1^\markup {
1037 \fret-diagram-verbose #'(
1045 \override Voice.TextScript.size = 1.5
1046 <c g c' e' g'>1^\markup {
1047 \fret-diagram-verbose #'(
1048 (place-fret 6 3 1 red parenthesized default-paren-color)
1049 (place-fret 5 3 1 inverted)
1050 (place-fret 4 5 2 blue parenthesized)
1051 (place-fret 3 5 3 blue)
1052 (place-fret 2 5 4 blue)
1053 (place-fret 1 3 1 inverted)
1060 All other fret diagram properties must be adjusted using
1061 @code{\override} when using the fret-diagram-verbose markup.
1064 The following example shows the three fret-diagram markup
1065 interfaces, along with examples of common tweaks. For example,
1066 the size of the verbose fret diagram is reduced to 0.75, and the
1067 finger indications are specified to appear below the diagram. The
1068 terse diagram includes tweaks to specify placement of finger code
1071 @lilypond[verbatim,ragged-right,quote]
1075 \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
1079 \override #'(size . 0.75) {
1080 \override #'(finger-code . below-string) {
1081 \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
1092 \override #'(dot-radius . 0.35) {
1093 \override #'(finger-code . in-dot) {
1094 \override #'(dot-color . white) {
1095 \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
1105 @cindex customized fret diagram
1106 @cindex fret diagram, customized
1107 @cindex diagram, fret, customized
1109 @funindex fret-diagram-interface
1111 The graphical layout of a fret diagram can be customized according to
1112 user preference through the properties of the
1113 @code{fret-diagram-interface}. Details are found at
1114 @rinternals{fret-diagram-interface}. For a fret diagram
1115 markup, the interface properties belong to @code{Voice.TextScript}.
1119 @lilypondfile[verbatim,quote,texidoc,doctitle]
1120 {changing-fret-orientations.ly}
1122 @lilypondfile[verbatim,quote,texidoc,doctitle]
1123 {customizing-markup-fret-diagrams.ly}
1127 @ref{Instrument Specific Markup}.
1130 @rlsr{Fretted strings}.
1132 Internals Reference:
1133 @rinternals{fret-diagram-interface}.
1136 @node Predefined fret diagrams
1137 @unnumberedsubsubsec Predefined fret diagrams
1139 @cindex fret diagrams
1140 @cindex fret diagrams, ukulele
1141 @cindex fret diagrams, mandolin
1142 @cindex chord diagrams
1144 @funindex FretBoards
1145 @funindex stringTunings
1147 Fret diagrams can be displayed using the @code{FretBoards} context. By
1148 default, the @code{FretBoards} context will display fret diagrams that
1149 are stored in a lookup table:
1151 @lilypond[verbatim, ragged-right, quote]
1152 \include "predefined-guitar-fretboards.ly"
1160 The default predefined fret diagrams are contained in the file
1161 @file{predefined-guitar-fretboards.ly}. Fret diagrams are
1162 stored based on the pitches of a chord and the value of
1163 @code{stringTunings} that is currently in use.
1164 @file{predefined-guitar-fretboards.ly} contains predefined
1165 fret diagrams only for @code{guitar-tuning}. Predefined fret
1166 diagrams can be added for other instruments or other tunings
1167 by following the examples found in
1168 @file{predefined-guitar-fretboards.ly}.
1170 Fret diagrams for the ukulele are contained in the file @*
1171 @file{predefined-ukulele-fretboards.ly}.
1173 @lilypond[verbatim, ragged-right, quote]
1174 \include "predefined-ukulele-fretboards.ly"
1176 myChords = \chordmode { a1 a:m a:aug }
1183 \set Staff.stringTunings = #ukulele-tuning
1188 Fret diagrams for the mandolin are contained in the file @*
1189 @file{predefined-mandolin-fretboards.ly}.
1191 @lilypond[verbatim, ragged-right, quote]
1192 \include "predefined-mandolin-fretboards.ly"
1194 myChords = \chordmode { c1 c:m7.5- c:aug }
1201 \set Staff.stringTunings = #mandolin-tuning
1206 Chord pitches can be entered
1207 either as simultaneous music or using chord mode (see
1208 @ref{Chord mode overview}).
1210 @lilypond[verbatim, ragged-right,quote]
1211 \include "predefined-guitar-fretboards.ly"
1218 @cindex chord names with fret diagrams
1219 @cindex fret diagrams with chord names
1221 @funindex ChordNames
1223 @funindex \chordmode
1225 It is common that both chord names and fret diagrams are displayed together.
1226 This is achieved by putting a @code{ChordNames} context in parallel with
1227 a @code{FretBoards} context and giving both contexts the same music.
1229 @lilypond[verbatim, ragged-right, quote]
1230 \include "predefined-guitar-fretboards.ly"
1231 mychords = \chordmode{
1245 @cindex transposing fret diagrams
1246 @cindex fret diagrams, transposing
1247 @cindex diagrams, fret, transposing
1249 Predefined fret diagrams are transposable, as long as a diagram for the
1250 transposed chord is stored in the fret diagram table.
1252 @lilypond[verbatim, ragged-right, quote]
1253 \include "predefined-guitar-fretboards.ly"
1254 mychords = \chordmode{
1260 \transpose c e { \mychords }
1273 The predefined fret diagram table for guitar contains eight chords (major, minor,
1274 augmented, diminished, dominant seventh, major seventh, minor seventh, dominant ninth)
1275 for each of 17 keys.
1276 The predefined fret diagram table for ukulele contains these chords
1277 plus an additional three chords (major sixth, suspended second, and
1279 A complete list of the predefined fret diagrams is
1280 shown in @ref{Predefined fretboard diagrams}. If there is no entry in
1281 the table for a chord, the FretBoards engraver will calculate a
1282 fret-diagram using the automatic fret diagram functionality described in
1283 @ref{Automatic fret diagrams}.
1285 @lilypond[verbatim, ragged-right, quote]
1286 \include "predefined-guitar-fretboards.ly"
1287 mychords = \chordmode{
1301 @cindex fret diagrams, adding custom
1302 @cindex custom fret diagrams, adding
1303 @cindex adding custom fret diagrams
1305 Fret diagrams can be added to the fret diagram table. To add a diagram,
1306 you must specify the hash table for the diagram, the chord for the
1307 diagram, the tuning to be used, and
1308 a definition for the diagram. Normally, the hash table will be
1309 @var{default-fret-table}. The diagram definition can be either a
1310 fret-diagram-terse definition string or a fret-diagram-verbose
1313 @lilypond[verbatim, ragged-right, quote]
1314 \include "predefined-guitar-fretboards.ly"
1316 \storePredefinedDiagram #default-fret-table
1317 \chordmode { c:maj9 }
1321 mychords = \chordmode {
1335 Different fret diagrams for the same chord name can be stored using different
1336 octaves of pitches. The different octave should be at least two octaves
1337 above or below the default octave, because the octaves above and below the
1338 default octave are used for transposing fretboards.
1340 @lilypond[verbatim, ragged-right, quote]
1341 \include "predefined-guitar-fretboards.ly"
1343 \storePredefinedDiagram #default-fret-table
1346 #(offset-fret 2 (chord-shape 'bes guitar-tuning))
1348 mychords = \chordmode {
1362 @cindex fretted instruments, chord shapes
1363 @cindex chord shapes for fretted instruments
1365 @funindex \addChordShape
1366 @funindex addChordShape
1367 @funindex storePredefinedDiagram
1368 @funindex \storePredefinedDiagram
1370 In addition to fret diagrams, LilyPond stores an internal list of chord
1371 shapes. The chord shapes are fret diagrams that can be shifted along
1372 the neck to different positions to provide different chords. Chord
1373 shapes can be added to the internal list and then used to define
1374 predefined fret diagrams. Because they can be moved to various
1375 positions on the neck, chord shapes will normally not contain
1376 any open strings. Like fret diagrams, chord shapes can be
1377 entered as either fret-diagram-terse strings or fret-diagram-verbose
1380 @lilypond[verbatim, ragged-right, quote]
1381 \include "predefined-guitar-fretboards.ly"
1383 % Add a new chord shape
1385 \addChordShape #'powerf #guitar-tuning #"1-1;3-3;3-4;x;x;x;"
1387 % add some new chords based on the power chord shape
1389 \storePredefinedDiagram #default-fret-table
1392 #(chord-shape 'powerf guitar-tuning)
1393 \storePredefinedDiagram #default-fret-table
1396 #(offset-fret 2 (chord-shape 'powerf guitar-tuning))
1398 mychords = \chordmode{
1412 The graphical layout of a fret diagram can be customized according to
1413 user preference through the properties of the
1414 @code{fret-diagram-interface}. Details are found at
1415 @rinternals{fret-diagram-interface}. For a predefined fret diagram,
1416 the interface properties belong to @code{FretBoards.FretBoard}.
1420 @lilypondfile[verbatim,quote,texidoc,doctitle]
1421 {customizing-fretboard-fret-diagrams.ly}
1423 @lilypondfile[verbatim,quote,texidoc,doctitle]
1424 {defining-predefined-fretboards-for-other-instruments.ly}
1426 @lilypondfile[verbatim,quote,texidoc,doctitle,ragged-right]
1427 {chordchanges-for-fretboards.ly}
1429 @lilypondfile[verbatim,quote,texidoc,doctitle]
1430 {fretboards-alternate-tables.ly}
1434 @ref{Custom tablatures},
1435 @ref{Automatic fret diagrams},
1436 @ref{Chord mode overview},
1437 @ref{Predefined fretboard diagrams}.
1440 @file{ly/predefined-guitar-fretboards.ly}, @*
1441 @file{ly/predefined-guitar-ninth-fretboards.ly}, @*
1442 @file{ly/predefined-ukulele-fretboards.ly}, @*
1443 @file{ly/predefined-mandolin-fretboards.ly}.
1446 @rlsr{Fretted strings}.
1448 Internals Reference:
1449 @rinternals {fret-diagram-interface}.
1452 @node Automatic fret diagrams
1453 @unnumberedsubsubsec Automatic fret diagrams
1455 @cindex fret diagrams, automatic
1456 @cindex chord diagrams, automatic
1457 @cindex automatic fret diagrams
1458 @cindex automatic chord diagrams
1460 Fret diagrams can be automatically created from entered notes using the
1461 @code{FretBoards} context. If no predefined diagram is available for
1462 the entered notes in the active @code{stringTunings}, this context
1463 calculates strings and frets that can be used to play the notes.
1465 @lilypond[quote,ragged-right,verbatim]
1484 @funindex predefinedFretboardsOff
1485 @funindex \predefinedFretboardsOff
1486 @funindex predefinedFretboardsOn
1487 @funindex \predefinedFretboardsOn
1489 As no predefined diagrams are loaded by default, automatic calculation
1490 of fret diagrams is the default behavior. Once default diagrams are
1491 loaded, automatic calculation can be enabled and disabled with predefined
1494 @lilypond[quote,ragged-right,verbatim]
1496 \storePredefinedDiagram #default-fret-table
1499 #"x;3-1-(;5-2;5-3;5-4;3-1-1-);"
1508 \predefinedFretboardsOff
1510 \predefinedFretboardsOn
1524 Sometimes the fretboard calculator will be unable to find
1525 an acceptable diagram. This can often be remedied by
1526 manually assigning a note to a string. In many cases, only one
1527 note need be manually placed on a string; the rest of
1528 the notes will then be placed appropriately by the
1529 @code{FretBoards} context.
1531 @cindex fret diagrams, adding fingerings
1532 @cindex fingerings, adding to fret diagrams
1534 Fingerings can be added to FretBoard fret diagrams.
1536 @lilypond[quote, verbatim]
1544 <c-3 e-2 g c'-1 e'>1
1555 @funindex minimumFret
1557 The minimum fret to be used in calculating strings and frets for
1558 the FretBoard context can be set with the @code{minimumFret}
1561 @lilypond[quote, verbatim]
1570 \set FretBoards.minimumFret = #5
1581 The strings and frets for the @code{FretBoards} context depend
1582 on the @code{stringTunings} property, which has the same meaning
1583 as in the TabStaff context. See @ref{Custom tablatures} for
1584 information on the @code{stringTunings} property.
1586 The graphical layout of a fret diagram can be customized according to
1587 user preference through the properties of the
1588 @code{fret-diagram-interface}. Details are found at
1589 @rinternals{fret-diagram-interface}. For a @code{FretBoards} fret
1590 diagram, the interface properties belong to
1591 @code{FretBoards.FretBoard}.
1595 @code{\predefinedFretboardsOff},
1596 @code{\predefinedFretboardsOn}.
1601 @ref{Custom tablatures}.
1604 @rlsr{Fretted strings}.
1606 Internals Reference:
1607 @rinternals {fret-diagram-interface}.
1610 Automatic fretboard calculations do not work properly for instruments
1611 with non-monotonic tunings.
1614 @node Right-hand fingerings
1615 @unnumberedsubsubsec Right-hand fingerings
1617 @cindex fretted instruments, right hand fingerings
1618 @cindex fingerings, right hand for fretted instruments
1619 @cindex right hand fingerings for fretted instruments
1621 @funindex rightHandFinger
1622 @funindex \rightHandFinger
1624 Right-hand fingerings @var{p-i-m-a} must be entered using
1625 @code{\rightHandFinger} followed by a number.
1627 @warning{If the number is entered in Scheme notation, remember to append
1628 a space before following it with a closing @code{>} or similar.}
1630 @lilypond[quote,verbatim,relative=0]
1632 c4\rightHandFinger #1
1633 e\rightHandFinger #2
1634 g\rightHandFinger #3
1635 c\rightHandFinger #4
1636 <c,\rightHandFinger #1 e\rightHandFinger #2
1637 g\rightHandFinger #3 c\rightHandFinger #4 >1
1640 For convenience, you can abbreviate @code{\rightHandFinger} to something
1641 short, for example @code{RH},
1650 @lilypondfile[verbatim,quote,texidoc,doctitle]
1651 {placement-of-right-hand-fingerings.ly}
1653 @lilypondfile[verbatim,quote,texidoc,doctitle]
1654 {fingerings,-string-indications,-and-right-hand-fingerings.ly}
1658 @rlsr{Fretted strings}.
1660 Internals Reference:
1661 @rinternals{StrokeFinger}.
1667 Most of the notational issues associated with guitar music are
1668 covered sufficiently in the general fretted strings section, but there
1669 are a few more worth covering here. Occasionally users want to
1670 create songbook-type documents having only lyrics with chord
1671 indications above them. Since LilyPond is a music typesetter,
1672 it is not recommended for documents that have no music notation
1673 in them. A better alternative is a word processor, text editor,
1674 or, for experienced users, a typesetter like GuitarTeX.
1677 * Indicating position and barring::
1678 * Indicating harmonics and dampened notes::
1679 * Indicating power chords::
1682 @node Indicating position and barring
1683 @unnumberedsubsubsec Indicating position and barring
1685 @cindex indicating position and barring for fretted instruments
1686 @cindex fretted instruments, indicating position and barring
1688 This example demonstrates how to include guitar position and
1689 barring indications.
1691 @lilypond[quote,ragged-right,verbatim,relative=0]
1695 \override TextSpanner.bound-details.left.text = #"XII "
1697 b16 e g e b g\stopTextSpan
1703 @ref{Text spanners}.
1706 @rlsr{Fretted strings},
1707 @rlsr{Expressive marks}.
1710 @node Indicating harmonics and dampened notes
1711 @unnumberedsubsubsec Indicating harmonics and dampened notes
1713 @cindex fretted instruments, dampened notes
1714 @cindex fretted instruments, harmonics
1715 @cindex dampened notes on fretted instruments
1716 @cindex harmonics on fretted instruments
1718 Special note heads can be used to indicate dampened notes or
1719 harmonics. Harmonics are normally further explained with a
1722 @lilypond[quote,ragged-right,verbatim]
1725 \override Staff.NoteHead.style = #'harmonic-mixed
1726 d^\markup { \italic { \fontsize #-2 { "harm. 12" }}} <g b>1
1730 Dampened notes (also called @notation{dead notes}) are supported
1731 within normal and tablature staves:
1733 @lilypond[quote,ragged-right,verbatim]
1734 music = \relative c' {
1735 < a\3 \deadNote c\2 a'\1 >4
1736 < b\3 \deadNote d\2 b'\1 >
1737 < c\3 \deadNote e\2 c'\1 >
1739 \tuplet 3/2 { g8 b e }
1754 Another playing technique (especially used on electric guitars) is
1755 called @notation{palm mute}. The string is hereby partly muted by the
1756 palm of the striking hand (hence the name). Lilypond supports
1757 the notation of palm mute-style notes by changing the note head to a
1760 @lilypond[quote,ragged-right,verbatim]
1761 \new Voice { % Warning: explicit Voice instantiation is
1762 % required to have palmMuteOff work properly
1763 % when palmMuteOn comes at the beginning of
1768 e8^\markup { \musicglyph #"noteheads.u2do" = palm mute }
1771 e e \palmMute e e e |
1772 e8 \palmMute { e e e } e e e e |
1773 < \palmMute e b' e >8 \palmMute { e e e } < \palmMute e b' e >2
1780 @rlsr{Fretted strings}.
1783 @ref{Special note heads},
1784 @ref{Note head styles}.
1787 @node Indicating power chords
1788 @unnumberedsubsubsec Indicating power chords
1790 @funindex powerChords
1791 @funindex \powerChords
1793 @cindex power chords
1794 @cindex chords, power
1796 Power chords and their symbols can be engraved in chord mode or as chord
1799 @lilypond[quote,ragged-right,verbatim]
1800 ChordsAndSymbols = {
1805 \set minimumFret = #8
1809 \set minimumFret = #5
1829 Power chord symbols are automatically switched off as soon as one of the
1830 other common chord modifier is used:
1832 @lilypond[quote,ragged-right,verbatim]
1833 mixedChords = \chordmode {
1858 @rglos{power chord}.
1861 @ref{Extended and altered chords},
1862 @ref{Printing chord names}.
1865 @rlsr{Fretted strings}.
1872 * Banjo tablatures::
1875 @node Banjo tablatures
1876 @unnumberedsubsubsec Banjo tablatures
1878 @cindex banjo tablatures
1879 @cindex tablature, banjo
1881 LilyPond has basic support for the five-string banjo. When making tablatures
1882 for five-string banjo, use the banjo tablature format function to get
1883 correct fret numbers for the fifth string:
1885 @c due to crazy intervals of banjo music, absolute pitch is recommended
1887 @lilypond[quote,ragged-right,verbatim]
1889 g8 d' g'\5 a b g e d' |
1890 g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
1895 \new Staff \with { \omit StringNumber }
1896 { \clef "treble_8" \music }
1897 \new TabStaff \with {
1898 tablatureFormat = #fret-number-tablature-format-banjo
1899 stringTunings = #banjo-open-g-tuning
1905 @cindex banjo tunings
1906 @cindex tunings, banjo
1908 @funindex banjo-c-tuning
1909 @funindex banjo-modal-tuning
1910 @funindex banjo-open-d-tuning
1911 @funindex banjo-open-dm-tuning
1912 @funindex four-string-banjo
1914 A number of common tunings for the five-string banjo are predefined:
1915 @code{banjo-c-tuning} (gCGBD), @code{banjo-modal-tuning} (gDGCD),
1916 @code{banjo-open-d-tuning} (aDF#AD) and @code{banjo-open-dm-tuning}
1919 These may be converted to four-string tunings using the
1920 @code{four-string-banjo} function:
1923 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
1928 @file{ly/string-tunings-init.ly}.
1931 @rlsr{Fretted strings}.