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 (or
59 @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 @ref{Fingering instructions}.
66 @item Instructions for @notation{Laissez vibrer} ties
67 as well as ties on arpeggios and tremolos can be found in
70 @item Instructions for handling multiple voices can be found
71 in @ref{Collision resolution}.
73 @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 inside a chord construct
103 @warning{String numbers @strong{must} be defined inside a chord
104 construct even if there is only a single note.}
106 @lilypond[verbatim,quote,relative=0]
112 When fingerings and string indications are used together, their
113 placement is controlled by the order in which the two items appear
116 @lilypond[verbatim,quote,relative=1]
124 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
125 {controlling-the-placement-of-chord-fingerings.ly}
127 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
128 {allowing-fingerings-to-be-printed-inside-the-staff.ly}
133 @ref{Fingering instructions}.
136 @rlsr{Fretted strings}.
139 @rinternals{StringNumber},
140 @rinternals{Fingering}.
143 @node Default tablatures
144 @unnumberedsubsubsec Default tablatures
146 @cindex tablatures, basic
147 @cindex tablatures, default
152 Music for plucked string instruments is frequently notated using a
153 finger/touch notation or tablature. In contrast to traditional
154 notation pitches are not denoted with note heads, but by numbers (or
155 letterlike symbols in historical intavolatura). The numbers
156 indicate on which string and fret a note must be played. The numbers
157 are printed on top of each other if they are to be played
160 By default, string 1 is the highest, and the tuning defaults to the
161 standard guitar tuning (with 6 strings). The notes are printed as
162 tablature, by using @code{TabStaff} and @code{TabVoice} contexts. A
163 calligraphic tablature clef is added automatically.
165 @lilypond[quote,ragged-right,verbatim]
166 \new TabStaff \relative c' {
172 Default tablatures do not contain any symbols for tone duration nor any
173 other musical symbols such as e.g. expressive marks.
175 @lilypond[quote,ragged-right,verbatim]
187 \new Staff { \clef "G_8" \symbols }
188 \new TabStaff { \symbols }
193 @funindex \tabFullNotation
195 If all musical symbols used in traditional notation should also show up
196 in tablature one has to apply the command @code{\tabFullNotation} in a
197 @code{TabStaff}-context. Please bear in mind that half notes are
198 double-stemmed in tablature in order to distinguish them from quarter
201 @lilypond[quote,ragged-right,verbatim]
221 @funindex minimumFret
223 By default pitches are assigned to the lowest playing position on the
224 fret-board (first position). Open strings are automatically preferred.
225 If you would like a certain pitch to be played on a specific string
226 you can add a string number indication to the pitch name. If you
227 define pitch names and string numbers without a chord construct
228 (@code{<>}) the string number indications do not appear in traditional
229 notation. It is much more comfortable to define the playing position
230 by using the value of @code{minimumFret}. The default value for
234 @lilypond[quote,ragged-right,verbatim]
236 \new Staff \relative c {
240 c,16\5 d\5 e\4 f\4 g4\4
243 \new TabStaff \relative c {
245 c,16\5 d\5 e\4 f\4 g4\4
246 \set TabStaff.minimumFret = #5
252 @funindex \tabChordRepetition
254 Chord constructs can be repeated by the chord repetition symbol @code{q}.
255 To use this feature in combination with tablature, @code{\tabChordRepetition}
256 is provided. It preserves the string information explicitly given within
257 chord constructs so repeated chords get identical tablature representations.
259 @lilypond[quote,verbatim]
262 guitar = \relative c' {
263 r8 <gis\4 cis\3 b\2>~ q4 q8~ q q4
269 \override Voice.StringNumber #'transparent = ##t
279 Ties over a line break are parenthesized by default. The same holds for
280 the second alternative of a repeat.
282 @lilypond[quote,ragged-right,verbatim]
283 ties = \relative c' {
290 { g4\repeatTie c,2. }
317 @funindex \hideSplitTiedTabNotes
319 The command @code{\hideSplitTiedTabNotes} cancels the behavior of
320 engraving fret numbers in parentheses:
322 @lilypond[quote,ragged-right,verbatim]
323 ties = \relative c' {
329 { g4\repeatTie c,2. }
345 \hideSplitTiedTabNotes
357 @cindex harmonic indications in tablature notation
358 @cindex tablature and harmonic indications
359 @cindex slides in tablature notation
360 @cindex tablature and slides
362 Harmonic indications and slides can be added to tablature
365 @lilypond[verbatim, quote, relative=1]
368 <c g'\harmonic>4 d\2\glissando e\2
376 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
377 {stem-and-beam-behavior-in-tablature.ly}
379 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
380 {polyphony-in-tablature.ly}
388 @rlsr{Fretted strings}.
391 @rinternals{TabNoteHead},
392 @rinternals{TabStaff},
393 @rinternals{TabVoice},
399 Chords are not handled in a special way, and hence the automatic
400 string selector may easily select the same string for two notes in
403 In order to handle @code{\partcombine}, a @code{TabStaff} must use
404 specially-created voices:
406 @lilypond[quote,ragged-right,verbatim]
407 melodia = \partcombine { e4 g g g } { e4 e e e }
410 \new TabVoice = "one" s1
411 \new TabVoice = "two" s1
412 \new TabVoice = "shared" s1
413 \new TabVoice = "solo" s1
419 Guitar special effects are limited to harmonics and slides.
421 @node Custom tablatures
422 @unnumberedsubsubsec Custom tablatures
424 @cindex tablatures, custom
425 @cindex tablature, banjo
426 @cindex tablature, mandolin
427 @cindex tablature, guitar
428 @cindex tablature, bass guitar
429 @cindex tablature, ukulele
430 @cindex tablature, predefined string tunings
431 @cindex fretted instruments, predefined string tunings
432 @cindex predefined string tunings for fretted instruments
434 @funindex StringTunings
436 LilyPond tabulature automatically calculates the fret for
437 a note based on the string to which the note is assigned.
438 In order to do this, the tuning of the strings must be
439 specified. The tuning of the strings is given in the
440 @code{stringTunings} property.
442 LilyPond comes with predefined string tunings for banjo, mandolin,
443 guitar, bass guitar and ukulele. LilyPond automatically sets
444 the correct transposition for predefined tunings. The following
445 example is for bass guitar, which sounds an octave lower than
448 @lilypond[quote,ragged-right,verbatim]
457 \set TabStaff.stringTunings = #bass-tuning
465 The default string tuning is @code{guitar-tuning}, which
466 is the standard EADGBE tuning. Some other predefined tunings are
467 @code{guitar-open-g-tuning}, @code{mandolin-tuning} and
468 @code{banjo-open-g-tuning}. The predefined string tunings
469 are found in @file{scm/tablature.scm}.
471 A string tuning is a Scheme list of string pitches,
472 one for each string, ordered by string number from 1 to N,
473 where string 1 is at the top of the tablature staff and
474 string N is at the bottom. This ordinarily results in ordering
475 from highest pitch to lowest pitch, but some instruments
476 (e.g. ukulele) do not have strings ordered by pitch.
478 A string pitch in a string tuning list is the pitch difference
479 of the open string from middle C measured in semitones. The
480 string pitch must be an integer. LilyPond calculates the actual
481 pitch of the string by adding the string tuning pitch to the
482 actual pitch for middle C.
484 LilyPond automatically calculates the number of strings in the
485 @code{TabStaff} as the number of elements in @code{stringTunings}.
487 Any desired string tuning can be created. For example, we can
488 define a string tuning for a four-string instrument with pitches
489 of @code{a''}, @code{d''}, @code{g'}, and @code{c'}:
492 @lilypond[quote,verbatim]
504 \set TabStaff.stringTunings = #'(21 14 7 0)
510 @cindex moderntab clef
511 @cindex clef, moderntab
515 A modern tab clef can also be used.
517 @lilypond[quote,ragged-right,verbatim]
527 The modern tab clef supports tablatures from 4 to 7 strings.
531 @file{scm/tablature.scm}.
534 @rlsr{Fretted strings}.
537 @rinternals{Tab_note_heads_engraver}.
540 Automatic tablature calculations do not work properly in most
541 cases for instruments where string pitches do not vary
542 monotonically with string number, such as ukuleles.
544 @node Fret diagram markups
545 @unnumberedsubsubsec Fret diagram markups
547 @cindex fret diagrams
548 @cindex chord diagrams
549 @cindex diagrams, fret
550 @cindex diagrams, chord for fretted instruments
551 @cindex fret diagrams, custom
552 @cindex custom fret diagrams
554 Fret diagrams can be added to music as a markup to the desired
555 note. The markup contains information about the desired fret
556 diagram. There are three different fret-diagram markup
557 interfaces: standard, terse, and verbose. The three interfaces
558 produce equivalent markups, but have varying amounts of
559 information in the markup string. Details about the
560 syntax of the different markup strings used to define
561 fret diagrams are found at @ref{Instrument Specific Markup}.
563 The standard fret diagram markup string indicates the string
564 number and the fret number for each dot to be placed on the string.
565 In addition, open and unplayed (muted) strings can be indicated.
567 @lilypond[quote, verbatim]
569 \context ChordNames {
576 <c e g c' e'>1^\markup {
577 \fret-diagram #"6-x;5-3;4-2;3-o;2-1;1-o;"
579 <d a d' f'>1^\markup {
580 \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-1;"
586 @cindex barre indications
588 Barre indications can be added to the diagram from
589 the fret-diagram markup string.
591 @lilypond[quote, verbatim]
593 \context ChordNames {
600 <f, c f a c' f'>1^\markup {
601 \fret-diagram #"c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
603 <g, d g b d' g'>1^\markup {
604 \fret-diagram #"c:6-1-3;6-3;5-5;4-5;3-4;2-3;1-3;"
610 @cindex fret-diagram markup
613 @funindex fret-diagram
614 @funindex \fret-diagram
616 The size of the fret diagram, and the number of frets in the diagram
617 can be changed in the fret-diagram markup string.
619 @lilypond[quote, verbatim]
621 \context ChordNames {
628 <f, c f a c' f'>1^\markup {
629 \fret-diagram #"s:1.5;c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
631 <g, b, d g b g'>1^\markup {
632 \fret-diagram #"h:6;6-3;5-2;4-o;3-o;2-o;1-3;"
638 The number of strings in a fret diagram can be changed to accommodate
639 different instruments such as banjos and ukuleles with the fret-diagram
642 @lilypond[quote, verbatim]
644 \context ChordNames {
650 % An 'A' chord for ukulele
652 \fret-diagram #"w:4;4-2-2;3-1-1;2-o;1-o;"
658 Fingering indications can be added, and the location of fingering labels
659 can be controlled by the fret-diagram markup string.
661 @lilypond[quote, verbatim]
663 \context ChordNames {
670 <c e g c' e'>1^\markup {
671 \fret-diagram #"f:1;6-x;5-3-3;4-2-2;3-o;2-1-1;1-o;"
673 <d a d' f'>1^\markup {
674 \fret-diagram #"f:2;6-x;5-x;4-o;3-2-2;2-3-3;1-1-1;"
680 Dot radius and dot position can be controlled with the fret-diagram
683 @lilypond[quote, verbatim]
685 \context ChordNames {
692 <c e g c' e'>1^\markup {
693 \fret-diagram #"d:0.35;6-x;5-3;4-2;3-o;2-1;1-o;"
695 <d a d' f'>1^\markup {
696 \fret-diagram #"p:0.2;6-x;5-x;4-o;3-2;2-3;1-1;"
702 @cindex fret-diagram-terse markup
704 @funindex fret-diagram-terse
705 @funindex \fret-diagram-terse
707 The fret-diagram-terse markup string omits string numbers; the string
708 number is implied by the presence of semicolons. There is one semicolon
709 for each string in the diagram. The first semicolon corresponds to the
710 highest string number and the last semicolon corresponds to the first string.
711 Mute strings, open strings, and fret numbers can be indicated.
713 @lilypond[quote, verbatim]
715 \context ChordNames {
722 <c e g c' e'>1^\markup {
723 \fret-diagram-terse #"x;3;2;o;1;o;"
725 <d a d' f'>1^\markup {
726 \fret-diagram-terse #"x;x;o;2;3;1;"
732 Barre indicators can be included in the fret-diagram-terse markup string.
734 @lilypond[quote, verbatim]
736 \context ChordNames {
743 <f, c f a c' f'>1^\markup {
744 \fret-diagram-terse #"1-(;3;3;2;1;1-);"
746 <g, d g b d' g'>1^\markup {
747 \fret-diagram-terse #"3-(;5;5;4;3;3-);"
753 Fingering indications can be included in the fret-diagram-terse markup string.
755 @c Need to use override to enable fingerings to show this -- can we do so?
756 @lilypond[quote, verbatim]
758 \context ChordNames {
764 \override Voice.TextScript
765 #'(fret-diagram-details finger-code) = #'below-string
767 <c e g c' e'>1^\markup {
768 \fret-diagram-terse #"x;3-3;2-2;o;1-1;o;"
770 <d a d' f'>1^\markup {
771 \fret-diagram-terse #"x;x;o;2-2;3-3;1-1;"
777 Other fret diagram properties must be adjusted using @code{\override} when using
778 the fret-diagram-terse markup.
780 @cindex fret-diagram-verbose markup
783 @funindex fret-diagram-verbose
784 @funindex \fret-diagram-verbose
786 The fret-diagram-verbose markup string is in the format of a Scheme list. Each
787 element of the list indicates an item to be placed on the fret diagram.
789 @lilypond[quote, verbatim]
791 \context ChordNames {
798 <c e g c' e'>1^\markup {
799 \fret-diagram-verbose #'(
808 <d a d' f'>1^\markup {
809 \fret-diagram-verbose #'(
822 Fingering indications and barres can be included in a
823 fret-diagram-verbose markup string. Unique to the
824 fret-diagram-verbose interface is a capo indication that
825 can be placed on the fret diagram. The capo indication is
826 a thick bar that covers all strings. The fret with the
827 capo will be the lowest fret in the fret diagram.
829 @c \override is necessary to make fingering visible
830 @lilypond[quote, verbatim]
832 \context ChordNames {
839 \override Voice.TextScript
840 #'(fret-diagram-details finger-code) = #'below-string
841 <f, c f a c' f'>1^\markup {
842 \fret-diagram-verbose #'(
852 <g, b, d g b g'>1^\markup {
853 \fret-diagram-verbose #'(
862 <c e g c' e'>1^\markup {
863 \fret-diagram-verbose #'(
875 All other fret diagram properties must be adjusted using @code{\override}
876 when using the fret-diagram-verbose markup.
879 The following example shows the three fret-diagram markup
880 interfaces, along with examples of common tweaks. For example,
881 the size of the verbose fret diagram is reduced to 0.75, and the
882 finger indications are specified to appear below the diagram. The
883 terse diagram includes tweaks to specify placement of finger code
886 @lilypond[verbatim,ragged-right,quote]
890 \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
894 \override #'(size . 0.75) {
895 \override #'(finger-code . below-string) {
896 \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
907 \override #'(dot-radius . 0.35) {
908 \override #'(finger-code . in-dot) {
909 \override #'(dot-color . white) {
910 \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
920 @cindex customized fret diagram
921 @cindex fret diagram, customized
922 @cindex diagram, fret, customized
924 @funindex fret-diagram-interface
926 The graphical layout of a fret diagram can be customized according to
927 user preference through the properties of the @code{fret-diagram-interface}.
928 Details are found at @rinternals{fret-diagram-interface}. For a fret diagram
929 markup, the interface properties belong to @code{Voice.TextScript}.
933 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
934 {changing-fret-orientations.ly}
936 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
937 {customizing-markup-fret-diagrams.ly}
941 @ref{Instrument Specific Markup}.
944 @rlsr{Fretted strings}.
947 @rinternals{fret-diagram-interface}.
950 @node Predefined fret diagrams
951 @unnumberedsubsubsec Predefined fret diagrams
954 @cindex fret diagrams
955 @cindex fret diagrams, ukulele
956 @cindex chord diagrams
959 @funindex stringTunings
961 Fret diagrams can be displayed using the @code{FretBoards} context. By
962 default, the @code{FretBoards} context will display fret diagrams that
963 are stored in a lookup table:
965 @lilypond[verbatim, ragged-right, quote]
966 \include "predefined-guitar-fretboards.ly"
967 \context FretBoards {
974 The default predefined fret diagrams are contained in the file
975 @file{predefined-guitar-fretboards.ly}. Fret diagrams are
976 stored based on the pitches of a chord and the value of
977 @code{stringTunings} that is currently in use.
978 @file{predefined-guitar-fretboards.ly} contains predefined
979 fret diagrams only for @code{guitar-tuning}. Predefined fret
980 diagrams can be added for other instruments or other tunings
981 by following the examples found in
982 @file{predefined-guitar-fretboards.ly}.
984 Fret diagrams for the ukulele are contained in the file
985 @file{predefined-ukulele-fretboards.ly}.
987 @lilypond[verbatim, ragged-right, quote]
988 \include "predefined-ukulele-fretboards.ly"
990 myChords = \chordmode { a1 a:m a:aug }
997 \set stringTunings = #ukulele-tuning
1002 Chord pitches can be entered
1003 either as simultaneous music or using chord mode (see
1004 @ref{Chord mode overview}).
1006 @lilypond[verbatim, ragged-right,quote]
1007 \include "predefined-guitar-fretboards.ly"
1008 \context FretBoards {
1014 @cindex chord names with fret diagrams
1015 @cindex fret diagrams with chord names
1017 @funindex ChordNames
1019 @funindex \chordmode
1021 It is common that both chord names and fret diagrams are displayed together.
1022 This is achieved by putting a @code{ChordNames} context in parallel with
1023 a @code{FretBoards} context and giving both contexts the same music.
1025 @lilypond[verbatim, ragged-right, quote]
1026 \include "predefined-guitar-fretboards.ly"
1027 mychords = \chordmode{
1032 \context ChordNames {
1035 \context FretBoards {
1041 @cindex transposing fret diagrams
1042 @cindex fret diagrams, transposing
1043 @cindex diagrams, fret, transposing
1045 Predefined fret diagrams are transposable, as long as a diagram for the
1046 transposed chord is stored in the fret diagram table.
1048 @lilypond[verbatim, ragged-right, quote]
1049 \include "predefined-guitar-fretboards.ly"
1050 mychords = \chordmode{
1056 \transpose c e { \mychords }
1059 \context ChordNames {
1062 \context FretBoards {
1069 The predefined fret diagram table for guitar contains eight chords (major, minor,
1070 augmented, diminished, dominant seventh, major seventh, minor seventh, dominant ninth)
1071 for each of 17 keys.
1072 The predefined fret diagram table for ukulele contains these chords
1073 plus an additional three chords (major sixth, suspended second, and
1075 A complete list of the predefined fret diagrams is
1076 shown in @ref{Predefined fretboard diagrams}. If there is no entry in
1077 the table for a chord, the FretBoards engraver will calculate a
1078 fret-diagram using the automatic fret diagram functionality described in
1079 @ref{Automatic fret diagrams}.
1081 @lilypond[verbatim, ragged-right, quote]
1082 \include "predefined-guitar-fretboards.ly"
1083 mychords = \chordmode{
1088 \context ChordNames {
1091 \context FretBoards {
1097 @cindex fret diagrams, adding custom
1098 @cindex custom fret diagrams, adding
1099 @cindex adding custom fret diagrams
1101 Fret diagrams can be added to the fret diagram table. To add a diagram,
1102 you must specify the hash table for the diagram, the chord for the
1103 diagram, the tuning to be used, and
1104 a definition for the diagram. Normally, the hash table will be
1105 @var{default-fret-table}. The diagram definition can be either a
1106 fret-diagram-terse definition string or a fret-diagram-verbose
1109 @lilypond[verbatim, ragged-right, quote]
1110 \include "predefined-guitar-fretboards.ly"
1112 \storePredefinedDiagram #default-fret-table
1113 \chordmode { c:maj9 }
1117 mychords = \chordmode {
1122 \context ChordNames {
1125 \context FretBoards {
1131 Different fret diagrams for the same chord name can be stored using different
1132 octaves of pitches. The different octave should be at least two octaves
1133 above or below the default octave, because the octaves above and below the
1134 default octave are used for transposing fretboards.
1136 @lilypond[verbatim, ragged-right, quote]
1137 \include "predefined-guitar-fretboards.ly"
1139 \storePredefinedDiagram #default-fret-table
1142 #(offset-fret 2 (chord-shape 'bes guitar-tuning))
1144 mychords = \chordmode {
1149 \context ChordNames {
1152 \context FretBoards {
1158 @cindex fretted instruments, chord shapes
1159 @cindex chord shapes for fretted instruments
1161 @funindex \addChordShape
1162 @funindex addChordShape
1163 @funindex storePredefinedDiagram
1164 @funindex \storePredefinedDiagram
1166 In addition to fret diagrams, LilyPond stores an internal list of chord
1167 shapes. The chord shapes are fret diagrams that can be shifted along
1168 the neck to different positions to provide different chords. Chord
1169 shapes can be added to the internal list and then used to define
1170 predefined fret diagrams. Because they can be moved to various
1171 positions on the neck, chord shapes will normally not contain
1172 any open strings. Like fret diagrams, chord shapes can be
1173 entered as either fret-diagram-terse strings or fret-diagram-verbose
1176 @lilypond[verbatim, ragged-right, quote]
1177 \include "predefined-guitar-fretboards.ly"
1179 % Add a new chord shape
1181 \addChordShape #'powerf #guitar-tuning #"1-1;3-3;3-4;x;x;x;"
1183 % add some new chords based on the power chord shape
1185 \storePredefinedDiagram #default-fret-table
1188 #(chord-shape 'powerf guitar-tuning)
1189 \storePredefinedDiagram #default-fret-table
1192 #(offset-fret 2 (chord-shape 'powerf guitar-tuning))
1194 mychords = \chordmode{
1199 \context ChordNames {
1202 \context FretBoards {
1208 The graphical layout of a fret diagram can be customized according to
1209 user preference through the properties of the @code{fret-diagram-interface}.
1210 Details are found at @rinternals{fret-diagram-interface}. For a
1211 predefined fret diagram, the interface properties belong to
1212 @code{FretBoards.FretBoard}.
1216 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1217 {customizing-fretboard-fret-diagrams.ly}
1219 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1220 {defining-predefined-fretboards-for-other-instruments.ly}
1222 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1223 {chordchanges-for-fretboards.ly}
1225 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1226 {fretboards-alternate-tables.ly}
1231 @ref{Custom tablatures},
1232 @ref{Automatic fret diagrams},
1233 @ref{Chord mode overview},
1234 @ref{Predefined fretboard diagrams}.
1237 @file{ly/predefined-guitar-fretboards.ly},
1238 @file{ly/predefined-guitar-ninth-fretboards.ly},
1239 @file{ly/predefined-ukulele-fretboards.ly}.
1242 @rlsr{Fretted strings}.
1244 Internals Reference:
1245 @rinternals {fret-diagram-interface}.
1248 @node Automatic fret diagrams
1249 @unnumberedsubsubsec Automatic fret diagrams
1251 @cindex fret diagrams, automatic
1252 @cindex chord diagrams, automatic
1253 @cindex automatic fret diagrams
1254 @cindex automatic chord diagrams
1256 Fret diagrams can be automatically created from entered notes using the
1257 @code{FretBoards} context. If no predefined diagram is available for
1258 the entered notes in the active @code{stringTunings}, this context
1259 calculates strings and frets that can be used to play the notes.
1261 @lilypond[quote,ragged-right,verbatim]
1263 \context ChordNames {
1268 \context FretBoards {
1280 @funindex predefinedFretboardsOff
1281 @funindex \predefinedFretboardsOff
1282 @funindex predefinedFretboardsOn
1283 @funindex \predefinedFretboardsOn
1285 As no predefined diagrams are loaded by default, automatic calculation
1286 of fret diagrams is the default behavior. Once default diagrams are
1287 loaded, automatic calculation can be enabled and disabled with predefined
1290 @lilypond[quote,ragged-right,verbatim]
1292 \storePredefinedDiagram #default-fret-table
1295 #"x;3-1-(;5-2;5-3;5-4;3-1-1-);"
1297 \context ChordNames {
1302 \context FretBoards {
1304 \predefinedFretboardsOff
1306 \predefinedFretboardsOn
1320 Sometimes the fretboard calculator will be unable to find
1321 an acceptable diagram. This can often be remedied by
1322 manually assigning a note to a string. In many cases, only one
1323 note need be manually placed on a string; the rest of
1324 the notes will then be placed appropriately by the @code{FretBoards}
1327 @cindex fret diagrams, adding fingerings
1328 @cindex fingerings, adding to fret diagrams
1330 Fingerings can be added to FretBoard fret diagrams.
1332 @lilypond[quote, verbatim]
1334 \context ChordNames {
1339 \context FretBoards {
1340 <c-3 e-2 g c'-1 e'>1
1351 @funindex minimumFret
1353 The minimum fret to be used in calculating strings and frets for
1354 the FretBoard context can be set with the @code{minimumFret}
1357 @lilypond[quote, verbatim]
1359 \context ChordNames {
1364 \context FretBoards {
1366 \set FretBoards.minimumFret = #5
1377 The strings and frets for the @code{FretBoards} context depend
1378 on the @code{stringTunings} property, which has the same meaning
1379 as in the TabStaff context. See @ref{Custom tablatures} for
1380 information on the @code{stringTunings} property.
1382 The graphical layout of a fret diagram can be customized according to
1383 user preference through the properties of the @code{fret-diagram-interface}.
1384 Details are found at @rinternals{fret-diagram-interface}. For a
1385 @code{FretBoards} fret diagram, the interface properties belong to
1386 @code{FretBoards.FretBoard}.
1390 @code{\predefinedFretboardsOff},
1391 @code{\predefinedFretboardsOn}.
1397 @ref{Custom tablatures}.
1400 @rlsr{Fretted strings}.
1402 Internals Reference:
1403 @rinternals {fret-diagram-interface}.
1406 Automatic fretboard calculations do not work properly for instruments
1407 with non-monotonic tunings.
1410 @node Right-hand fingerings
1411 @unnumberedsubsubsec Right-hand fingerings
1413 @cindex fretted instruments, right hand fingerings
1414 @cindex fingerings, right hand for fretted instruments
1415 @cindex right hand fingerings for fretted instruments
1417 @funindex rightHandFinger
1418 @funindex \rightHandFinger
1420 Right-hand fingerings @var{p-i-m-a} must be entered within a
1421 chord construct @code{<>} for them to be printed in the score,
1422 even when applied to a single note.
1424 @warning{There @strong{must} be a hyphen before
1425 @code{@bs{}rightHandFinger} and a space before the closing @code{>}.}
1427 @lilypond[quote,verbatim,relative=0]
1429 <c-\rightHandFinger #1 >4
1430 <e-\rightHandFinger #2 >
1431 <g-\rightHandFinger #3 >
1432 <c-\rightHandFinger #4 >
1433 <c,-\rightHandFinger #1 e-\rightHandFinger #2
1434 g-\rightHandFinger #3 c-\rightHandFinger #4 >1
1437 For convenience, you can abbreviate @code{\rightHandFinger} to something
1438 short, for example @code{RH},
1441 #(define RH rightHandFinger)
1447 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1448 {placement-of-right-hand-fingerings.ly}
1450 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1451 {fingerings,-string-indications,-and-right-hand-fingerings.ly}
1456 @rlsr{Fretted strings}.
1458 Internals Reference:
1459 @rinternals{StrokeFinger}.
1465 Most of the notational issues associated with guitar music are
1466 covered sufficiently in the general fretted strings section, but there
1467 are a few more worth covering here. Occasionally users want to
1468 create songbook-type documents having only lyrics with chord
1469 indications above them. Since LilyPond is a music typesetter,
1470 it is not recommended for documents that have no music notation
1471 in them. A better alternative is a word processor, text editor,
1472 or, for experienced users, a typesetter like GuitarTeX.
1475 * Indicating position and barring::
1476 * Indicating harmonics and dampened notes::
1477 * Indicating power chords::
1480 @node Indicating position and barring
1481 @unnumberedsubsubsec Indicating position and barring
1483 @cindex indicating position and barring for fretted instruments
1484 @cindex fretted instruments, indicating position and barring
1486 This example demonstrates how to include guitar position and
1487 barring indications.
1489 @lilypond[quote,ragged-right,verbatim,relative=0]
1493 \override TextSpanner #'(bound-details left text) = #"XII "
1495 b16 e g e b g\stopTextSpan
1502 @ref{Text spanners}.
1505 @rlsr{Fretted strings},
1506 @rlsr{Expressive marks}.
1509 @node Indicating harmonics and dampened notes
1510 @unnumberedsubsubsec Indicating harmonics and dampened notes
1512 @cindex fretted instruments, dampened notes
1513 @cindex fretted instruments, harmonics
1514 @cindex dampened notes on fretted instruments
1515 @cindex harmonics on fretted instruments
1517 Special note heads can be used to indicate dampened notes or
1518 harmonics. Harmonics are normally further explained with a
1521 @lilypond[quote,ragged-right,verbatim]
1524 \override Staff.NoteHead #'style = #'harmonic-mixed
1525 d^\markup { \italic { \fontsize #-2 { "harm. 12" }}} <g b>1
1529 Dampened notes (also called @notation{dead notes}) are supported
1530 within normal and tablature staves:
1532 @lilypond[quote,ragged-right,verbatim]
1533 music = \relative c' {
1534 < a\3 \deadNote c\2 a'\1 >4
1535 < b\3 \deadNote d\2 b'\1 >
1536 < c\3 \deadNote e\2 c'\1 >
1538 \times 2/3 { g8 b e }
1553 Another playing technique (especially used on electric guitars) is
1554 called @notation{palm mute}. The string is hereby partly muted by the
1555 palm of the striking hand (hence the name). Lilypond supports
1556 the notation of palm mute-style notes by changing the note head to a
1559 @lilypond[quote,ragged-right,verbatim]
1560 \new Voice { % Warning: explicit Voice instantiation is
1561 % required to have palmMuteOff work properly
1562 % when palmMuteOn comes at the beginning of
1567 e8^\markup { \musicglyph #"noteheads.u2do" = palm mute }
1570 e e \palmMute e e e |
1571 e8 \palmMute { e e e } e e e e |
1572 < \palmMute e b' e >8 \palmMute { e e e } < \palmMute e b' e >2
1579 @rlsr{Fretted strings}.
1582 @ref{Special note heads},
1583 @ref{Note head styles}.
1586 @node Indicating power chords
1587 @unnumberedsubsubsec Indicating power chords
1589 @funindex powerChords
1590 @funindex \powerChords
1592 @cindex power chords
1593 @cindex chords, power
1595 Power chords and their symbols can be engraved in chord mode or as chord
1598 @lilypond[quote,ragged-right,verbatim]
1599 ChordsAndSymbols = {
1604 \set minimumFret = #8
1608 \set minimumFret = #5
1628 Power chord symbols are automatically switched off as soon as one of the
1629 other common chord modifier is used:
1631 @lilypond[quote,ragged-right,verbatim]
1632 mixedChords = \chordmode {
1657 @rglos{power chord}.
1660 @ref{Extended and altered chords},
1661 @ref{Printing chord names}.
1664 @rlsr{Fretted strings}.
1671 * Banjo tablatures::
1674 @node Banjo tablatures
1675 @unnumberedsubsubsec Banjo tablatures
1677 @cindex banjo tablatures
1678 @cindex tablature, banjo
1680 LilyPond has basic support for the five-string banjo. When making tablatures
1681 for five-string banjo, use the banjo tablature format function to get
1682 correct fret numbers for the fifth string:
1684 @c due to crazy intervals of banjo music, absolute pitch is recommended
1686 @lilypond[quote,ragged-right,verbatim]
1688 \set TabStaff.tablatureFormat = #fret-number-tablature-format-banjo
1689 \set TabStaff.stringTunings = #banjo-open-g-tuning
1692 g8 d' g'\5 a b g e d' |
1693 g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
1699 @cindex banjo tunings
1700 @cindex tunings, banjo
1702 @funindex banjo-c-tuning
1703 @funindex banjo-modal-tuning
1704 @funindex banjo-open-d-tuning
1705 @funindex banjo-open-dm-tuning
1706 @funindex four-string-banjo
1708 A number of common tunings for banjo are predefined in LilyPond:
1709 @code{banjo-c-tuning} (gCGBD), @code{banjo-modal-tuning} (gDGCD),
1710 @code{banjo-open-d-tuning} (aDF#AD) and @code{banjo-open-dm-tuning}
1713 These tunings may be converted to four-string banjo tunings using the
1714 @code{four-string-banjo} function:
1717 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
1723 @rlsr{Fretted strings}.
1726 @file{scm/output-lib.scm} contains predefined banjo tunings.