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}
264 Chord constructs can be repeated by the chord repetition symbol
265 @code{q}. In combination with tabulatures, its behavior of removing
266 string and finger numbers alongside with other events is cumbersome, so
269 \chordRepeats #'(string-number-event fingering-event)
271 explicitly on music expressions in tabulature using @ref{Chord
272 repetition}. This particular command is so common that it is available
273 as @code{\tabChordRepeats}.
275 @lilypond[quote,verbatim]
276 guitar = \relative c' {
277 r8 <gis-2 cis-3 b-0>~ q4 q8~ q q4
286 \tabChordRepeats \guitar
291 Ties over a line break are parenthesized by default. The same holds for
292 the second alternative of a repeat.
294 @lilypond[quote,ragged-right,verbatim]
295 ties = \relative c' {
302 { g4\repeatTie c,2. }
329 @funindex \hideSplitTiedTabNotes
331 The command @code{\hideSplitTiedTabNotes} cancels the behavior of
332 engraving fret numbers in parentheses:
334 @lilypond[quote,ragged-right,verbatim]
335 ties = \relative c' {
341 { g4\repeatTie c,2. }
357 \hideSplitTiedTabNotes
369 @cindex harmonic indications in tablature notation
370 @cindex tablature and harmonic indications
372 @funindex \harmonicByFret
373 @funindex \harmonicByRatio
375 Harmonic indications can be added to tablature notation as sounding
378 @lilypond[verbatim,quote]
379 \layout { \omit Voice.StringNumber }
391 \new TabStaff { \firstHarmonic }
396 Note that the command @code{\harmonic} must always be attached to single
397 notes (possibly inside of a chord) instead of whole chords.
398 It only makes sense for open-string harmonics
399 in the 12th fret. All other harmonics should be calculated by LilyPond.
400 This can be achieved by indicating the fret where a finger of the
401 fretting hand should touch a string.
403 @lilypond[verbatim,quote]
405 \harmonicByFret #5 d16\4
406 \harmonicByFret #4 d16\4
407 \harmonicByFret #3 d8\4
408 \harmonicByFret #5 <g\3 b\2>2.
416 \new TabStaff { \fretHarmonics }
421 Alternatively, harmonics can be computed by defining the ratio of
422 string lengths above and below the harmonic fingering.
424 @lilypond[verbatim,quote]
426 \harmonicByRatio #1/2 <g\3 b\2 e'\1>4
427 \harmonicByRatio #1/3 <g\3 b\2 e'\1>4
428 \harmonicByRatio #1/4 { g8\3 b8\2 e'4\1 }
436 \new TabStaff { \ratioHarmonics }
442 @lilypondfile[verbatim,quote,texidoc,doctitle]
443 {stem-and-beam-behavior-in-tablature.ly}
445 @lilypondfile[verbatim,quote,texidoc,doctitle]
446 {polyphony-in-tablature.ly}
448 @lilypondfile[verbatim,quote,texidoc,doctitle]
449 {open-string-harmonics-in-tablature.ly}
451 @lilypondfile[verbatim,quote,texidoc,doctitle]
452 {fretted-string-harmonics-in-tablature.ly}
454 @cindex slides in tablature notation
455 @cindex tablature and slides
457 @lilypondfile[verbatim,quote,texidoc,doctitle]
458 {slides-in-tablature.ly}
460 @cindex chord glissandi
462 @lilypondfile[verbatim,quote,texidoc,doctitle]
463 {chord-glissando-in-tablature.ly}
468 @lilypondfile[verbatim,quote,texidoc,doctitle]
469 {hammer-on-and-pull-off.ly}
471 @lilypondfile[verbatim,quote,texidoc,doctitle]
472 {hammer-on-and-pull-off-using-voices.ly}
474 @lilypondfile[verbatim,quote,texidoc,doctitle]
475 {hammer-on-and-pull-off-using-chords.ly}
479 @ref{Chord repetition},
483 @ref{Written-out repeats}.
486 @rlsr{Fretted strings}.
489 @rinternals{TabNoteHead},
490 @rinternals{TabStaff},
491 @rinternals{TabVoice},
495 Chords are not handled in a special way, and hence the automatic
496 string selector may easily select the same string for two notes in
499 In order to handle @code{\partcombine}, a @code{TabStaff} must use
500 specially-created voices:
502 @lilypond[quote,ragged-right,verbatim]
503 melodia = \partcombine { e4 g g g } { e4 e e e }
506 \new TabVoice = "one" s1
507 \new TabVoice = "two" s1
508 \new TabVoice = "shared" s1
509 \new TabVoice = "solo" s1
515 Guitar special effects are limited to harmonics and slides.
518 @node Custom tablatures
519 @unnumberedsubsubsec Custom tablatures
521 @cindex tablatures, custom
522 @cindex tablature, banjo
523 @cindex tablature, mandolin
524 @cindex tablature, guitar
525 @cindex tablature, bass guitar
526 @cindex tablature, ukulele
527 @cindex tablature, predefined string tunings
528 @cindex fretted instruments, predefined string tunings
529 @cindex predefined string tunings for fretted instruments
530 @cindex tablature, violin
531 @cindex tablature, viola
532 @cindex tablature, cello
533 @cindex tablature, bass
534 @cindex tablature, double bass
536 @funindex stringTunings
538 LilyPond tablature automatically calculates the fret for
539 a note based on the string to which the note is assigned.
540 In order to do this, the tuning of the strings must be
541 specified. The tuning of the strings is given in the
542 @code{stringTunings} property.
544 LilyPond comes with predefined string tunings for banjo, mandolin,
545 guitar, bass guitar, ukulele, violin, viola, cello, and double bass.
546 LilyPond automatically sets
547 the correct transposition for predefined tunings. The following
548 example is for bass guitar, which sounds an octave lower than
551 @lilypond[quote,ragged-right,verbatim]
561 \new TabStaff \with {
562 stringTunings = #bass-tuning
571 The default string tuning is @code{guitar-tuning}, which
572 is the standard EADGBE tuning. Some other predefined tunings are
573 @code{guitar-open-g-tuning}, @code{mandolin-tuning} and
574 @code{banjo-open-g-tuning}. The predefined string tunings
575 are found in @file{ly/string-tunings-init.ly}.
577 @funindex stringTuning
578 @funindex \stringTuning
579 @cindex tablature, custom string tunings
580 @cindex custom string tunings
582 Any desired string tuning can be created. The
583 @code{\stringTuning} function can be
584 used to define a string tuning which can be used
585 to set @code{stringTunings} for the current context.
587 Its argument is a chord construct
588 defining the pitches of each string in the tuning.
589 The chord construct must be in absolute octave mode,
590 see @ref{Absolute octave entry}. The string
591 with the highest number (generally the lowest string) must
592 come first in the chord. For example, we can
593 define a string tuning for a four-string instrument with pitches
594 of @code{a''}, @code{d''}, @code{g'}, and @code{c'}:
596 @lilypond[quote,verbatim]
609 \set Staff.stringTunings = \stringTuning <c' g' d'' a''>
615 The @code{stringTunings} property is also used by
616 @code{FretBoards} to calculate automatic fret diagrams.
618 String tunings are used as part of the hash key
619 for predefined fret diagrams
620 (see @ref{Predefined fret diagrams}).
622 The previous example could also be written as follows:
624 @lilypond[quote,verbatim]
625 custom-tuning = \stringTuning <c' g' d'' a''>
638 \set TabStaff.stringTunings = #custom-tuning
644 Internally, a string tuning is a Scheme list of string pitches,
645 one for each string, ordered by string number from 1 to N,
646 where string 1 is at the top of the tablature staff and
647 string N is at the bottom. This ordinarily results in ordering
648 from highest pitch to lowest pitch, but some instruments
649 (e.g. ukulele) do not have strings ordered by pitch.
651 A string pitch in a string tuning list is a LilyPond pitch
652 object. Pitch objects are created with the Scheme function
653 @code{ly:make-pitch} (see @ref{Scheme functions}).
655 @code{\stringTuning} creates such an object from chord input.
657 LilyPond automatically calculates the number of lines in the
658 @code{TabStaff} and the number of strings in an automatically
659 calculated @code{FretBoard} as the number of elements
660 in @code{stringTunings}.
662 To let all TabStaff contexts use the same custom tuning by default,
669 stringTunings = \stringTuning <c' g' d'' a''>
675 @cindex moderntab clef
676 @cindex clef, moderntab
680 A modern tab clef can also be used.
682 @lilypond[quote,ragged-right,verbatim]
692 The modern tab clef supports tablatures from 4 to 7 strings.
696 @ref{Absolute octave entry},
697 @ref{Predefined fret diagrams},
698 @ref{Scheme functions}.
701 @file{ly/string-tunings-init.ly},
702 @file{scm/tablature.scm}.
705 @rlsr{Fretted strings}.
708 @rinternals{Tab_note_heads_engraver}.
711 Automatic tablature calculations do not work properly in most
712 cases for instruments where string pitches do not vary
713 monotonically with string number, such as ukuleles.
716 @node Fret diagram markups
717 @unnumberedsubsubsec Fret diagram markups
719 @cindex fret diagrams
720 @cindex chord diagrams
721 @cindex diagrams, fret
722 @cindex diagrams, chord for fretted instruments
723 @cindex fret diagrams, custom
724 @cindex custom fret diagrams
726 Fret diagrams can be added to music as a markup to the desired
727 note. The markup contains information about the desired fret
728 diagram. There are three different fret-diagram markup
729 interfaces: standard, terse, and verbose. The three interfaces
730 produce equivalent markups, but have varying amounts of
731 information in the markup string. Details about the
732 syntax of the different markup strings used to define
733 fret diagrams are found at @ref{Instrument Specific Markup}.
735 The standard fret diagram markup string indicates the string
736 number and the fret number for each dot to be placed on the string.
737 In addition, open and unplayed (muted) strings can be indicated.
739 @lilypond[quote, verbatim]
748 <c e g c' e'>1^\markup {
749 \fret-diagram #"6-x;5-3;4-2;3-o;2-1;1-o;"
751 <d a d' f'>1^\markup {
752 \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-1;"
758 @cindex barre indications
760 Barre indications can be added to the diagram from
761 the fret-diagram markup string.
763 @lilypond[quote, verbatim]
772 <f, c f a c' f'>1^\markup {
773 \fret-diagram #"c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
775 <g, d g b d' g'>1^\markup {
776 \fret-diagram #"c:6-1-3;6-3;5-5;4-5;3-4;2-3;1-3;"
782 @cindex fret-diagram markup
785 @funindex fret-diagram
786 @funindex \fret-diagram
788 The size of the fret diagram, and the number of frets in the diagram
789 can be changed in the fret-diagram markup string.
791 @lilypond[quote, verbatim]
800 <f, c f a c' f'>1^\markup {
801 \fret-diagram #"s:1.5;c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
803 <g, b, d g b g'>1^\markup {
804 \fret-diagram #"h:6;6-3;5-2;4-o;3-o;2-o;1-3;"
810 The number of strings in a fret diagram can be changed to accommodate
811 different instruments such as banjos and ukuleles with the fret-diagram
814 @lilypond[quote, verbatim]
822 % An 'A' chord for ukulele
824 \fret-diagram #"w:4;4-2-2;3-1-1;2-o;1-o;"
830 Fingering indications can be added, and the location of fingering labels
831 can be controlled by the fret-diagram markup string.
833 @lilypond[quote, verbatim]
842 <c e g c' e'>1^\markup {
843 \fret-diagram #"f:1;6-x;5-3-3;4-2-2;3-o;2-1-1;1-o;"
845 <d a d' f'>1^\markup {
846 \fret-diagram #"f:2;6-x;5-x;4-o;3-2-2;2-3-3;1-1-1;"
852 Dot radius and dot position can be controlled with the fret-diagram
855 @lilypond[quote, verbatim]
864 <c e g c' e'>1^\markup {
865 \fret-diagram #"d:0.35;6-x;5-3;4-2;3-o;2-1;1-o;"
867 <d a d' f'>1^\markup {
868 \fret-diagram #"p:0.2;6-x;5-x;4-o;3-2;2-3;1-1;"
874 @cindex fret-diagram-terse markup
876 @funindex fret-diagram-terse
877 @funindex \fret-diagram-terse
879 The fret-diagram-terse markup string omits string numbers; the string
880 number is implied by the presence of semicolons. There is one semicolon
881 for each string in the diagram. The first semicolon corresponds to the
882 highest string number and the last semicolon corresponds to the first string.
883 Mute strings, open strings, and fret numbers can be indicated.
885 @lilypond[quote, verbatim]
894 <c e g c' e'>1^\markup {
895 \fret-diagram-terse #"x;3;2;o;1;o;"
897 <d a d' f'>1^\markup {
898 \fret-diagram-terse #"x;x;o;2;3;1;"
904 Barre indicators can be included in the fret-diagram-terse markup string.
906 @lilypond[quote, verbatim]
915 <f, c f a c' f'>1^\markup {
916 \fret-diagram-terse #"1-(;3;3;2;1;1-);"
918 <g, d g b d' g'>1^\markup {
919 \fret-diagram-terse #"3-(;5;5;4;3;3-);"
925 Fingering indications can be included in the fret-diagram-terse markup string.
927 @c Need to use override to enable fingerings to show this -- can we do so?
928 @lilypond[quote, verbatim]
936 \override Voice.TextScript.fret-diagram-details.finger-code = #'below-string
938 <c e g c' e'>1^\markup {
939 \fret-diagram-terse #"x;3-3;2-2;o;1-1;o;"
941 <d a d' f'>1^\markup {
942 \fret-diagram-terse #"x;x;o;2-2;3-3;1-1;"
948 Other fret diagram properties must be adjusted using
949 @code{\override} when using the fret-diagram-terse markup.
951 @cindex fret-diagram-verbose markup
954 @funindex fret-diagram-verbose
955 @funindex \fret-diagram-verbose
957 The fret-diagram-verbose markup string is in the format of a Scheme list. Each
958 element of the list indicates an item to be placed on the fret diagram.
960 @lilypond[quote, verbatim]
969 <c e g c' e'>1^\markup {
970 \fret-diagram-verbose #'(
979 <d a d' f'>1^\markup {
980 \fret-diagram-verbose #'(
993 Fingering indications and barres can be included in a
994 fret-diagram-verbose markup string. Unique to the
995 fret-diagram-verbose interface is a capo indication that
996 can be placed on the fret diagram. The capo indication is
997 a thick bar that covers all strings. The fret with the
998 capo will be the lowest fret in the fret diagram.
1000 @c \override is necessary to make fingering visible
1001 @lilypond[quote, verbatim]
1010 \override Voice.TextScript.fret-diagram-details.finger-code = #'below-string
1011 <f, c f a c' f'>1^\markup {
1012 \fret-diagram-verbose #'(
1022 <g, b, d g b g'>1^\markup {
1023 \fret-diagram-verbose #'(
1032 <c g c' e' g'>1^\markup {
1033 \fret-diagram-verbose #'(
1045 All other fret diagram properties must be adjusted using
1046 @code{\override} when using the fret-diagram-verbose markup.
1049 The following example shows the three fret-diagram markup
1050 interfaces, along with examples of common tweaks. For example,
1051 the size of the verbose fret diagram is reduced to 0.75, and the
1052 finger indications are specified to appear below the diagram. The
1053 terse diagram includes tweaks to specify placement of finger code
1056 @lilypond[verbatim,ragged-right,quote]
1060 \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
1064 \override #'(size . 0.75) {
1065 \override #'(finger-code . below-string) {
1066 \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
1077 \override #'(dot-radius . 0.35) {
1078 \override #'(finger-code . in-dot) {
1079 \override #'(dot-color . white) {
1080 \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
1090 @cindex customized fret diagram
1091 @cindex fret diagram, customized
1092 @cindex diagram, fret, customized
1094 @funindex fret-diagram-interface
1096 The graphical layout of a fret diagram can be customized according to
1097 user preference through the properties of the
1098 @code{fret-diagram-interface}. Details are found at
1099 @rinternals{fret-diagram-interface}. For a fret diagram
1100 markup, the interface properties belong to @code{Voice.TextScript}.
1104 @lilypondfile[verbatim,quote,texidoc,doctitle]
1105 {changing-fret-orientations.ly}
1107 @lilypondfile[verbatim,quote,texidoc,doctitle]
1108 {customizing-markup-fret-diagrams.ly}
1112 @ref{Instrument Specific Markup}.
1115 @rlsr{Fretted strings}.
1117 Internals Reference:
1118 @rinternals{fret-diagram-interface}.
1121 @node Predefined fret diagrams
1122 @unnumberedsubsubsec Predefined fret diagrams
1124 @cindex fret diagrams
1125 @cindex fret diagrams, ukulele
1126 @cindex fret diagrams, mandolin
1127 @cindex chord diagrams
1129 @funindex FretBoards
1130 @funindex stringTunings
1132 Fret diagrams can be displayed using the @code{FretBoards} context. By
1133 default, the @code{FretBoards} context will display fret diagrams that
1134 are stored in a lookup table:
1136 @lilypond[verbatim, ragged-right, quote]
1137 \include "predefined-guitar-fretboards.ly"
1145 The default predefined fret diagrams are contained in the file
1146 @file{predefined-guitar-fretboards.ly}. Fret diagrams are
1147 stored based on the pitches of a chord and the value of
1148 @code{stringTunings} that is currently in use.
1149 @file{predefined-guitar-fretboards.ly} contains predefined
1150 fret diagrams only for @code{guitar-tuning}. Predefined fret
1151 diagrams can be added for other instruments or other tunings
1152 by following the examples found in
1153 @file{predefined-guitar-fretboards.ly}.
1155 Fret diagrams for the ukulele are contained in the file @*
1156 @file{predefined-ukulele-fretboards.ly}.
1158 @lilypond[verbatim, ragged-right, quote]
1159 \include "predefined-ukulele-fretboards.ly"
1161 myChords = \chordmode { a1 a:m a:aug }
1168 \set Staff.stringTunings = #ukulele-tuning
1173 Fret diagrams for the mandolin are contained in the file @*
1174 @file{predefined-mandolin-fretboards.ly}.
1176 @lilypond[verbatim, ragged-right, quote]
1177 \include "predefined-mandolin-fretboards.ly"
1179 myChords = \chordmode { c1 c:m7.5- c:aug }
1186 \set Staff.stringTunings = #mandolin-tuning
1191 Chord pitches can be entered
1192 either as simultaneous music or using chord mode (see
1193 @ref{Chord mode overview}).
1195 @lilypond[verbatim, ragged-right,quote]
1196 \include "predefined-guitar-fretboards.ly"
1203 @cindex chord names with fret diagrams
1204 @cindex fret diagrams with chord names
1206 @funindex ChordNames
1208 @funindex \chordmode
1210 It is common that both chord names and fret diagrams are displayed together.
1211 This is achieved by putting a @code{ChordNames} context in parallel with
1212 a @code{FretBoards} context and giving both contexts the same music.
1214 @lilypond[verbatim, ragged-right, quote]
1215 \include "predefined-guitar-fretboards.ly"
1216 mychords = \chordmode{
1230 @cindex transposing fret diagrams
1231 @cindex fret diagrams, transposing
1232 @cindex diagrams, fret, transposing
1234 Predefined fret diagrams are transposable, as long as a diagram for the
1235 transposed chord is stored in the fret diagram table.
1237 @lilypond[verbatim, ragged-right, quote]
1238 \include "predefined-guitar-fretboards.ly"
1239 mychords = \chordmode{
1245 \transpose c e { \mychords }
1258 The predefined fret diagram table for guitar contains eight chords (major, minor,
1259 augmented, diminished, dominant seventh, major seventh, minor seventh, dominant ninth)
1260 for each of 17 keys.
1261 The predefined fret diagram table for ukulele contains these chords
1262 plus an additional three chords (major sixth, suspended second, and
1264 A complete list of the predefined fret diagrams is
1265 shown in @ref{Predefined fretboard diagrams}. If there is no entry in
1266 the table for a chord, the FretBoards engraver will calculate a
1267 fret-diagram using the automatic fret diagram functionality described in
1268 @ref{Automatic fret diagrams}.
1270 @lilypond[verbatim, ragged-right, quote]
1271 \include "predefined-guitar-fretboards.ly"
1272 mychords = \chordmode{
1286 @cindex fret diagrams, adding custom
1287 @cindex custom fret diagrams, adding
1288 @cindex adding custom fret diagrams
1290 Fret diagrams can be added to the fret diagram table. To add a diagram,
1291 you must specify the hash table for the diagram, the chord for the
1292 diagram, the tuning to be used, and
1293 a definition for the diagram. Normally, the hash table will be
1294 @var{default-fret-table}. The diagram definition can be either a
1295 fret-diagram-terse definition string or a fret-diagram-verbose
1298 @lilypond[verbatim, ragged-right, quote]
1299 \include "predefined-guitar-fretboards.ly"
1301 \storePredefinedDiagram #default-fret-table
1302 \chordmode { c:maj9 }
1306 mychords = \chordmode {
1320 Different fret diagrams for the same chord name can be stored using different
1321 octaves of pitches. The different octave should be at least two octaves
1322 above or below the default octave, because the octaves above and below the
1323 default octave are used for transposing fretboards.
1325 @lilypond[verbatim, ragged-right, quote]
1326 \include "predefined-guitar-fretboards.ly"
1328 \storePredefinedDiagram #default-fret-table
1331 #(offset-fret 2 (chord-shape 'bes guitar-tuning))
1333 mychords = \chordmode {
1347 @cindex fretted instruments, chord shapes
1348 @cindex chord shapes for fretted instruments
1350 @funindex \addChordShape
1351 @funindex addChordShape
1352 @funindex storePredefinedDiagram
1353 @funindex \storePredefinedDiagram
1355 In addition to fret diagrams, LilyPond stores an internal list of chord
1356 shapes. The chord shapes are fret diagrams that can be shifted along
1357 the neck to different positions to provide different chords. Chord
1358 shapes can be added to the internal list and then used to define
1359 predefined fret diagrams. Because they can be moved to various
1360 positions on the neck, chord shapes will normally not contain
1361 any open strings. Like fret diagrams, chord shapes can be
1362 entered as either fret-diagram-terse strings or fret-diagram-verbose
1365 @lilypond[verbatim, ragged-right, quote]
1366 \include "predefined-guitar-fretboards.ly"
1368 % Add a new chord shape
1370 \addChordShape #'powerf #guitar-tuning #"1-1;3-3;3-4;x;x;x;"
1372 % add some new chords based on the power chord shape
1374 \storePredefinedDiagram #default-fret-table
1377 #(chord-shape 'powerf guitar-tuning)
1378 \storePredefinedDiagram #default-fret-table
1381 #(offset-fret 2 (chord-shape 'powerf guitar-tuning))
1383 mychords = \chordmode{
1397 The graphical layout of a fret diagram can be customized according to
1398 user preference through the properties of the
1399 @code{fret-diagram-interface}. Details are found at
1400 @rinternals{fret-diagram-interface}. For a predefined fret diagram,
1401 the interface properties belong to @code{FretBoards.FretBoard}.
1405 @lilypondfile[verbatim,quote,texidoc,doctitle]
1406 {customizing-fretboard-fret-diagrams.ly}
1408 @lilypondfile[verbatim,quote,texidoc,doctitle]
1409 {defining-predefined-fretboards-for-other-instruments.ly}
1411 @lilypondfile[verbatim,quote,texidoc,doctitle,ragged-right]
1412 {chordchanges-for-fretboards.ly}
1414 @lilypondfile[verbatim,quote,texidoc,doctitle]
1415 {fretboards-alternate-tables.ly}
1419 @ref{Custom tablatures},
1420 @ref{Automatic fret diagrams},
1421 @ref{Chord mode overview},
1422 @ref{Predefined fretboard diagrams}.
1425 @file{ly/predefined-guitar-fretboards.ly}, @*
1426 @file{ly/predefined-guitar-ninth-fretboards.ly}, @*
1427 @file{ly/predefined-ukulele-fretboards.ly}, @*
1428 @file{ly/predefined-mandolin-fretboards.ly}.
1431 @rlsr{Fretted strings}.
1433 Internals Reference:
1434 @rinternals {fret-diagram-interface}.
1437 @node Automatic fret diagrams
1438 @unnumberedsubsubsec Automatic fret diagrams
1440 @cindex fret diagrams, automatic
1441 @cindex chord diagrams, automatic
1442 @cindex automatic fret diagrams
1443 @cindex automatic chord diagrams
1445 Fret diagrams can be automatically created from entered notes using the
1446 @code{FretBoards} context. If no predefined diagram is available for
1447 the entered notes in the active @code{stringTunings}, this context
1448 calculates strings and frets that can be used to play the notes.
1450 @lilypond[quote,ragged-right,verbatim]
1469 @funindex predefinedFretboardsOff
1470 @funindex \predefinedFretboardsOff
1471 @funindex predefinedFretboardsOn
1472 @funindex \predefinedFretboardsOn
1474 As no predefined diagrams are loaded by default, automatic calculation
1475 of fret diagrams is the default behavior. Once default diagrams are
1476 loaded, automatic calculation can be enabled and disabled with predefined
1479 @lilypond[quote,ragged-right,verbatim]
1481 \storePredefinedDiagram #default-fret-table
1484 #"x;3-1-(;5-2;5-3;5-4;3-1-1-);"
1493 \predefinedFretboardsOff
1495 \predefinedFretboardsOn
1509 Sometimes the fretboard calculator will be unable to find
1510 an acceptable diagram. This can often be remedied by
1511 manually assigning a note to a string. In many cases, only one
1512 note need be manually placed on a string; the rest of
1513 the notes will then be placed appropriately by the
1514 @code{FretBoards} context.
1516 @cindex fret diagrams, adding fingerings
1517 @cindex fingerings, adding to fret diagrams
1519 Fingerings can be added to FretBoard fret diagrams.
1521 @lilypond[quote, verbatim]
1529 <c-3 e-2 g c'-1 e'>1
1540 @funindex minimumFret
1542 The minimum fret to be used in calculating strings and frets for
1543 the FretBoard context can be set with the @code{minimumFret}
1546 @lilypond[quote, verbatim]
1555 \set FretBoards.minimumFret = #5
1566 The strings and frets for the @code{FretBoards} context depend
1567 on the @code{stringTunings} property, which has the same meaning
1568 as in the TabStaff context. See @ref{Custom tablatures} for
1569 information on the @code{stringTunings} property.
1571 The graphical layout of a fret diagram can be customized according to
1572 user preference through the properties of the
1573 @code{fret-diagram-interface}. Details are found at
1574 @rinternals{fret-diagram-interface}. For a @code{FretBoards} fret
1575 diagram, the interface properties belong to
1576 @code{FretBoards.FretBoard}.
1580 @code{\predefinedFretboardsOff},
1581 @code{\predefinedFretboardsOn}.
1586 @ref{Custom tablatures}.
1589 @rlsr{Fretted strings}.
1591 Internals Reference:
1592 @rinternals {fret-diagram-interface}.
1595 Automatic fretboard calculations do not work properly for instruments
1596 with non-monotonic tunings.
1599 @node Right-hand fingerings
1600 @unnumberedsubsubsec Right-hand fingerings
1602 @cindex fretted instruments, right hand fingerings
1603 @cindex fingerings, right hand for fretted instruments
1604 @cindex right hand fingerings for fretted instruments
1606 @funindex rightHandFinger
1607 @funindex \rightHandFinger
1609 Right-hand fingerings @var{p-i-m-a} must be entered using
1610 @code{\rightHandFinger} followed by a number.
1612 @warning{If the number is entered in Scheme notation, remember to append
1613 a space before following it with a closing @code{>} or similar.}
1615 @lilypond[quote,verbatim,relative=0]
1617 c4\rightHandFinger #1
1618 e\rightHandFinger #2
1619 g\rightHandFinger #3
1620 c\rightHandFinger #4
1621 <c,\rightHandFinger #1 e\rightHandFinger #2
1622 g\rightHandFinger #3 c\rightHandFinger #4 >1
1625 For convenience, you can abbreviate @code{\rightHandFinger} to something
1626 short, for example @code{RH},
1635 @lilypondfile[verbatim,quote,texidoc,doctitle]
1636 {placement-of-right-hand-fingerings.ly}
1638 @lilypondfile[verbatim,quote,texidoc,doctitle]
1639 {fingerings,-string-indications,-and-right-hand-fingerings.ly}
1643 @rlsr{Fretted strings}.
1645 Internals Reference:
1646 @rinternals{StrokeFinger}.
1652 Most of the notational issues associated with guitar music are
1653 covered sufficiently in the general fretted strings section, but there
1654 are a few more worth covering here. Occasionally users want to
1655 create songbook-type documents having only lyrics with chord
1656 indications above them. Since LilyPond is a music typesetter,
1657 it is not recommended for documents that have no music notation
1658 in them. A better alternative is a word processor, text editor,
1659 or, for experienced users, a typesetter like GuitarTeX.
1662 * Indicating position and barring::
1663 * Indicating harmonics and dampened notes::
1664 * Indicating power chords::
1667 @node Indicating position and barring
1668 @unnumberedsubsubsec Indicating position and barring
1670 @cindex indicating position and barring for fretted instruments
1671 @cindex fretted instruments, indicating position and barring
1673 This example demonstrates how to include guitar position and
1674 barring indications.
1676 @lilypond[quote,ragged-right,verbatim,relative=0]
1680 \override TextSpanner.bound-details.left.text = #"XII "
1682 b16 e g e b g\stopTextSpan
1688 @ref{Text spanners}.
1691 @rlsr{Fretted strings},
1692 @rlsr{Expressive marks}.
1695 @node Indicating harmonics and dampened notes
1696 @unnumberedsubsubsec Indicating harmonics and dampened notes
1698 @cindex fretted instruments, dampened notes
1699 @cindex fretted instruments, harmonics
1700 @cindex dampened notes on fretted instruments
1701 @cindex harmonics on fretted instruments
1703 Special note heads can be used to indicate dampened notes or
1704 harmonics. Harmonics are normally further explained with a
1707 @lilypond[quote,ragged-right,verbatim]
1710 \override Staff.NoteHead.style = #'harmonic-mixed
1711 d^\markup { \italic { \fontsize #-2 { "harm. 12" }}} <g b>1
1715 Dampened notes (also called @notation{dead notes}) are supported
1716 within normal and tablature staves:
1718 @lilypond[quote,ragged-right,verbatim]
1719 music = \relative c' {
1720 < a\3 \deadNote c\2 a'\1 >4
1721 < b\3 \deadNote d\2 b'\1 >
1722 < c\3 \deadNote e\2 c'\1 >
1724 \tuplet 3/2 { g8 b e }
1739 Another playing technique (especially used on electric guitars) is
1740 called @notation{palm mute}. The string is hereby partly muted by the
1741 palm of the striking hand (hence the name). Lilypond supports
1742 the notation of palm mute-style notes by changing the note head to a
1745 @lilypond[quote,ragged-right,verbatim]
1746 \new Voice { % Warning: explicit Voice instantiation is
1747 % required to have palmMuteOff work properly
1748 % when palmMuteOn comes at the beginning of
1753 e8^\markup { \musicglyph #"noteheads.u2do" = palm mute }
1756 e e \palmMute e e e |
1757 e8 \palmMute { e e e } e e e e |
1758 < \palmMute e b' e >8 \palmMute { e e e } < \palmMute e b' e >2
1765 @rlsr{Fretted strings}.
1768 @ref{Special note heads},
1769 @ref{Note head styles}.
1772 @node Indicating power chords
1773 @unnumberedsubsubsec Indicating power chords
1775 @funindex powerChords
1776 @funindex \powerChords
1778 @cindex power chords
1779 @cindex chords, power
1781 Power chords and their symbols can be engraved in chord mode or as chord
1784 @lilypond[quote,ragged-right,verbatim]
1785 ChordsAndSymbols = {
1790 \set minimumFret = #8
1794 \set minimumFret = #5
1814 Power chord symbols are automatically switched off as soon as one of the
1815 other common chord modifier is used:
1817 @lilypond[quote,ragged-right,verbatim]
1818 mixedChords = \chordmode {
1843 @rglos{power chord}.
1846 @ref{Extended and altered chords},
1847 @ref{Printing chord names}.
1850 @rlsr{Fretted strings}.
1857 * Banjo tablatures::
1860 @node Banjo tablatures
1861 @unnumberedsubsubsec Banjo tablatures
1863 @cindex banjo tablatures
1864 @cindex tablature, banjo
1866 LilyPond has basic support for the five-string banjo. When making tablatures
1867 for five-string banjo, use the banjo tablature format function to get
1868 correct fret numbers for the fifth string:
1870 @c due to crazy intervals of banjo music, absolute pitch is recommended
1872 @lilypond[quote,ragged-right,verbatim]
1874 g8 d' g'\5 a b g e d' |
1875 g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
1880 \new Staff \with { \omit StringNumber }
1881 { \clef "treble_8" \music }
1882 \new TabStaff \with {
1883 tablatureFormat = #fret-number-tablature-format-banjo
1884 stringTunings = #banjo-open-g-tuning
1890 @cindex banjo tunings
1891 @cindex tunings, banjo
1893 @funindex banjo-c-tuning
1894 @funindex banjo-modal-tuning
1895 @funindex banjo-open-d-tuning
1896 @funindex banjo-open-dm-tuning
1897 @funindex four-string-banjo
1899 A number of common tunings for the five-string banjo are predefined:
1900 @code{banjo-c-tuning} (gCGBD), @code{banjo-modal-tuning} (gDGCD),
1901 @code{banjo-open-d-tuning} (aDF#AD) and @code{banjo-open-dm-tuning}
1904 These may be converted to four-string tunings using the
1905 @code{four-string-banjo} function:
1908 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
1913 @file{ly/string-tunings-init.ly}.
1916 @rlsr{Fretted strings}.