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,fragment]
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,fragment]
122 String numbers may also, as is customary with unfretted strings,
123 be printed in Roman numerals and placed below the staff rather
126 @lilypond[verbatim,quote,fragment]
132 \set stringNumberOrientations = #'(down)
140 @lilypondfile[verbatim,quote,texidoc,doctitle]
141 {controlling-the-placement-of-chord-fingerings.ly}
143 @lilypondfile[verbatim,quote,texidoc,doctitle]
144 {allowing-fingerings-to-be-printed-inside-the-staff.ly}
147 @code{\arabicStringNumbers},
148 @code{\romanStringNumbers}.
153 @ref{Fingering instructions}.
156 @rlsr{Fretted strings}.
159 @rinternals{StringNumber},
160 @rinternals{Fingering}.
163 @node Default tablatures
164 @unnumberedsubsubsec Default tablatures
166 @cindex tablatures, basic
167 @cindex tablatures, default
172 Music for plucked string instruments is frequently notated using a
173 finger/touch notation or tablature. In contrast to traditional
174 notation pitches are not denoted with note heads, but by numbers (or
175 letter-like symbols in historical intavolatura). The staff lines
176 in tablature indicate the string on which the note is to be played,
177 and a number placed on a staff line indicated the fret at which
178 the corresponding string is to be pressed.
179 Notes that are to be played simultaneously are vertically aligned.
181 By default, string 1 is the highest string, and corresponds to the top
182 line on the @code{TabStaff}. The tuning of the @code{TabStaff}
183 strings defaults to the
184 standard guitar tuning (with 6 strings). The notes are printed as
185 tablature, by using @code{TabStaff} and @code{TabVoice} contexts. A
186 calligraphic tablature clef is added automatically.
188 @lilypond[quote,ragged-right,verbatim]
189 \new TabStaff \relative {
195 Default tablatures do not contain any symbols for tone duration nor any
196 other musical symbols such as e.g. expressive marks.
198 @lilypond[quote,ragged-right,verbatim]
210 \new Staff { \clef "G_8" \symbols }
211 \new TabStaff { \symbols }
216 @funindex \tabFullNotation
218 If all musical symbols used in traditional notation should also show up
219 in tablature one has to apply the command @code{\tabFullNotation} in a
220 @code{TabStaff}-context. Please bear in mind that half notes are
221 double-stemmed in tablature in order to distinguish them from quarter
224 @lilypond[quote,ragged-right,verbatim]
244 @funindex minimumFret
245 @funindex restrainOpenStrings
247 By default pitches are assigned to the lowest playing position on the
248 fret-board (first position). Open strings are automatically preferred.
249 If you would like a certain pitch to be played on a specific string you
250 can add a string number indication to the pitch name. If you don't want
251 to have string number indications appear in traditional notation, you
252 can override the respective stencil. Usually it will be more
253 comfortable to define the playing position by using the value of
254 @code{minimumFret}. The default value for minimumFret is 0.
256 Even when @code{minimumFret} is set, open strings are used whenever
257 possible. This behaviour can be changed by setting @code{restrainOpenStrings}
260 @lilypond[quote,ragged-right,verbatim]
261 \layout { \omit Voice.StringNumber }
263 \new Staff \relative {
267 c,16\5 d\5 e\4 f\4 g4\4
270 \new TabStaff \relative {
272 c,16\5 d\5 e\4 f\4 g4\4
273 \set TabStaff.minimumFret = #5
274 \set TabStaff.restrainOpenStrings = ##t
280 @funindex \tabChordRepeats
281 @funindex \chordRepeats
282 @cindex chord, repetition
283 @cindex repetition, using @code{q}
284 @cindex @code{q}, chord repetition
286 Chord constructs can be repeated by the chord repetition symbol
287 @code{q}. In combination with tabulatures, its behavior of removing
288 string and finger numbers alongside with other events is cumbersome, so
291 \chordRepeats #'(string-number-event fingering-event)
293 explicitly on music expressions in tabulature using @ref{Chord
294 repetition}. This particular command is so common that it is available
295 as @code{\tabChordRepeats}.
297 @lilypond[quote,verbatim]
299 r8 <gis-2 cis-3 b-0>~ q4 q8~ 8 q4
308 \tabChordRepeats \guitar
313 Ties over a line break are parenthesized by default. The same holds for
314 the second alternative of a repeat.
316 @lilypond[quote,ragged-right,verbatim]
324 { g4\repeatTie c,2. }
351 @funindex \hideSplitTiedTabNotes
353 The command @code{\hideSplitTiedTabNotes} cancels the behavior of
354 engraving fret numbers in parentheses:
356 @lilypond[quote,ragged-right,verbatim]
363 { g4\repeatTie c,2. }
379 \hideSplitTiedTabNotes
391 @cindex harmonic indications in tablature notation
392 @cindex tablature and harmonic indications
394 @funindex \harmonicByFret
395 @funindex \harmonicByRatio
397 Harmonic indications can be added to tablature notation as sounding
400 @lilypond[verbatim,quote]
401 \layout { \omit Voice.StringNumber }
413 \new TabStaff { \firstHarmonic }
418 Note that the command @code{\harmonic} must always be attached to single
419 notes (possibly inside of a chord) instead of whole chords.
420 It only makes sense for open-string harmonics
421 in the 12th fret. All other harmonics should be calculated by LilyPond.
422 This can be achieved by indicating the fret where a finger of the
423 fretting hand should touch a string.
425 @lilypond[verbatim,quote]
427 \harmonicByFret #5 d16\4
428 \harmonicByFret #4 d16\4
429 \harmonicByFret #3 d8\4
430 \harmonicByFret #5 <g\3 b\2>2.
438 \new TabStaff { \fretHarmonics }
443 Alternatively, harmonics can be computed by defining the ratio of
444 string lengths above and below the harmonic fingering.
446 @lilypond[verbatim,quote]
448 \harmonicByRatio #1/2 <g\3 b\2 e'\1>4
449 \harmonicByRatio #1/3 <g\3 b\2 e'\1>4
450 \harmonicByRatio #1/4 { g8\3 b8\2 e'4\1 }
458 \new TabStaff { \ratioHarmonics }
464 @lilypondfile[verbatim,quote,texidoc,doctitle]
465 {stem-and-beam-behavior-in-tablature.ly}
467 @lilypondfile[verbatim,quote,texidoc,doctitle]
468 {polyphony-in-tablature.ly}
470 @lilypondfile[verbatim,quote,texidoc,doctitle]
471 {open-string-harmonics-in-tablature.ly}
473 @lilypondfile[verbatim,quote,texidoc,doctitle]
474 {fretted-string-harmonics-in-tablature.ly}
476 @cindex slides in tablature notation
477 @cindex tablature and slides
479 @lilypondfile[verbatim,quote,texidoc,doctitle]
480 {slides-in-tablature.ly}
482 @cindex chord glissandi
484 @lilypondfile[verbatim,quote,texidoc,doctitle]
485 {chord-glissando-in-tablature.ly}
490 @lilypondfile[verbatim,quote,texidoc,doctitle]
491 {hammer-on-and-pull-off.ly}
493 @lilypondfile[verbatim,quote,texidoc,doctitle]
494 {hammer-on-and-pull-off-using-voices.ly}
496 @lilypondfile[verbatim,quote,texidoc,doctitle]
497 {hammer-on-and-pull-off-using-chords.ly}
501 @ref{Chord repetition},
505 @ref{Written-out repeats}.
508 @rlsr{Fretted strings}.
511 @rinternals{TabNoteHead},
512 @rinternals{TabStaff},
513 @rinternals{TabVoice},
517 Chords are not handled in a special way, and hence the automatic
518 string selector may easily select the same string for two notes in
521 In order to handle @code{\partcombine}, a @code{TabStaff} must use
522 specially-created voices:
524 @lilypond[quote,ragged-right,verbatim]
525 melodia = \partcombine { e4 g g g } { e4 e e e }
528 \new TabVoice = "one" s1
529 \new TabVoice = "two" s1
530 \new TabVoice = "shared" s1
531 \new TabVoice = "solo" s1
537 Guitar special effects are limited to harmonics and slides.
540 @node Custom tablatures
541 @unnumberedsubsubsec Custom tablatures
543 @cindex tablatures, custom
544 @cindex tablature, banjo
545 @cindex tablature, mandolin
546 @cindex tablature, guitar
547 @cindex tablature, bass guitar
548 @cindex tablature, ukulele
549 @cindex tablature, predefined string tunings
550 @cindex fretted instruments, predefined string tunings
551 @cindex predefined string tunings for fretted instruments
552 @cindex tablature, violin
553 @cindex tablature, viola
554 @cindex tablature, cello
555 @cindex tablature, bass
556 @cindex tablature, double bass
558 @funindex stringTunings
560 LilyPond tablature automatically calculates the fret for
561 a note based on the string to which the note is assigned.
562 In order to do this, the tuning of the strings must be
563 specified. The tuning of the strings is given in the
564 @code{stringTunings} property.
566 LilyPond comes with predefined string tunings for banjo, mandolin,
567 guitar, bass guitar, ukulele, violin, viola, cello, and double bass.
568 LilyPond automatically sets
569 the correct transposition for predefined tunings. The following
570 example is for bass guitar, which sounds an octave lower than
573 @lilypond[quote,ragged-right,verbatim]
583 \new TabStaff \with {
584 stringTunings = #bass-tuning
593 The default string tuning is @code{guitar-tuning}, which
594 is the standard EADGBE tuning. Some other predefined tunings are
595 @code{guitar-open-g-tuning}, @code{mandolin-tuning} and
596 @code{banjo-open-g-tuning}. The predefined string tunings
597 are found in @file{ly/string-tunings-init.ly}.
599 @funindex stringTuning
600 @funindex \stringTuning
601 @cindex tablature, custom string tunings
602 @cindex custom string tunings
604 Any desired string tuning can be created. The
605 @code{\stringTuning} function can be
606 used to define a string tuning which can be used
607 to set @code{stringTunings} for the current context.
609 Its argument is a chord construct
610 defining the pitches of each string in the tuning.
611 The chord construct must be in absolute octave mode,
612 see @ref{Absolute octave entry}. The string
613 with the highest number (generally the lowest string) must
614 come first in the chord. For example, we can
615 define a string tuning for a four-string instrument with pitches
616 of @code{a''}, @code{d''}, @code{g'}, and @code{c'}:
618 @lilypond[quote,verbatim]
631 \set Staff.stringTunings = \stringTuning <c' g' d'' a''>
637 The @code{stringTunings} property is also used by
638 @code{FretBoards} to calculate automatic fret diagrams.
640 String tunings are used as part of the hash key
641 for predefined fret diagrams
642 (see @ref{Predefined fret diagrams}).
644 The previous example could also be written as follows:
646 @lilypond[quote,verbatim]
647 custom-tuning = \stringTuning <c' g' d'' a''>
660 \set TabStaff.stringTunings = #custom-tuning
666 Internally, a string tuning is a Scheme list of string pitches,
667 one for each string, ordered by string number from 1 to N,
668 where string 1 is at the top of the tablature staff and
669 string N is at the bottom. This ordinarily results in ordering
670 from highest pitch to lowest pitch, but some instruments
671 (e.g. ukulele) do not have strings ordered by pitch.
673 A string pitch in a string tuning list is a LilyPond pitch
674 object. Pitch objects are created with the Scheme function
675 @code{ly:make-pitch} (see @ref{Scheme functions}).
677 @code{\stringTuning} creates such an object from chord input.
679 LilyPond automatically calculates the number of lines in the
680 @code{TabStaff} and the number of strings in an automatically
681 calculated @code{FretBoard} as the number of elements
682 in @code{stringTunings}.
684 To let all TabStaff contexts use the same custom tuning by default,
691 stringTunings = \stringTuning <c' g' d'' a''>
697 @cindex moderntab clef
698 @cindex clef, moderntab
702 A modern tab clef can also be used.
704 @lilypond[quote,ragged-right,verbatim]
714 The modern tab clef supports tablatures from 4 to 7 strings.
718 @ref{Absolute octave entry},
719 @ref{Predefined fret diagrams},
720 @ref{Scheme functions}.
723 @file{ly/string-tunings-init.ly},
724 @file{scm/tablature.scm}.
727 @rlsr{Fretted strings}.
730 @rinternals{Tab_note_heads_engraver}.
733 Automatic tablature calculations do not work properly in most
734 cases for instruments where string pitches do not vary
735 monotonically with string number, such as ukuleles.
738 @node Fret diagram markups
739 @unnumberedsubsubsec Fret diagram markups
741 @cindex fret diagrams
742 @cindex chord diagrams
743 @cindex diagrams, fret
744 @cindex diagrams, chord for fretted instruments
745 @cindex fret diagrams, custom
746 @cindex custom fret diagrams
748 Fret diagrams can be added to music as a markup to the desired
749 note. The markup contains information about the desired fret
750 diagram. There are three different fret-diagram markup
751 interfaces: standard, terse, and verbose. The three interfaces
752 produce equivalent markups, but have varying amounts of
753 information in the markup string. Details about the
754 syntax of the different markup strings used to define
755 fret diagrams are found at @ref{Instrument Specific Markup}.
757 The standard fret diagram markup string indicates the string
758 number and the fret number for each dot to be placed on the string.
759 In addition, open and unplayed (muted) strings can be indicated.
761 @lilypond[quote, verbatim]
770 <c e g c' e'>1^\markup {
771 \fret-diagram #"6-x;5-3;4-2;3-o;2-1;1-o;"
773 <d a d' f'>1^\markup {
774 \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-1;"
780 @cindex barre indications
782 Barre indications can be added to the diagram from
783 the fret-diagram markup string.
785 @lilypond[quote, verbatim]
794 <f, c f a c' f'>1^\markup {
795 \fret-diagram #"c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
797 <g, d g b d' g'>1^\markup {
798 \fret-diagram #"c:6-1-3;6-3;5-5;4-5;3-4;2-3;1-3;"
804 @cindex fret-diagram markup
807 @funindex fret-diagram
808 @funindex \fret-diagram
810 The size of the fret diagram, and the number of frets in the diagram
811 can be changed in the fret-diagram markup string.
813 @lilypond[quote, verbatim]
822 <f, c f a c' f'>1^\markup {
823 \fret-diagram #"s:1.5;c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
825 <g, b, d g b g'>1^\markup {
826 \fret-diagram #"h:6;6-3;5-2;4-o;3-o;2-o;1-3;"
832 The number of strings in a fret diagram can be changed to accommodate
833 different instruments such as banjos and ukuleles with the fret-diagram
836 @lilypond[quote, verbatim]
844 % An 'A' chord for ukulele
846 \fret-diagram #"w:4;4-2-2;3-1-1;2-o;1-o;"
852 Fingering indications can be added, and the location of fingering labels
853 can be controlled by the fret-diagram markup string.
855 @lilypond[quote, verbatim]
864 <c e g c' e'>1^\markup {
865 \fret-diagram #"f:1;6-x;5-3-3;4-2-2;3-o;2-1-1;1-o;"
867 <d a d' f'>1^\markup {
868 \fret-diagram #"f:2;6-x;5-x;4-o;3-2-2;2-3-3;1-1-1;"
874 Dot radius and dot position can be controlled with the fret-diagram
877 @lilypond[quote, verbatim]
886 <c e g c' e'>1^\markup {
887 \fret-diagram #"d:0.35;6-x;5-3;4-2;3-o;2-1;1-o;"
889 <d a d' f'>1^\markup {
890 \fret-diagram #"p:0.2;6-x;5-x;4-o;3-2;2-3;1-1;"
896 @cindex fret-diagram-terse markup
898 @funindex fret-diagram-terse
899 @funindex \fret-diagram-terse
901 The fret-diagram-terse markup string omits string numbers; the string
902 number is implied by the presence of semicolons. There is one semicolon
903 for each string in the diagram. The first semicolon corresponds to the
904 highest string number and the last semicolon corresponds to the first string.
905 Mute strings, open strings, and fret numbers can be indicated.
907 @lilypond[quote, verbatim]
916 <c e g c' e'>1^\markup {
917 \fret-diagram-terse #"x;3;2;o;1;o;"
919 <d a d' f'>1^\markup {
920 \fret-diagram-terse #"x;x;o;2;3;1;"
926 Barre indicators can be included in the fret-diagram-terse markup string.
928 @lilypond[quote, verbatim]
937 <f, c f a c' f'>1^\markup {
938 \fret-diagram-terse #"1-(;3;3;2;1;1-);"
940 <g, d g b d' g'>1^\markup {
941 \fret-diagram-terse #"3-(;5;5;4;3;3-);"
947 Fingering indications can be included in the fret-diagram-terse markup string.
949 @c Need to use override to enable fingerings to show this -- can we do so?
950 @lilypond[quote, verbatim]
958 \override Voice.TextScript.fret-diagram-details.finger-code = #'below-string
960 <c e g c' e'>1^\markup {
961 \fret-diagram-terse #"x;3-3;2-2;o;1-1;o;"
963 <d a d' f'>1^\markup {
964 \fret-diagram-terse #"x;x;o;2-2;3-3;1-1;"
970 Other fret diagram properties must be adjusted using
971 @code{\override} when using the fret-diagram-terse markup.
973 @cindex fret-diagram-verbose markup
976 @funindex fret-diagram-verbose
977 @funindex \fret-diagram-verbose
979 The fret-diagram-verbose markup string is in the format of a Scheme list. Each
980 element of the list indicates an item to be placed on the fret diagram.
982 @lilypond[quote, verbatim]
991 <c e g c' e'>1^\markup {
992 \fret-diagram-verbose #'(
1001 <d a d' f'>1^\markup {
1002 \fret-diagram-verbose #'(
1015 Fingering indications and barres can be included in a
1016 fret-diagram-verbose markup string. Unique to the
1017 fret-diagram-verbose interface is a capo indication that
1018 can be placed on the fret diagram. The capo indication is
1019 a thick bar that covers all strings. The fret with the
1020 capo will be the lowest fret in the fret diagram.
1022 Fingering indication dots can be colored as well as parenthesized;
1023 the parenthesis's color can also be altered independently.
1025 Markups can be placed into the dots as well.
1027 @c \override is necessary to make fingering visible
1028 @lilypond[quote, verbatim]
1037 \override Voice.TextScript.fret-diagram-details.finger-code = #'below-string
1038 <f, c f a c' f'>1^\markup {
1039 \fret-diagram-verbose #'(
1049 <g, b, d g b g'>1^\markup {
1050 \fret-diagram-verbose #'(
1059 <c g c' e' g'>1^\markup {
1060 \fret-diagram-verbose #'(
1068 \override Voice.TextScript.size = 1.4
1069 <c g c' e' g'>1^\markup {
1070 \fret-diagram-verbose #'(
1071 (place-fret 6 3 1 red parenthesized default-paren-color)
1072 (place-fret 5 3 1 inverted)
1073 (place-fret 4 5 2 blue parenthesized)
1074 (place-fret 3 5 3 blue)
1075 (place-fret 2 5 4 blue)
1076 (place-fret 1 3 1 inverted)
1079 \override Voice.TextScript.size = 1.5
1080 <b, fis b dis' fis'>1^\markup {
1081 \override #'(fret-diagram-details . ((finger-code . in-dot)))
1082 \fret-diagram-verbose #`(
1084 (place-fret 4 4 "fis" red)
1085 (place-fret 3 4 "b" red)
1092 \musicglyph #"accidentals.sharp"} #}
1101 All other fret diagram properties must be adjusted using
1102 @code{\override} when using the fret-diagram-verbose markup.
1105 The following example shows the three fret-diagram markup
1106 interfaces, along with examples of common tweaks. For example,
1107 the size of the verbose fret diagram is reduced to 0.75, and the
1108 finger indications are specified to appear below the diagram. The
1109 terse diagram includes tweaks to specify placement of finger code
1112 @lilypond[verbatim,ragged-right,quote]
1116 \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
1120 \override #'(size . 0.75) {
1121 \override #'(finger-code . below-string) {
1122 \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
1133 \override #'(dot-radius . 0.35) {
1134 \override #'(finger-code . in-dot) {
1135 \override #'(dot-color . white) {
1136 \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
1146 @cindex customized fret diagram
1147 @cindex fret diagram, customized
1148 @cindex diagram, fret, customized
1150 @funindex fret-diagram-interface
1152 The graphical layout of a fret diagram can be customized according to
1153 user preference through the properties of the
1154 @code{fret-diagram-interface}. Details are found at
1155 @rinternals{fret-diagram-interface}. For a fret diagram
1156 markup, the interface properties belong to @code{Voice.TextScript}.
1160 @lilypondfile[verbatim,quote,texidoc,doctitle]
1161 {changing-fret-orientations.ly}
1163 @lilypondfile[verbatim,quote,texidoc,doctitle]
1164 {customizing-markup-fret-diagrams.ly}
1168 @ref{Instrument Specific Markup}.
1171 @rlsr{Fretted strings}.
1173 Internals Reference:
1174 @rinternals{fret-diagram-interface}.
1177 @node Predefined fret diagrams
1178 @unnumberedsubsubsec Predefined fret diagrams
1180 @cindex fret diagrams
1181 @cindex fret diagrams, ukulele
1182 @cindex fret diagrams, mandolin
1183 @cindex chord diagrams
1185 @funindex FretBoards
1186 @funindex stringTunings
1188 Fret diagrams can be displayed using the @code{FretBoards} context. By
1189 default, the @code{FretBoards} context will display fret diagrams that
1190 are stored in a lookup table:
1192 @lilypond[verbatim, ragged-right, quote]
1193 \include "predefined-guitar-fretboards.ly"
1201 The default predefined fret diagrams are contained in the file
1202 @file{predefined-guitar-fretboards.ly}. Fret diagrams are
1203 stored based on the pitches of a chord and the value of
1204 @code{stringTunings} that is currently in use.
1205 @file{predefined-guitar-fretboards.ly} contains predefined
1206 fret diagrams only for @code{guitar-tuning}. Predefined fret
1207 diagrams can be added for other instruments or other tunings
1208 by following the examples found in
1209 @file{predefined-guitar-fretboards.ly}.
1211 Fret diagrams for the ukulele are contained in the file @*
1212 @file{predefined-ukulele-fretboards.ly}.
1214 @lilypond[verbatim, ragged-right, quote]
1215 \include "predefined-ukulele-fretboards.ly"
1217 myChords = \chordmode { a1 a:m a:aug }
1224 \set Staff.stringTunings = #ukulele-tuning
1229 Fret diagrams for the mandolin are contained in the file @*
1230 @file{predefined-mandolin-fretboards.ly}.
1232 @lilypond[verbatim, ragged-right, quote]
1233 \include "predefined-mandolin-fretboards.ly"
1235 myChords = \chordmode { c1 c:m7.5- c:aug }
1242 \set Staff.stringTunings = #mandolin-tuning
1247 Chord pitches can be entered
1248 either as simultaneous music or using chord mode (see
1249 @ref{Chord mode overview}).
1251 @lilypond[verbatim, ragged-right,quote]
1252 \include "predefined-guitar-fretboards.ly"
1259 @cindex chord names with fret diagrams
1260 @cindex fret diagrams with chord names
1262 @funindex ChordNames
1264 @funindex \chordmode
1266 It is common that both chord names and fret diagrams are displayed together.
1267 This is achieved by putting a @code{ChordNames} context in parallel with
1268 a @code{FretBoards} context and giving both contexts the same music.
1270 @lilypond[verbatim, ragged-right, quote]
1271 \include "predefined-guitar-fretboards.ly"
1272 mychords = \chordmode{
1286 @cindex transposing fret diagrams
1287 @cindex fret diagrams, transposing
1288 @cindex diagrams, fret, transposing
1290 Predefined fret diagrams are transposable, as long as a diagram for the
1291 transposed chord is stored in the fret diagram table.
1293 @lilypond[verbatim, ragged-right, quote]
1294 \include "predefined-guitar-fretboards.ly"
1295 mychords = \chordmode{
1301 \transpose c e { \mychords }
1314 The predefined fret diagram table for guitar contains eight chords (major, minor,
1315 augmented, diminished, dominant seventh, major seventh, minor seventh, dominant ninth)
1316 for each of 17 keys.
1317 The predefined fret diagram table for ukulele contains these chords
1318 plus an additional three chords (major sixth, suspended second, and
1320 A complete list of the predefined fret diagrams is
1321 shown in @ref{Predefined fretboard diagrams}. If there is no entry in
1322 the table for a chord, the FretBoards engraver will calculate a
1323 fret-diagram using the automatic fret diagram functionality described in
1324 @ref{Automatic fret diagrams}.
1326 @lilypond[verbatim, ragged-right, quote]
1327 \include "predefined-guitar-fretboards.ly"
1328 mychords = \chordmode{
1342 @cindex fret diagrams, adding custom
1343 @cindex custom fret diagrams, adding
1344 @cindex adding custom fret diagrams
1346 Fret diagrams can be added to the fret diagram table. To add a diagram,
1347 you must specify the hash table for the diagram, the chord for the
1348 diagram, the tuning to be used, and
1349 a definition for the diagram. Normally, the hash table will be
1350 @var{default-fret-table}. The diagram definition can be either a
1351 fret-diagram-terse definition string or a fret-diagram-verbose
1354 @lilypond[verbatim, ragged-right, quote]
1355 \include "predefined-guitar-fretboards.ly"
1357 \storePredefinedDiagram #default-fret-table
1358 \chordmode { c:maj9 }
1362 mychords = \chordmode {
1376 Different fret diagrams for the same chord name can be stored using different
1377 octaves of pitches. The different octave should be at least two octaves
1378 above or below the default octave, because the octaves above and below the
1379 default octave are used for transposing fretboards.
1381 @lilypond[verbatim, ragged-right, quote]
1382 \include "predefined-guitar-fretboards.ly"
1384 \storePredefinedDiagram #default-fret-table
1387 #(offset-fret 2 (chord-shape 'bes guitar-tuning))
1389 mychords = \chordmode {
1403 @cindex fretted instruments, chord shapes
1404 @cindex chord shapes for fretted instruments
1406 @funindex \addChordShape
1407 @funindex addChordShape
1408 @funindex storePredefinedDiagram
1409 @funindex \storePredefinedDiagram
1411 In addition to fret diagrams, LilyPond stores an internal list of chord
1412 shapes. The chord shapes are fret diagrams that can be shifted along
1413 the neck to different positions to provide different chords. Chord
1414 shapes can be added to the internal list and then used to define
1415 predefined fret diagrams. Because they can be moved to various
1416 positions on the neck, chord shapes will normally not contain
1417 any open strings. Like fret diagrams, chord shapes can be
1418 entered as either fret-diagram-terse strings or fret-diagram-verbose
1421 @lilypond[verbatim, ragged-right, quote]
1422 \include "predefined-guitar-fretboards.ly"
1424 % Add a new chord shape
1426 \addChordShape #'powerf #guitar-tuning #"1-1;3-3;3-4;x;x;x;"
1428 % add some new chords based on the power chord shape
1430 \storePredefinedDiagram #default-fret-table
1433 #(chord-shape 'powerf guitar-tuning)
1434 \storePredefinedDiagram #default-fret-table
1437 #(offset-fret 2 (chord-shape 'powerf guitar-tuning))
1439 mychords = \chordmode{
1453 The graphical layout of a fret diagram can be customized according to
1454 user preference through the properties of the
1455 @code{fret-diagram-interface}. Details are found at
1456 @rinternals{fret-diagram-interface}. For a predefined fret diagram,
1457 the interface properties belong to @code{FretBoards.FretBoard}.
1461 @lilypondfile[verbatim,quote,texidoc,doctitle]
1462 {customizing-fretboard-fret-diagrams.ly}
1464 @lilypondfile[verbatim,quote,texidoc,doctitle]
1465 {defining-predefined-fretboards-for-other-instruments.ly}
1467 @lilypondfile[verbatim,quote,texidoc,doctitle,ragged-right]
1468 {chordchanges-for-fretboards.ly}
1470 @lilypondfile[verbatim,quote,texidoc,doctitle]
1471 {fretboards-alternate-tables.ly}
1475 @ref{Custom tablatures},
1476 @ref{Automatic fret diagrams},
1477 @ref{Chord mode overview},
1478 @ref{Predefined fretboard diagrams}.
1481 @file{ly/predefined-guitar-fretboards.ly}, @*
1482 @file{ly/predefined-guitar-ninth-fretboards.ly}, @*
1483 @file{ly/predefined-ukulele-fretboards.ly}, @*
1484 @file{ly/predefined-mandolin-fretboards.ly}.
1487 @rlsr{Fretted strings}.
1489 Internals Reference:
1490 @rinternals {fret-diagram-interface}.
1493 @node Automatic fret diagrams
1494 @unnumberedsubsubsec Automatic fret diagrams
1496 @cindex fret diagrams, automatic
1497 @cindex chord diagrams, automatic
1498 @cindex automatic fret diagrams
1499 @cindex automatic chord diagrams
1501 Fret diagrams can be automatically created from entered notes using the
1502 @code{FretBoards} context. If no predefined diagram is available for
1503 the entered notes in the active @code{stringTunings}, this context
1504 calculates strings and frets that can be used to play the notes.
1506 @lilypond[quote,ragged-right,verbatim]
1525 @funindex predefinedFretboardsOff
1526 @funindex \predefinedFretboardsOff
1527 @funindex predefinedFretboardsOn
1528 @funindex \predefinedFretboardsOn
1530 As no predefined diagrams are loaded by default, automatic calculation
1531 of fret diagrams is the default behavior. Once default diagrams are
1532 loaded, automatic calculation can be enabled and disabled with predefined
1535 @lilypond[quote,ragged-right,verbatim]
1537 \storePredefinedDiagram #default-fret-table
1540 #"x;3-1-(;5-2;5-3;5-4;3-1-1-);"
1549 \predefinedFretboardsOff
1551 \predefinedFretboardsOn
1565 Sometimes the fretboard calculator will be unable to find
1566 an acceptable diagram. This can often be remedied by
1567 manually assigning a note to a string. In many cases, only one
1568 note need be manually placed on a string; the rest of
1569 the notes will then be placed appropriately by the
1570 @code{FretBoards} context.
1572 @cindex fret diagrams, adding fingerings
1573 @cindex fingerings, adding to fret diagrams
1575 Fingerings can be added to FretBoard fret diagrams.
1577 @lilypond[quote, verbatim]
1585 <c-3 e-2 g c'-1 e'>1
1596 @funindex minimumFret
1598 The minimum fret to be used in calculating strings and frets for
1599 the FretBoard context can be set with the @code{minimumFret}
1602 @lilypond[quote, verbatim]
1611 \set FretBoards.minimumFret = #5
1622 The strings and frets for the @code{FretBoards} context depend
1623 on the @code{stringTunings} property, which has the same meaning
1624 as in the TabStaff context. See @ref{Custom tablatures} for
1625 information on the @code{stringTunings} property.
1627 The graphical layout of a fret diagram can be customized according to
1628 user preference through the properties of the
1629 @code{fret-diagram-interface}. Details are found at
1630 @rinternals{fret-diagram-interface}. For a @code{FretBoards} fret
1631 diagram, the interface properties belong to
1632 @code{FretBoards.FretBoard}.
1636 @code{\predefinedFretboardsOff},
1637 @code{\predefinedFretboardsOn}.
1642 @ref{Custom tablatures}.
1645 @rlsr{Fretted strings}.
1647 Internals Reference:
1648 @rinternals {fret-diagram-interface}.
1651 Automatic fretboard calculations do not work properly for instruments
1652 with non-monotonic tunings.
1655 @node Right-hand fingerings
1656 @unnumberedsubsubsec Right-hand fingerings
1658 @cindex fretted instruments, right hand fingerings
1659 @cindex fingerings, right hand for fretted instruments
1660 @cindex right hand fingerings for fretted instruments
1662 @funindex rightHandFinger
1663 @funindex \rightHandFinger
1665 Right-hand fingerings @var{p-i-m-a} must be entered using
1666 @code{\rightHandFinger} followed by a number.
1668 @warning{If the number is entered in Scheme notation, remember to append
1669 a space before following it with a closing @code{>} or similar.}
1671 @lilypond[quote,verbatim,fragment]
1673 c4\rightHandFinger #1
1674 e\rightHandFinger #2
1675 g\rightHandFinger #3
1676 c'\rightHandFinger #4
1677 <c\rightHandFinger #1 e\rightHandFinger #2
1678 g\rightHandFinger #3 c'\rightHandFinger #4 >1
1681 For convenience, you can abbreviate @code{\rightHandFinger} to something
1682 short, for example @code{RH},
1691 @lilypondfile[verbatim,quote,texidoc,doctitle]
1692 {placement-of-right-hand-fingerings.ly}
1694 @lilypondfile[verbatim,quote,texidoc,doctitle]
1695 {fingerings,-string-indications,-and-right-hand-fingerings.ly}
1699 @rlsr{Fretted strings}.
1701 Internals Reference:
1702 @rinternals{StrokeFinger}.
1708 Most of the notational issues associated with guitar music are
1709 covered sufficiently in the general fretted strings section, but there
1710 are a few more worth covering here. Occasionally users want to
1711 create songbook-type documents having only lyrics with chord
1712 indications above them. Since LilyPond is a music typesetter,
1713 it is not recommended for documents that have no music notation
1714 in them. A better alternative is a word processor, text editor,
1715 or, for experienced users, a typesetter like GuitarTeX.
1718 * Indicating position and barring::
1719 * Indicating harmonics and dampened notes::
1720 * Indicating power chords::
1723 @node Indicating position and barring
1724 @unnumberedsubsubsec Indicating position and barring
1726 @cindex indicating position and barring for fretted instruments
1727 @cindex fretted instruments, indicating position and barring
1729 This example demonstrates how to include guitar position and
1730 barring indications.
1732 @lilypond[quote,ragged-right,verbatim,fragment]
1737 \override TextSpanner.bound-details.left.text = #"XII "
1739 b16 e g e b g\stopTextSpan
1746 @ref{Text spanners}.
1749 @rlsr{Fretted strings},
1750 @rlsr{Expressive marks}.
1753 @node Indicating harmonics and dampened notes
1754 @unnumberedsubsubsec Indicating harmonics and dampened notes
1756 @cindex fretted instruments, dampened notes
1757 @cindex fretted instruments, harmonics
1758 @cindex dampened notes on fretted instruments
1759 @cindex harmonics on fretted instruments
1761 Special note heads can be used to indicate dampened notes or
1762 harmonics. Harmonics are normally further explained with a
1765 @lilypond[quote,ragged-right,verbatim]
1768 \override Staff.NoteHead.style = #'harmonic-mixed
1769 d'^\markup { \italic { \fontsize #-2 { "harm. 12" }}} <g b>1
1773 Dampened notes (also called @notation{dead notes}) are supported
1774 within normal and tablature staves:
1776 @lilypond[quote,ragged-right,verbatim]
1778 < a\3 \deadNote c\2 a'\1 >4
1779 < b\3 \deadNote d\2 b'\1 >
1780 < c\3 \deadNote e\2 c'\1 >
1782 \tuplet 3/2 { g8 b e }
1797 Another playing technique (especially used on electric guitars) is
1798 called @notation{palm mute}. The string is hereby partly muted by the
1799 palm of the striking hand (hence the name). Lilypond supports
1800 the notation of palm mute-style notes by changing the note head to a
1803 @lilypond[quote,ragged-right,verbatim]
1804 \new Voice { % Warning: explicit Voice instantiation is
1805 % required to have palmMuteOff work properly
1806 % when palmMuteOn comes at the beginning of
1811 e8^\markup { \musicglyph #"noteheads.u2do" = palm mute }
1814 e e \palmMute e e e |
1815 e8 \palmMute { e e e } e e e e |
1816 < \palmMute e b' e >8 \palmMute { e e e } < \palmMute e b' e >2
1823 @rlsr{Fretted strings}.
1826 @ref{Special note heads},
1827 @ref{Note head styles}.
1830 @node Indicating power chords
1831 @unnumberedsubsubsec Indicating power chords
1833 @funindex powerChords
1834 @funindex \powerChords
1836 @cindex power chords
1837 @cindex chords, power
1839 Power chords and their symbols can be engraved in chord mode or as chord
1842 @lilypond[quote,ragged-right,verbatim]
1843 ChordsAndSymbols = {
1848 \set minimumFret = #8
1852 \set minimumFret = #5
1872 Power chord symbols are automatically switched off as soon as one of the
1873 other common chord modifier is used:
1875 @lilypond[quote,ragged-right,verbatim]
1876 mixedChords = \chordmode {
1901 @rglos{power chord}.
1904 @ref{Extended and altered chords},
1905 @ref{Printing chord names}.
1908 @rlsr{Fretted strings}.
1915 * Banjo tablatures::
1918 @node Banjo tablatures
1919 @unnumberedsubsubsec Banjo tablatures
1921 @cindex banjo tablatures
1922 @cindex tablature, banjo
1924 LilyPond has basic support for the five-string banjo. When making tablatures
1925 for five-string banjo, use the banjo tablature format function to get
1926 correct fret numbers for the fifth string:
1928 @c due to crazy intervals of banjo music, absolute pitch is recommended
1930 @lilypond[quote,ragged-right,verbatim]
1932 g8 d' g'\5 a b g e d' |
1933 g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
1938 \new Staff \with { \omit StringNumber }
1939 { \clef "treble_8" \music }
1940 \new TabStaff \with {
1941 tablatureFormat = #fret-number-tablature-format-banjo
1942 stringTunings = #banjo-open-g-tuning
1948 @cindex banjo tunings
1949 @cindex tunings, banjo
1951 @funindex banjo-c-tuning
1952 @funindex banjo-modal-tuning
1953 @funindex banjo-open-d-tuning
1954 @funindex banjo-open-dm-tuning
1955 @funindex four-string-banjo
1957 A number of common tunings for the five-string banjo are predefined:
1958 @code{banjo-c-tuning} (gCGBD), @code{banjo-modal-tuning} (gDGCD),
1959 @code{banjo-open-d-tuning} (aDF#AD) and @code{banjo-open-dm-tuning}
1962 These may be converted to four-string tunings using the
1963 @code{four-string-banjo} function:
1966 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
1971 @file{ly/string-tunings-init.ly}.
1974 @rlsr{Fretted strings}.