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]
181 c8_.\<\( c16 c ~ c2\!
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]
207 c8_.\<\( c16 c ~ c2\!
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
253 Ties over a line break are parenthesized by default. The same holds for
254 the second alternative of a repeat.
256 @lilypond[quote,ragged-right,verbatim]
257 ties = \relative c' {
264 { g4\repeatTie c,2. }
291 @funindex \hideSplitTiedTabNotes
293 The command @code{\hideSplitTiedTabNotes} cancels the behavior of
294 engraving fret numbers in parentheses:
296 @lilypond[quote,ragged-right,verbatim]
297 ties = \relative c' {
303 { g4\repeatTie c,2. }
319 \hideSplitTiedTabNotes
331 @cindex harmonic indications in tablature notation
332 @cindex tablature and harmonic indications
333 @cindex slides in tablature notation
334 @cindex tablature and slides
336 Harmonic indications and slides can be added to tablature
339 @lilypond[verbatim, quote, relative=1]
342 <c g'\harmonic> d\2\glissando e\2
350 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
351 {stem-and-beam-behavior-in-tablature.ly}
353 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
354 {polyphony-in-tablature.ly}
362 @rlsr{Fretted strings}.
365 @rinternals{TabNoteHead},
366 @rinternals{TabStaff},
367 @rinternals{TabVoice},
373 Chords are not handled in a special way, and hence the automatic
374 string selector may easily select the same string for two notes in
377 In order to handle @code{\partcombine}, a @code{TabStaff} must use
378 specially-created voices:
380 @lilypond[quote,ragged-right,verbatim]
381 melodia = \partcombine { e4 g g g }{ e4 e e e }
384 \new TabVoice = "one" s1
385 \new TabVoice = "two" s1
386 \new TabVoice = "shared" s1
387 \new TabVoice = "solo" s1
393 Guitar special effects are limited to harmonics and slides.
395 @node Custom tablatures
396 @unnumberedsubsubsec Custom tablatures
398 @cindex tablatures, custom
399 @cindex tablature, banjo
400 @cindex tablature, mandolin
401 @cindex tablature, bass guitar
402 @cindex tablature, predefined string tunings
403 @cindex fretted instruments, predefined string tunings
404 @cindex predefined string tunings for fretted instruments
406 @funindex StringTunings
408 LilyPond tabulature automatically calculates the fret for
409 a note based on the string to which the note is assigned.
410 In order to do this, the tuning of the strings must be
411 specified. The tuning of the strings is given in the
412 @code{stringTunings} property.
414 LilyPond comes with predefined string tunings for banjo, mandolin,
415 guitar, bass guitar and ukulele. LilyPond automatically sets
416 the correct transposition for predefined tunings. The following
417 example is for bass guitar, which sounds an octave lower than
420 @lilypond[quote,ragged-right,verbatim]
429 \set TabStaff.stringTunings = #bass-tuning
437 The default string tuning is @code{guitar-tuning}, which
438 is the standard EADGBE tuning. Some other predefined tunings are
439 @code{guitar-open-g-tuning}, @code{mandolin-tuning} and
440 @code{banjo-open-g-tuning}. The predefined string tunings
441 are found in @code{scm/tablature.scm}.
443 A string tuning is a Scheme list of string pitches,
444 one for each string, ordered by string number from 1 to N,
445 where string 1 is at the top of the tablature staff and
446 string N is at the bottom. This ordinarily results in ordering
447 from highest pitch to lowest pitch, but some instruments
448 (e.g. ukulele) do not have strings ordered by pitch.
450 A string pitch in a string tuning list is the pitch difference
451 of the open string from middle C measured in semitones. The
452 string pitch must be an integer. LilyPond calculates the actual
453 pitch of the string by adding the string tuning pitch to the
454 actual pitch for middle C.
456 LilyPond automatically calculates the number of strings in the
457 @code{TabStaff} as the number of elements in @code{stringTunings}.
459 Any desired string tuning can be created. For example, we can
460 define a string tuning for a four-string instrument with pitches
461 of @code{a''}, @code{d''}, @code{g'}, and @code{c'}:
464 @lilypond[quote,verbatim]
476 \set TabStaff.stringTunings = #'(21 14 7 0)
482 @cindex moderntab clef
483 @cindex clef, moderntab
487 A modern tab clef can also be used.
489 @lilypond[quote,ragged-right,verbatim]
499 The modern tab clef supports tablatures from 4 to 7 strings.
503 @file{scm/@/tablature@/.scm}.
506 @rlsr{Fretted strings}.
509 @rinternals{Tab_note_heads_engraver}.
512 Automatic tablature calculations do not work properly in most
513 cases for instruments where string pitches do not vary
514 monotonically with string number, such as ukuleles.
516 @node Fret diagram markups
517 @unnumberedsubsubsec Fret diagram markups
519 @cindex fret diagrams
520 @cindex chord diagrams
521 @cindex diagrams, fret
522 @cindex diagrams, chord for fretted instruments
523 @cindex fret diagrams, custom
524 @cindex custom fret diagrams
526 Fret diagrams can be added to music as a markup to the desired
527 note. The markup contains information about the desired fret
528 diagram. There are three different fret-diagram markup
529 interfaces: standard, terse, and verbose. The three interfaces
530 produce equivalent markups, but have varying amounts of
531 information in the markup string. Details about the markup
532 interfaces are found at @ref{Text markup commands}.
534 The standard fret diagram markup string indicates the string
535 number and the fret number for each dot to be placed on the string.
536 In addition, open and unplayed (muted) strings can be indicated.
538 @lilypond[quote, verbatim]
540 \context ChordNames {
547 < c e g c' e' > 1 ^\markup
548 \fret-diagram #"6-x;5-3;4-2;3-o;2-1;1-o;"
549 < d a d' f'> ^\markup
550 \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-1;"
555 @cindex barre indications
557 Barre indications can be added to the diagram from
558 the fret-diagram markup string.
560 @lilypond[quote, verbatim]
562 \context ChordNames {
569 < f, c f a c' f'>1 ^\markup
570 \fret-diagram #"c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
571 < g, d g b d' g'> ^\markup
572 \fret-diagram #"c:6-1-3;6-3;5-5;4-5;3-4;2-3;1-3;"
577 @cindex fret-diagram markup
579 @funindex fret-diagram
580 @funindex \fret-diagram
582 The size of the fret diagram, and the number of frets in the diagram
583 can be changed in the fret-diagram markup string.
585 @lilypond[quote, verbatim]
587 \context ChordNames {
594 < f, c f a c' f'>1 ^\markup
595 \fret-diagram #"s:1.5;c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
596 < g, b, d g b g'> ^\markup
597 \fret-diagram #"h:6;6-3;5-2;4-o;3-o;2-o;1-3;"
602 The number of strings in a fret diagram can be changed to accomodate
603 different instruments such as banjos and ukuleles with the fret-diagram
606 @lilypond[quote, verbatim]
608 \context ChordNames {
614 %% An A chord for ukulele
615 a'1 ^\markup \fret-diagram #"w:4;4-2-2;3-1-1;2-o;1-o;"
620 Fingering indications can be added, and the location of fingering labels
621 can be controlled by the fret-diagram markup string.
623 @lilypond[quote, verbatim]
625 \context ChordNames {
632 < c e g c' e' > 1 ^\markup
633 \fret-diagram #"f:1;6-x;5-3-3;4-2-2;3-o;2-1-1;1-o;"
634 < d a d' f'> ^\markup
635 \fret-diagram #"f:2;6-x;5-x;4-o;3-2-2;2-3-3;1-1-1;"
640 Dot radius and dot position can be controlled with the fret-diagram
643 @lilypond[quote, verbatim]
645 \context ChordNames {
652 < c e g c' e' > 1 ^\markup
653 \fret-diagram #"d:0.35;6-x;5-3;4-2;3-o;2-1;1-o;"
654 < d a d' f'> ^\markup
655 \fret-diagram #"p:0.2;6-x;5-x;4-o;3-2;2-3;1-1;"
660 @cindex fret-diagram-terse markup
662 @funindex fret-diagram-terse
663 @funindex \fret-diagram-terse
665 The fret-diagram-terse markup string omits string numbers; the string
666 number is implied by the presence of semicolons. There is one semicolon
667 for each string in the diagram. The first semicolon corresponds to the
668 highest string number and the last semicolon corresponds to the first string.
669 Mute strings, open strings, and fret numbers can be indicated.
671 @lilypond[quote, verbatim]
673 \context ChordNames {
680 < c e g c' e' > 1 ^\markup
681 \fret-diagram-terse #"x;3;2;o;1;o;"
682 < d a d' f'> ^\markup
683 \fret-diagram-terse #"x;x;o;2;3;1;"
688 Barre indicators can be included in the fret-diagram-terse markup string.
690 @lilypond[quote, verbatim]
692 \context ChordNames {
699 < f, c f a c' f'>1 ^\markup
700 \fret-diagram-terse #"1-(;3;3;2;1;1-);"
701 < g, d g b d' g'> ^\markup
702 \fret-diagram-terse #"3-(;5;5;4;3;3-);"
707 Fingering indications can be included in the fret-diagram-terse markup string.
709 @c Need to use override to enable fingerings to show this -- can we do so?
710 @lilypond[quote, verbatim]
712 \context ChordNames {
718 \override Voice.TextScript
719 #'(fret-diagram-details finger-code) = #'below-string
721 < c e g c' e' > 1 ^\markup
722 \fret-diagram-terse #"x;3-3;2-2;o;1-1;o;"
723 < d a d' f'> ^\markup
724 \fret-diagram-terse #"x;x;o;2-2;3-3;1-1;"
729 Other fret diagram properties must be adjusted using @code{\override} when using
730 the fret-diagram-terse markup.
732 @cindex fret-diagram-verbose markup
734 @funindex fret-diagram-verbose
735 @funindex \fret-diagram-verbose
737 The fret-diagram-verbose markup string is in the format of a Scheme list. Each
738 element of the list indicates an item to be placed on the fret diagram.
740 @lilypond[quote, verbatim]
741 << \context ChordNames {
748 < c e g c' e' > 1 ^\markup
749 \fret-diagram-verbose #'(
757 < d a d' f'> ^\markup
758 \fret-diagram-verbose #'(
770 Fingering indications and barres can be included in a
771 fret-diagram-verbose markup string. Unique to the
772 fret-diagram-verbose interface is a capo indication that
773 can be placed on the fret diagram. The capo indication is
774 a thick bar that covers all strings. The fret with the
775 capo will be the lowest fret in the fret diagram.
777 @c \override is necessary to make fingering visible
778 @lilypond[quote, verbatim]
780 \context ChordNames {
787 \override Voice.TextScript
788 #'(fret-diagram-details finger-code) = #'below-string
790 < f, c f a c' f'>1 ^\markup
791 \fret-diagram-verbose #'(
800 < g, b, d g b g'> ^\markup
801 \fret-diagram-verbose #'(
809 < c e g c' e'> ^\markup
810 \fret-diagram-verbose #'(
821 All other fret diagram properties must be adjusted using @code{\override}
822 when using the fret-diagram-verbose markup.
825 The following example shows the three fret-diagram markup
826 interfaces, along with examples of common tweaks. For example,
827 the size of the verbose fret diagram is reduced to 0.75, and the
828 finger indications are specified to appear below the diagram. The
829 terse diagram includes tweaks to specify placement of finger code
832 @lilypond[verbatim,ragged-right,quote]
835 d^\markup \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
837 fis^\markup \override #'(size . 0.75) {
838 \override #'(finger-code . below-string) {
839 \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
848 c^\markup \override #'(dot-radius . 0.35) {
849 \override #'(finger-code . in-dot) {
850 \override #'(dot-color . white) {
851 \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
860 @cindex customized fret diagram
861 @cindex fret diagram, customized
862 @cindex diagram, fret, customized
864 @funindex fret-diagram-interface
866 The graphical layout of a fret diagram can be customized according to
867 user preference through the properties of the @code{fret-diagram-interface}.
868 Details are found at @rinternals{fret-diagram-interface}. For a fret diagram
869 markup, the interface properties belong to @code{Voice.TextScript}.
873 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
874 {customizing-markup-fret-diagrams.ly}
879 @ref{Text markup commands}.
882 @rlsr{Fretted strings}.
885 @rinternals{fret-diagram-interface}.
888 @node Predefined fret diagrams
889 @unnumberedsubsubsec Predefined fret diagrams
892 @cindex fret diagrams
893 @cindex chord diagrams
896 @funindex stringTunings
898 Fret diagrams can be displayed using the @code{FretBoards} context. By
899 default, the @code{FretBoards} context will display fret diagrams that
900 are stored in a lookup table:
902 @lilypond[verbatim, ragged-right, quote]
903 \include "predefined-guitar-fretboards.ly"
904 \context FretBoards {
911 The default predefined fret diagrams are contained in the file
912 @code{predefined-guitar-fretboards.ly}. Fret diagrams are
913 stored based on the pitches of a chord and the value of
914 @code{stringTunings} that is currently in use.
915 @code{predefined-guitar-fretboards.ly} contains predefined
916 fret diagrams only for @code{guitar-tuning}. Predefined fret
917 diagrams can be added for other instruments or other tunings
918 by following the examples found in
919 @code{predefined-guitar-fretboards.ly}.
921 Fret diagrams for the ukulele are contained in the file
922 @code{predefined-ukulele-fretboards.ly}.
924 @lilypond[verbatim, ragged-right, quote]
925 \include "predefined-ukulele-fretboards.ly"
927 myChords = \chordmode { a1 a:m a:aug }
934 \set stringTunings = #ukulele-tuning
939 Chord pitches can be entered
940 either as simultaneous music or using chord mode (see
941 @ref{Chord mode overview}).
943 @lilypond[verbatim, ragged-right,quote]
944 \include "predefined-guitar-fretboards.ly"
945 \context FretBoards {
951 @cindex chord names with fret diagrams
952 @cindex fret diagrams with chord names
958 It is common that both chord names and fret diagrams are displayed together.
959 This is achieved by putting a @code{ChordNames} context in parallel with
960 a @code{FretBoards} context and giving both contexts the same music.
962 @lilypond[verbatim, ragged-right, quote]
963 \include "predefined-guitar-fretboards.ly"
964 mychords = \chordmode{
969 \context ChordNames {
972 \context FretBoards {
978 @cindex transposing fret diagrams
979 @cindex fret diagrams, transposing
980 @cindex diagrams, fret, transposing
982 Predefined fret diagrams are transposable, as long as a diagram for the
983 transposed chord is stored in the fret diagram table.
985 @lilypond[verbatim, ragged-right, quote]
986 \include "predefined-guitar-fretboards.ly"
987 mychords = \chordmode{
993 \transpose c e { \mychords}
996 \context ChordNames {
999 \context FretBoards {
1006 The predefined fret diagram table for guitar contains eight chords (major, minor,
1007 augmented, diminished, dominant seventh, major seventh, minor seventh, dominant ninth)
1008 for each of 17 keys.
1009 The predefined fret diagram table for ukulele contains these chords
1010 plus an additional three chords (major sixth, suspended second, and
1012 A complete list of the predefined fret diagrams is
1013 shown in @ref{Predefined fretboard diagrams}. If there is no entry in
1014 the table for a chord, the FretBoards engraver will calculate a
1015 fret-diagram using the automatic fret diagram functionality described in
1016 @ref{Automatic fret diagrams}.
1018 @lilypond[verbatim, ragged-right, quote]
1019 \include "predefined-guitar-fretboards.ly"
1020 mychords = \chordmode{
1025 \context ChordNames {
1028 \context FretBoards {
1034 @cindex fret diagrams, adding custom
1035 @cindex custom fret diagrams, adding
1036 @cindex adding custom fret diagrams
1038 Fret diagrams can be added to the fret diagram table. To add a diagram,
1039 you must specify the chord for the diagram, the tuning to be used, and
1040 a definition for the diagram. The diagram definition can be either a
1041 fret-diagram-terse definition string or a fret-diagram-verbose
1044 @lilypond[verbatim, ragged-right, quote]
1045 \include "predefined-guitar-fretboards.ly"
1047 \storePredefinedDiagram \chordmode {c:maj9}
1051 mychords = \chordmode{
1056 \context ChordNames {
1059 \context FretBoards {
1065 Different fret diagrams for the same chord name can be stored using different
1066 octaves of pitches. The different octave should be at least two octaves
1067 above or below the default octave, because the octaves above and below the
1068 default octave are used for transposing fretboards.
1070 @lilypond[verbatim, ragged-right, quote]
1071 \include "predefined-guitar-fretboards.ly"
1073 \storePredefinedDiagram \chordmode {c''}
1075 #(offset-fret 2 (chord-shape 'bes guitar-tuning))
1077 mychords = \chordmode{
1082 \context ChordNames {
1085 \context FretBoards {
1091 @cindex fretted instruments, chord shapes
1092 @cindex chord shapes for fretted instruments
1094 @funindex \addChordShape
1095 @funindex add ChordShape
1096 @funindex storePredefinedDiagram
1097 @funindex \storePredefinedDiagram
1099 In addition to fret diagrams, LilyPond stores an internal list of chord
1100 shapes. The chord shapes are fret diagrams that can be shifted along
1101 the neck to different posistions to provide different chords. Chord
1102 shapes can be added to the internal list and then used to define
1103 predefined fret diagrams. Because they can be moved to various
1104 positions on the neck, chord shapes will normally not contain
1105 any open strings. Like fret diagrams, chord shapes can be
1106 entered as either fret-diagram-terse strings or fret-diagram-verbose
1109 @lilypond[verbatim, ragged-right, quote]
1110 \include "predefined-guitar-fretboards.ly"
1112 % add a new chord shape
1114 \addChordShape #'powerf #guitar-tuning #"1-1;3-3;3-4;x;x;x;"
1116 % add some new chords based on the power chord shape
1118 \storePredefinedDiagram \chordmode {f''}
1120 #(chord-shape 'powerf guitar-tuning)
1121 \storePredefinedDiagram \chordmode {g''}
1123 #(offset-fret 2 (chord-shape 'powerf guitar-tuning))
1125 mychords = \chordmode{
1130 \context ChordNames {
1133 \context FretBoards {
1139 The graphical layout of a fret diagram can be customized according to
1140 user preference through the properties of the @code{fret-diagram-interface}.
1141 Details are found at @rinternals{fret-diagram-interface}. For a
1142 predefined fret diagram, the interface properties belong to
1143 @code{FretBoards.FretBoard}.
1147 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1148 {customizing-fretboard-fret-diagrams.ly}
1150 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1151 {defining-predefined-fretboards-for-other-instruments.ly}
1153 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1154 {chordchanges-for-fretboards.ly}
1159 @ref{Custom tablatures},
1160 @ref{Automatic fret diagrams},
1161 @ref{Chord mode overview},
1162 @ref{Predefined fretboard diagrams}.
1165 @file{ly/@/predefined@/-guitar@/-fretboards@/.ly},
1166 @file{ly/@/predefined@/-guitar@/-ninth@/-fretboards@/.ly}.
1169 @rlsr{Fretted strings}.
1171 Internals Reference:
1172 @rinternals {fret-diagram-interface}.
1175 @node Automatic fret diagrams
1176 @unnumberedsubsubsec Automatic fret diagrams
1178 @cindex fret diagrams, automatic
1179 @cindex chord diagrams, automatic
1180 @cindex automatic fret diagrams
1181 @cindex automatic chord diagrams
1183 Fret diagrams can be automatically created from entered notes using the
1184 @code{FretBoards} context. If no predefined diagram is available for
1185 the entered notes in the active @code{stringTunings}, this context
1186 calculates strings and frets that can be used to play the notes.
1188 @lilypond[quote,ragged-right,verbatim]
1190 \context ChordNames {
1195 \context FretBoards {
1207 @funindex predefinedFretboardsOff
1208 @funindex \predefinedFretboardsOff
1209 @funindex predefinedFretboardsOn
1210 @funindex \predefinedFretboardsOn
1212 As no predefined diagrams are loaded by default, automatic calculation
1213 of fret diagrams is the default behavior. Once default diagrams are
1214 loaded, automatic calculation can be enabled and disabled with predefined
1217 @lilypond[quote,ragged-right,verbatim]
1219 \storePredefinedDiagram <c e g c' e'>
1221 #"x;3-1-(;5-2;5-3;5-4;3-1-1);"
1223 \context ChordNames {
1228 \context FretBoards {
1230 \predefinedFretboardsOff
1232 \predefinedFretboardsOn
1246 Sometimes the fretboard calculator will be unable to find
1247 an acceptable diagram. This can often be remedied by
1248 manually assigning a note to a string. In many cases, only one
1249 note need be manually placed on a string; the rest of
1250 the notes will then be placed appropriately by the @code{FretBoards}
1253 @cindex fret diagrams, adding fingerings
1254 @cindex fingerings, adding to fret diagrams
1256 Fingerings can be added to FretBoard fret diagrams.
1258 @lilypond[quote, verbatim]
1260 \context ChordNames {
1265 \context FretBoards {
1266 < c-3 e-2 g c'-1 e' > 1
1277 The minimum fret to be used in calculating strings and frets for
1278 the FretBoard context can be set with the @code{minimumFret}
1281 @lilypond[quote, verbatim]
1283 \context ChordNames {
1288 \context FretBoards {
1290 \set FretBoards.minimumFret = #5
1301 The strings and frets for the @code{FretBoards} context depend
1302 on the @code{stringTunings} property, which has the same meaning
1303 as in the TabStaff context. See @ref{Custom tablatures} for
1304 information on the @code{stringTunings} property.
1306 The graphical layout of a fret diagram can be customized according to
1307 user preference through the properties of the @code{fret-diagram-interface}.
1308 Details are found at @rinternals{fret-diagram-interface}. For a
1309 @code{FretBoards} fret diagram, the interface properties belong to
1310 @code{FretBoards.FretBoard}.
1314 @code{\predefinedFretboardsOff},
1315 @code{\predefinedFretboardsOn}.
1321 @ref{Custom tablatures}.
1324 @rlsr{Fretted strings}.
1326 Internals Reference:
1327 @rinternals {fret-diagram-interface}.
1330 Automatic fretboard calculations do not work properly for instruments
1331 with non-monotonic tunings.
1334 @node Right-hand fingerings
1335 @unnumberedsubsubsec Right-hand fingerings
1337 @cindex fretted instruments, right hand fingerings
1338 @cindex fingerings, right hand for fretted instruments
1339 @cindex right hand fingerings for fretted instruments
1341 @funindex rightHandFinger
1342 @funindex \rightHandFinger
1344 Right-hand fingerings @var{p-i-m-a} must be entered within a
1345 chord construct @code{<>} for them to be printed in the score,
1346 even when applied to a single note.
1348 @warning{There @strong{must} be a hyphen before
1349 @code{@bs{}rightHandFinger} and a space before the closing @code{>}.}
1351 @lilypond[quote,verbatim,relative=0]
1353 <c-\rightHandFinger #1 >4
1354 <e-\rightHandFinger #2 >
1355 <g-\rightHandFinger #3 >
1356 <c-\rightHandFinger #4 >
1357 <c,-\rightHandFinger #1 e-\rightHandFinger #2
1358 g-\rightHandFinger #3 c-\rightHandFinger #4 >1
1361 For convenience, you can abbreviate @code{\rightHandFinger} to something
1362 short, for example @code{RH},
1365 #(define RH rightHandFinger)
1371 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1372 {placement-of-right-hand-fingerings.ly}
1374 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1375 {fingerings,-string-indications,-and-right-hand-fingerings.ly}
1380 @rlsr{Fretted strings}.
1382 Internals Reference:
1383 @rinternals{StrokeFinger}.
1389 Most of the notational issues associated with guitar music are
1390 covered sufficiently in the general fretted strings section, but there
1391 are a few more worth covering here. Occasionally users want to
1392 create songbook-type documents having only lyrics with chord
1393 indications above them. Since LilyPond is a music typesetter,
1394 it is not recommended for documents that have no music notation
1395 in them. A better alternative is a word processor, text editor,
1396 or, for experienced users, a typesetter like GuitarTeX.
1399 * Indicating position and barring::
1400 * Indicating harmonics and dampened notes::
1403 @node Indicating position and barring
1404 @unnumberedsubsubsec Indicating position and barring
1406 @cindex indicating position and barring for fretted instruments
1407 @cindex fretted instruments, indicating position and barring
1409 This example demonstrates how to include guitar position and
1410 barring indications.
1412 @lilypond[quote,ragged-right,fragment,verbatim,relative=0]
1416 \override TextSpanner #'(bound-details left text) = #"XII "
1418 b16 e g e b g\stopTextSpan
1425 @ref{Text spanners}.
1428 @rlsr{Fretted strings},
1429 @rlsr{Expressive marks}.
1432 @node Indicating harmonics and dampened notes
1433 @unnumberedsubsubsec Indicating harmonics and dampened notes
1435 @cindex fretted instruments, dampened notes
1436 @cindex fretted instruments, harmonics
1437 @cindex dampened notes on fretted instruments
1438 @cindex harmonics on fretted instruments
1440 Special note heads can be used to indicate dampened notes or
1441 harmonics. Harmonics are normally further explained with a
1444 @lilypond[quote,ragged-right,verbatim]
1447 \override Staff.NoteHead #'style = #'cross
1449 \override Staff.NoteHead #'style = #'harmonic-mixed
1450 d^\markup { \italic { \fontsize #-2 { "harm. 12" }}} <g b>1
1457 @rlsr{Fretted strings}.
1460 @ref{Special note heads},
1461 @ref{Note head styles}.
1468 * Banjo tablatures::
1471 @node Banjo tablatures
1472 @unnumberedsubsubsec Banjo tablatures
1474 @cindex banjo tablatures
1475 @cindex tablature, banjo
1477 LilyPond has basic support for the five-string banjo. When making tablatures
1478 for five-string banjo, use the banjo tablature format function to get
1479 correct fret numbers for the fifth string:
1481 @c due to crazy intervals of banjo music, absolute pitch is recommended
1483 @lilypond[quote,ragged-right,fragment,verbatim]
1485 \set TabStaff.tablatureFormat = #fret-number-tablature-format-banjo
1486 \set TabStaff.stringTunings = #banjo-open-g-tuning
1489 g8 d' g'\5 a b g e d' |
1490 g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
1496 @cindex banjo tunings
1497 @cindex tunings, banjo
1499 @funindex banjo-c-tuning
1500 @funindex banjo-modal-tuning
1501 @funindex banjo-open-d-tuning
1502 @funindex banjo-open-dm-tuning
1503 @funindex four-string-banjo
1505 A number of common tunings for banjo are predefined in LilyPond:
1506 @code{banjo-c-tuning} (gCGBD), @code{banjo-modal-tuning} (gDGCD),
1507 @code{banjo-open-d-tuning} (aDF#AD) and @code{banjo-open-dm-tuning}
1510 These tunings may be converted to four-string banjo tunings using the
1511 @code{four-string-banjo} function:
1514 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
1520 @rlsr{Fretted strings}.
1523 @file{scm/@/output@/-lib@/.scm} contains predefined banjo tunings.