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 Some other elements pertinent to fretted string instruments
60 are covered elsewhere:
63 @item Fingerings are indicated as shown in @ref{Fingering instructions}.
65 @item Instructions for @notation{Laissez vibrer} ties
66 as well as ties on arpeggios and tremolos can be found in
69 @item Instructions for handling multiple voices can be found
70 in @ref{Collision resolution}.
72 @item Instructions for indicating harmonics can be found in
80 @ref{Fingering instructions},
82 @ref{Collision resolution},
83 @ref{Instrument names},
84 @ref{Writing music in parallel},
86 @ref{List of articulations},
90 @node String number indications
91 @unnumberedsubsubsec String number indications
93 @cindex string numbers
94 @cindex string vs. fingering numbers
95 @cindex fingering vs. string numbers
97 The string on which a note should be played may be indicated by
98 appending @code{\@var{number}} to a note inside a chord construct
101 @warning{String numbers @strong{must} be defined inside a chord
102 construct even if there is only a single note.}
104 @lilypond[verbatim,quote,relative=0]
110 When fingerings and string indications are used together, their
111 placement is controlled by the order in which the two items appear
114 @lilypond[verbatim,quote,relative=1]
122 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
123 {controlling-the-placement-of-chord-fingerings.ly}
125 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
126 {allowing-fingerings-to-be-printed-inside-the-staff.ly}
131 @ref{Fingering instructions}.
134 @rlsr{Fretted strings}.
137 @rinternals{StringNumber},
138 @rinternals{Fingering}.
141 @node Default tablatures
142 @unnumberedsubsubsec Default tablatures
144 @cindex tablatures, basic
145 @cindex tablatures, default
150 Music for plucked string instruments is frequently notated using a
151 finger/touch notation or tablature. In contrast to traditional
152 notation pitches are not denoted with note heads, but by numbers (or
153 letterlike symbols in historical intavolatura). The numbers
154 indicate on which string and fret a note must be played. The numbers
155 are printed on top of each other if they are to be played
158 By default, string 1 is the highest, and the tuning defaults to the
159 standard guitar tuning (with 6 strings). The notes are printed as
160 tablature, by using @code{TabStaff} and @code{TabVoice} contexts. A
161 calligraphic tablature clef is added automatically.
163 @lilypond[quote,ragged-right,verbatim]
164 \new TabStaff \relative c' {
170 Default tablatures do not contain any symbols for tone duration nor any
171 other musical symbols such as e.g. expressive marks.
173 @lilypond[quote,ragged-right,verbatim]
179 c8_.\<\( c16 c ~ c2\!
185 \new Staff { \clef "G_8" \symbols }
186 \new TabStaff { \symbols }
191 @funindex \tabFullNotation
193 If all musical symbols used in traditional notation should also show up
194 in tablature one has to apply the command @code{\tabFullNotation} in a
195 @code{TabStaff}-context. Please bear in mind that half notes are
196 double-stemmed in tablature in order to distinguish them from quarter
199 @lilypond[quote,ragged-right,verbatim]
205 c8_.\<\( c16 c ~ c2\!
219 @funindex minimumFret
221 By default pitches are assigned to the lowest playing position on the
222 fret-board (first position). Open strings are automatically preferred.
223 If you would like a certain pitch to be played on a specific string
224 you can add a string number indication to the pitch name. If you
225 define pitch names and string numbers without a chord construct
226 (@code{<>}) the string number indications do not appear in traditional
227 notation. It is much more comfortable to define the playing position
228 by using the value of @code{minimumFret}. The default value for
232 @lilypond[quote,ragged-right,verbatim]
234 \new Staff \relative c {
238 c,16\5 d\5 e\4 f\4 g4\4
241 \new TabStaff \relative c {
243 c,16\5 d\5 e\4 f\4 g4\4
244 \set TabStaff.minimumFret = #5
251 Ties over a line break are parenthesized by default. The same holds for
252 the second alternative of a repeat.
254 @lilypond[quote,ragged-right,verbatim]
255 ties = \relative c' {
262 { g4\repeatTie c,2. }
289 @funindex \hideSplitTiedTabNotes
291 The command @code{\hideSplitTiedTabNotes} cancels the behavior of
292 engraving fret numbers in parentheses:
294 @lilypond[quote,ragged-right,verbatim]
295 ties = \relative c' {
301 { g4\repeatTie c,2. }
317 \hideSplitTiedTabNotes
329 @cindex harmonic indications in tablature notation
330 @cindex tablature and harmonic indications
331 @cindex slides in tablature notation
332 @cindex tablature and slides
334 Harmonic indications and slides can be added to tablature
337 @lilypond[verbatim, quote, relative=1]
340 <c g'\harmonic> d\2\glissando e\2
348 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
349 {stem-and-beam-behavior-in-tablature.ly}
351 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
352 {polyphony-in-tablature.ly}
360 @rlsr{Fretted strings}.
363 @rinternals{TabNoteHead},
364 @rinternals{TabStaff},
365 @rinternals{TabVoice},
371 Chords are not handled in a special way, and hence the automatic
372 string selector may easily select the same string for two notes in
375 In order to handle @code{\partcombine}, a @code{TabStaff} must use
376 specially-created voices:
378 @lilypond[quote,ragged-right,verbatim]
379 melodia = \partcombine { e4 g g g }{ e4 e e e }
382 \new TabVoice = "one" s1
383 \new TabVoice = "two" s1
384 \new TabVoice = "shared" s1
385 \new TabVoice = "solo" s1
391 Guitar special effects are limited to harmonics and slides.
393 @node Custom tablatures
394 @unnumberedsubsubsec Custom tablatures
396 @cindex tablatures, custom
397 @cindex tablature, banjo
398 @cindex tablature, mandolin
399 @cindex tablature, bass guitar
400 @cindex tablature, predefined string tunings
401 @cindex fretted instruments, predefined string tunings
402 @cindex predefined string tunings for fretted instruments
404 @funindex StringTunings
406 LilyPond tabulature automatically calculates the fret for
407 a note based on the string to which the note is assigned.
408 In order to do this, the tuning of the strings must be
409 specified. The tuning of the strings is given in the
410 @code{stringTunings} property.
412 LilyPond comes with predefined string tunings for banjo, mandolin,
413 guitar, bass guitar and ukulele. LilyPond automatically sets
414 the correct transposition for predefined tunings. The following
415 example is for bass guitar, which sounds an octave lower than
418 @lilypond[quote,ragged-right,verbatim]
427 \set TabStaff.stringTunings = #bass-tuning
435 The default string tuning is @code{guitar-tuning}, which
436 is the standard EADGBE tuning. Some other predefined tunings are
437 @code{guitar-open-g-tuning}, @code{mandolin-tuning} and
438 @code{banjo-open-g-tuning}. The predefined string tunings
439 are found in @code{scm/tablature.scm}.
441 A string tuning is a Scheme list of string pitches,
442 one for each string, ordered by string number from 1 to N,
443 where string 1 is at the top of the tablature staff and
444 string N is at the bottom. This ordinarily results in ordering
445 from highest pitch to lowest pitch, but some instruments
446 (e.g. ukulele) do not have strings ordered by pitch.
448 A string pitch in a string tuning list is the pitch difference
449 of the open string from middle C measured in semitones. The
450 string pitch must be an integer. LilyPond calculates the actual
451 pitch of the string by adding the string tuning pitch to the
452 actual pitch for middle C.
454 LilyPond automatically calculates the number of strings in the
455 @code{TabStaff} as the number of elements in @code{stringTunings}.
457 Any desired string tuning can be created. For example, we can
458 define a string tuning for a four-string instrument with pitches
459 of @code{a''}, @code{d''}, @code{g'}, and @code{c'}:
462 @lilypond[quote,verbatim]
474 \set TabStaff.stringTunings = #'(21 14 7 0)
480 @cindex moderntab clef
481 @cindex clef, moderntab
485 A modern tab clef can also be used.
487 @lilypond[quote,ragged-right,verbatim]
497 The modern tab clef supports tablatures from 4 to 7 strings.
501 @file{scm/@/tablature@/.scm}.
504 @rlsr{Fretted strings}.
507 @rinternals{Tab_note_heads_engraver}.
510 Automatic tablature calculations do not work properly in most
511 cases for instruments where string pitches do not vary
512 monotonically with string number, such as ukuleles.
514 @node Fret diagram markups
515 @unnumberedsubsubsec Fret diagram markups
517 @cindex fret diagrams
518 @cindex chord diagrams
519 @cindex diagrams, fret
520 @cindex diagrams, chord for fretted instruments
521 @cindex fret diagrams, custom
522 @cindex custom fret diagrams
524 Fret diagrams can be added to music as a markup to the desired
525 note. The markup contains information about the desired fret
526 diagram. There are three different fret-diagram markup
527 interfaces: standard, terse, and verbose. The three interfaces
528 produce equivalent markups, but have varying amounts of
529 information in the markup string. Details about the markup
530 interfaces are found at @ref{Text markup commands}.
532 The standard fret diagram markup string indicates the string
533 number and the fret number for each dot to be placed on the string.
534 In addition, open and unplayed (muted) strings can be indicated.
536 @lilypond[quote, verbatim]
538 \context ChordNames {
545 < c e g c' e' > 1 ^\markup
546 \fret-diagram #"6-x;5-3;4-2;3-o;2-1;1-o;"
547 < d a d' f'> ^\markup
548 \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-1;"
553 @cindex barre indications
555 Barre indications can be added to the diagram from
556 the fret-diagram markup string.
558 @lilypond[quote, verbatim]
560 \context ChordNames {
567 < f, c f a c' f'>1 ^\markup
568 \fret-diagram #"c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
569 < g, d g b d' g'> ^\markup
570 \fret-diagram #"c:6-1-3;6-3;5-5;4-5;3-4;2-3;1-3;"
575 @cindex fret-diagram markup
577 @funindex fret-diagram
578 @funindex \fret-diagram
580 The size of the fret diagram, and the number of frets in the diagram
581 can be changed in the fret-diagram markup string.
583 @lilypond[quote, verbatim]
585 \context ChordNames {
592 < f, c f a c' f'>1 ^\markup
593 \fret-diagram #"s:1.5;c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
594 < g, b, d g b g'> ^\markup
595 \fret-diagram #"h:6;6-3;5-2;4-o;3-o;2-o;1-3;"
600 The number of strings in a fret diagram can be changed to accomodate
601 different instruments such as banjos and ukuleles with the fret-diagram
604 @lilypond[quote, verbatim]
606 \context ChordNames {
612 %% An A chord for ukulele
613 a'1 ^\markup \fret-diagram #"w:4;4-2-2;3-1-1;2-o;1-o;"
618 Fingering indications can be added, and the location of fingering labels
619 can be controlled by the fret-diagram markup string.
621 @lilypond[quote, verbatim]
623 \context ChordNames {
630 < c e g c' e' > 1 ^\markup
631 \fret-diagram #"f:1;6-x;5-3-3;4-2-2;3-o;2-1-1;1-o;"
632 < d a d' f'> ^\markup
633 \fret-diagram #"f:2;6-x;5-x;4-o;3-2-2;2-3-3;1-1-1;"
638 Dot radius and dot position can be controlled with the fret-diagram
641 @lilypond[quote, verbatim]
643 \context ChordNames {
650 < c e g c' e' > 1 ^\markup
651 \fret-diagram #"d:0.35;6-x;5-3;4-2;3-o;2-1;1-o;"
652 < d a d' f'> ^\markup
653 \fret-diagram #"p:0.2;6-x;5-x;4-o;3-2;2-3;1-1;"
658 @cindex fret-diagram-terse markup
660 @funindex fret-diagram-terse
661 @funindex \fret-diagram-terse
663 The fret-diagram-terse markup string omits string numbers; the string
664 number is implied by the presence of semicolons. There is one semicolon
665 for each string in the diagram. The first semicolon corresponds to the
666 highest string number and the last semicolon corresponds to the first string.
667 Mute strings, open strings, and fret numbers can be indicated.
669 @lilypond[quote, verbatim]
671 \context ChordNames {
678 < c e g c' e' > 1 ^\markup
679 \fret-diagram-terse #"x;3;2;o;1;o;"
680 < d a d' f'> ^\markup
681 \fret-diagram-terse #"x;x;o;2;3;1;"
686 Barre indicators can be included in the fret-diagram-terse markup string.
688 @lilypond[quote, verbatim]
690 \context ChordNames {
697 < f, c f a c' f'>1 ^\markup
698 \fret-diagram-terse #"1-(;3;3;2;1;1-);"
699 < g, d g b d' g'> ^\markup
700 \fret-diagram-terse #"3-(;5;5;4;3;3-);"
705 Fingering indications can be included in the fret-diagram-terse markup string.
707 @c Need to use override to enable fingerings to show this -- can we do so?
708 @lilypond[quote, verbatim]
710 \context ChordNames {
716 \override Voice.TextScript
717 #'(fret-diagram-details finger-code) = #'below-string
719 < c e g c' e' > 1 ^\markup
720 \fret-diagram-terse #"x;3-3;2-2;o;1-1;o;"
721 < d a d' f'> ^\markup
722 \fret-diagram-terse #"x;x;o;2-2;3-3;1-1;"
727 Other fret diagram properties must be adjusted using @code{\override} when using
728 the fret-diagram-terse markup.
730 @cindex fret-diagram-verbose markup
732 @funindex fret-diagram-verbose
733 @funindex \fret-diagram-verbose
735 The fret-diagram-verbose markup string is in the format of a Scheme list. Each
736 element of the list indicates an item to be placed on the fret diagram.
738 @lilypond[quote, verbatim]
739 << \context ChordNames {
746 < c e g c' e' > 1 ^\markup
747 \fret-diagram-verbose #'(
755 < d a d' f'> ^\markup
756 \fret-diagram-verbose #'(
768 Fingering indications and barres can be included in a
769 fret-diagram-verbose markup string. Unique to the
770 fret-diagram-verbose interface is a capo indication that
771 can be placed on the fret diagram. The capo indication is
772 a thick bar that covers all strings. The fret with the
773 capo will be the lowest fret in the fret diagram.
775 @c \override is necessary to make fingering visible
776 @lilypond[quote, verbatim]
778 \context ChordNames {
785 \override Voice.TextScript
786 #'(fret-diagram-details finger-code) = #'below-string
788 < f, c f a c' f'>1 ^\markup
789 \fret-diagram-verbose #'(
798 < g, b, d g b g'> ^\markup
799 \fret-diagram-verbose #'(
807 < c e g c' e'> ^\markup
808 \fret-diagram-verbose #'(
819 All other fret diagram properties must be adjusted using @code{\override}
820 when using the fret-diagram-verbose markup.
823 The following example shows the three fret-diagram markup
824 interfaces, along with examples of common tweaks. For example,
825 the size of the verbose fret diagram is reduced to 0.75, and the
826 finger indications are specified to appear below the diagram. The
827 terse diagram includes tweaks to specify placement of finger code
830 @lilypond[verbatim,ragged-right,quote]
833 d^\markup \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
835 fis^\markup \override #'(size . 0.75) {
836 \override #'(finger-code . below-string) {
837 \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
846 c^\markup \override #'(dot-radius . 0.35) {
847 \override #'(finger-code . in-dot) {
848 \override #'(dot-color . white) {
849 \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
858 @cindex customized fret diagram
859 @cindex fret diagram, customized
860 @cindex diagram, fret, customized
862 @funindex fret-diagram-interface
864 The graphical layout of a fret diagram can be customized according to
865 user preference through the properties of the @code{fret-diagram-interface}.
866 Details are found at @rinternals{fret-diagram-interface}. For a fret diagram
867 markup, the interface properties belong to @code{Voice.TextScript}.
871 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
872 {customizing-markup-fret-diagrams.ly}
877 @ref{Text markup commands}.
880 @rlsr{Fretted strings}.
883 @rinternals{fret-diagram-interface}.
886 @node Predefined fret diagrams
887 @unnumberedsubsubsec Predefined fret diagrams
890 @cindex fret diagrams
891 @cindex chord diagrams
894 @funindex stringTunings
896 Fret diagrams can be displayed using the @code{FretBoards} context. By
897 default, the @code{FretBoards} context will display fret diagrams that
898 are stored in a lookup table:
900 @lilypond[verbatim, ragged-right, quote]
901 \include "predefined-guitar-fretboards.ly"
902 \context FretBoards {
909 The default predefined fret diagrams are contained in the file
910 @code{predefined-guitar-fretboards.ly}. Fret diagrams are
911 stored based on the pitches of a chord and the value of
912 @code{stringTunings} that is currently in use.
913 @code{predefined-guitar-fretboards.ly} contains predefined
914 fret diagrams only for @code{guitar-tuning}. Predefined fret
915 diagrams can be added for other instruments or other tunings
916 by following the examples found in
917 @code{predefined-guitar-fretboards.ly}.
919 Fret diagrams for the ukulele are contained in the file
920 @code{predefined-ukulele-fretboards.ly}.
922 @lilypond[verbatim, ragged-right, quote]
923 \include "predefined-ukulele-fretboards.ly"
925 myChords = \chordmode { a1 a:m a:aug }
932 \set stringTunings = #ukulele-tuning
937 Chord pitches can be entered
938 either as simultaneous music or using chord mode (see
939 @ref{Chord mode overview}).
941 @lilypond[verbatim, ragged-right,quote]
942 \include "predefined-guitar-fretboards.ly"
943 \context FretBoards {
949 @cindex chord names with fret diagrams
950 @cindex fret diagrams with chord names
956 It is common that both chord names and fret diagrams are displayed together.
957 This is achieved by putting a @code{ChordNames} context in parallel with
958 a @code{FretBoards} context and giving both contexts the same music.
960 @lilypond[verbatim, ragged-right, quote]
961 \include "predefined-guitar-fretboards.ly"
962 mychords = \chordmode{
967 \context ChordNames {
970 \context FretBoards {
976 @cindex transposing fret diagrams
977 @cindex fret diagrams, transposing
978 @cindex diagrams, fret, transposing
980 Predefined fret diagrams are transposable, as long as a diagram for the
981 transposed chord is stored in the fret diagram table.
983 @lilypond[verbatim, ragged-right, quote]
984 \include "predefined-guitar-fretboards.ly"
985 mychords = \chordmode{
991 \transpose c e { \mychords}
994 \context ChordNames {
997 \context FretBoards {
1004 The predefined fret diagram table for guitar contains eight chords (major, minor,
1005 augmented, diminished, dominant seventh, major seventh, minor seventh, dominant ninth)
1006 for each of 17 keys.
1007 The predefined fret diagram table for ukulele contains these chords
1008 plus an additional three chords (major sixth, suspended second, and
1010 A complete list of the predefined fret diagrams is
1011 shown in @ref{Predefined fretboard diagrams}. If there is no entry in
1012 the table for a chord, the FretBoards engraver will calculate a
1013 fret-diagram using the automatic fret diagram functionality described in
1014 @ref{Automatic fret diagrams}.
1016 @lilypond[verbatim, ragged-right, quote]
1017 \include "predefined-guitar-fretboards.ly"
1018 mychords = \chordmode{
1023 \context ChordNames {
1026 \context FretBoards {
1032 @cindex fret diagrams, adding custom
1033 @cindex custom fret diagrams, adding
1034 @cindex adding custom fret diagrams
1036 Fret diagrams can be added to the fret diagram table. To add a diagram,
1037 you must specify the chord for the diagram, the tuning to be used, and
1038 a definition for the diagram. The diagram definition can be either a
1039 fret-diagram-terse definition string or a fret-diagram-verbose
1042 @lilypond[verbatim, ragged-right, quote]
1043 \include "predefined-guitar-fretboards.ly"
1045 \storePredefinedDiagram \chordmode {c:maj9}
1049 mychords = \chordmode{
1054 \context ChordNames {
1057 \context FretBoards {
1063 Different fret diagrams for the same chord name can be stored using different
1064 octaves of pitches. The different octave should be at least two octaves
1065 above or below the default octave, because the octaves above and below the
1066 default octave are used for transposing fretboards.
1068 @lilypond[verbatim, ragged-right, quote]
1069 \include "predefined-guitar-fretboards.ly"
1071 \storePredefinedDiagram \chordmode {c''}
1073 #(offset-fret 2 (chord-shape 'bes guitar-tuning))
1075 mychords = \chordmode{
1080 \context ChordNames {
1083 \context FretBoards {
1089 @cindex fretted instruments, chord shapes
1090 @cindex chord shapes for fretted instruments
1092 @funindex \addChordShape
1093 @funindex add ChordShape
1094 @funindex storePredefinedDiagram
1095 @funindex \storePredefinedDiagram
1097 In addition to fret diagrams, LilyPond stores an internal list of chord
1098 shapes. The chord shapes are fret diagrams that can be shifted along
1099 the neck to different posistions to provide different chords. Chord
1100 shapes can be added to the internal list and then used to define
1101 predefined fret diagrams. Because they can be moved to various
1102 positions on the neck, chord shapes will normally not contain
1103 any open strings. Like fret diagrams, chord shapes can be
1104 entered as either fret-diagram-terse strings or fret-diagram-verbose
1107 @lilypond[verbatim, ragged-right, quote]
1108 \include "predefined-guitar-fretboards.ly"
1110 % add a new chord shape
1112 \addChordShape #'powerf #guitar-tuning #"1-1;3-3;3-4;x;x;x;"
1114 % add some new chords based on the power chord shape
1116 \storePredefinedDiagram \chordmode {f''}
1118 #(chord-shape 'powerf guitar-tuning)
1119 \storePredefinedDiagram \chordmode {g''}
1121 #(offset-fret 2 (chord-shape 'powerf guitar-tuning))
1123 mychords = \chordmode{
1128 \context ChordNames {
1131 \context FretBoards {
1137 The graphical layout of a fret diagram can be customized according to
1138 user preference through the properties of the @code{fret-diagram-interface}.
1139 Details are found at @rinternals{fret-diagram-interface}. For a
1140 predefined fret diagram, the interface properties belong to
1141 @code{FretBoards.FretBoard}.
1145 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1146 {customizing-fretboard-fret-diagrams.ly}
1148 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1149 {defining-predefined-fretboards-for-other-instruments.ly}
1151 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1152 {chordchanges-for-fretboards.ly}
1157 @ref{Custom tablatures},
1158 @ref{Automatic fret diagrams},
1159 @ref{Chord mode overview},
1160 @ref{Predefined fretboard diagrams}.
1163 @file{ly/@/predefined@/-guitar@/-fretboards@/.ly},
1164 @file{ly/@/predefined@/-guitar@/-ninth@/-fretboards@/.ly}.
1167 @rlsr{Fretted strings}.
1169 Internals Reference:
1170 @rinternals {fret-diagram-interface}.
1173 @node Automatic fret diagrams
1174 @unnumberedsubsubsec Automatic fret diagrams
1176 @cindex fret diagrams, automatic
1177 @cindex chord diagrams, automatic
1178 @cindex automatic fret diagrams
1179 @cindex automatic chord diagrams
1181 Fret diagrams can be automatically created from entered notes using the
1182 @code{FretBoards} context. If no predefined diagram is available for
1183 the entered notes in the active @code{stringTunings}, this context
1184 calculates strings and frets that can be used to play the notes.
1186 @lilypond[quote,ragged-right,verbatim]
1188 \context ChordNames {
1193 \context FretBoards {
1205 @funindex predefinedFretboardsOff
1206 @funindex \predefinedFretboardsOff
1207 @funindex predefinedFretboardsOn
1208 @funindex \predefinedFretboardsOn
1210 As no predefined diagrams are loaded by default, automatic calculation
1211 of fret diagrams is the default behavior. Once default diagrams are
1212 loaded, automatic calculation can be enabled and disabled with predefined
1215 @lilypond[quote,ragged-right,verbatim]
1217 \storePredefinedDiagram <c e g c' e'>
1219 #"x;3-1-(;5-2;5-3;5-4;3-1-1);"
1221 \context ChordNames {
1226 \context FretBoards {
1228 \predefinedFretboardsOff
1230 \predefinedFretboardsOn
1244 Sometimes the fretboard calculator will be unable to find
1245 an acceptable diagram. This can often be remedied by
1246 manually assigning a note to a string. In many cases, only one
1247 note need be manually placed on a string; the rest of
1248 the notes will then be placed appropriately by the @code{FretBoards}
1251 @cindex fret diagrams, adding fingerings
1252 @cindex fingerings, adding to fret diagrams
1254 Fingerings can be added to FretBoard fret diagrams.
1256 @lilypond[quote, verbatim]
1258 \context ChordNames {
1263 \context FretBoards {
1264 < c-3 e-2 g c'-1 e' > 1
1275 The minimum fret to be used in calculating strings and frets for
1276 the FretBoard context can be set with the @code{minimumFret}
1279 @lilypond[quote, verbatim]
1281 \context ChordNames {
1286 \context FretBoards {
1288 \set FretBoards.minimumFret = #5
1299 The strings and frets for the @code{FretBoards} context depend
1300 on the @code{stringTunings} property, which has the same meaning
1301 as in the TabStaff context. See @ref{Custom tablatures} for
1302 information on the @code{stringTunings} property.
1304 The graphical layout of a fret diagram can be customized according to
1305 user preference through the properties of the @code{fret-diagram-interface}.
1306 Details are found at @rinternals{fret-diagram-interface}. For a
1307 @code{FretBoards} fret diagram, the interface properties belong to
1308 @code{FretBoards.FretBoard}.
1312 @code{\predefinedFretboardsOff},
1313 @code{\predefinedFretboardsOn}.
1319 @ref{Custom tablatures}.
1322 @rlsr{Fretted strings}.
1324 Internals Reference:
1325 @rinternals {fret-diagram-interface}.
1328 Automatic fretboard calculations do not work properly for instruments
1329 with non-monotonic tunings.
1332 @node Right-hand fingerings
1333 @unnumberedsubsubsec Right-hand fingerings
1335 @cindex fretted instruments, right hand fingerings
1336 @cindex fingerings, right hand for fretted instruments
1337 @cindex right hand fingerings for fretted instruments
1339 @funindex rightHandFinger
1340 @funindex \rightHandFinger
1342 Right-hand fingerings @var{p-i-m-a} must be entered within a
1343 chord construct @code{<>} for them to be printed in the score,
1344 even when applied to a single note.
1346 @warning{There @strong{must} be a hyphen before @code{\rightHandFinger}
1347 and a space before the closing @code{>}.}
1349 @lilypond[quote,verbatim,relative=0]
1351 <c-\rightHandFinger #1 >4
1352 <e-\rightHandFinger #2 >
1353 <g-\rightHandFinger #3 >
1354 <c-\rightHandFinger #4 >
1355 <c,-\rightHandFinger #1 e-\rightHandFinger #2
1356 g-\rightHandFinger #3 c-\rightHandFinger #4 >1
1359 For convenience, you can abbreviate @code{\rightHandFinger} to something
1360 short, for example @code{RH},
1363 #(define RH rightHandFinger)
1369 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1370 {placement-of-right-hand-fingerings.ly}
1372 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1373 {fingerings,-string-indications,-and-right-hand-fingerings.ly}
1378 @rlsr{Fretted strings}.
1380 Internals Reference:
1381 @rinternals{StrokeFinger}.
1387 Most of the notational issues associated with guitar music are
1388 covered sufficiently in the general fretted strings section, but there
1389 are a few more worth covering here. Occasionally users want to
1390 create songbook-type documents having only lyrics with chord
1391 indications above them. Since LilyPond is a music typesetter,
1392 it is not recommended for documents that have no music notation
1393 in them. A better alternative is a word processor, text editor,
1394 or, for experienced users, a typesetter like GuitarTeX.
1397 * Indicating position and barring::
1398 * Indicating harmonics and dampened notes::
1401 @node Indicating position and barring
1402 @unnumberedsubsubsec Indicating position and barring
1404 @cindex indicating position and barring for fretted instruments
1405 @cindex fretted instruments, indicating position and barring
1407 This example demonstrates how to include guitar position and
1408 barring indications.
1410 @lilypond[quote,ragged-right,fragment,verbatim,relative=0]
1414 \override TextSpanner #'(bound-details left text) = #"XII "
1416 b16 e g e b g\stopTextSpan
1423 @ref{Text spanners}.
1426 @rlsr{Fretted strings},
1427 @rlsr{Expressive marks}.
1430 @node Indicating harmonics and dampened notes
1431 @unnumberedsubsubsec Indicating harmonics and dampened notes
1433 @cindex fretted instruments, dampened notes
1434 @cindex fretted instruments, harmonics
1435 @cindex dampened notes on fretted instruments
1436 @cindex harmonics on fretted instruments
1438 Special note heads can be used to indicate dampened notes or
1439 harmonics. Harmonics are normally further explained with a
1442 @lilypond[quote,ragged-right,verbatim]
1445 \override Staff.NoteHead #'style = #'cross
1447 \override Staff.NoteHead #'style = #'harmonic-mixed
1448 d^\markup { \italic { \fontsize #-2 { "harm. 12" }}} <g b>1
1455 @rlsr{Fretted strings}.
1458 @ref{Special note heads},
1459 @ref{Note head styles}.
1466 * Banjo tablatures::
1469 @node Banjo tablatures
1470 @unnumberedsubsubsec Banjo tablatures
1472 @cindex banjo tablatures
1473 @cindex tablature, banjo
1475 LilyPond has basic support for the five-string banjo. When making tablatures
1476 for five-string banjo, use the banjo tablature format function to get
1477 correct fret numbers for the fifth string:
1479 @c due to crazy intervals of banjo music, absolute pitch is recommended
1481 @lilypond[quote,ragged-right,fragment,verbatim]
1483 \set TabStaff.tablatureFormat = #fret-number-tablature-format-banjo
1484 \set TabStaff.stringTunings = #banjo-open-g-tuning
1487 g8 d' g'\5 a b g e d' |
1488 g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
1494 @cindex banjo tunings
1495 @cindex tunings, banjo
1497 @funindex banjo-c-tuning
1498 @funindex banjo-modal-tuning
1499 @funindex banjo-open-d-tuning
1500 @funindex banjo-open-dm-tuning
1501 @funindex four-string-banjo
1503 A number of common tunings for banjo are predefined in LilyPond:
1504 @code{banjo-c-tuning} (gCGBD), @code{banjo-modal-tuning} (gDGCD),
1505 @code{banjo-open-d-tuning} (aDF#AD) and @code{banjo-open-dm-tuning}
1508 These tunings may be converted to four-string banjo tunings using the
1509 @code{four-string-banjo} function:
1512 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
1518 @rlsr{Fretted strings}.
1521 @file{scm/@/output@/-lib@/.scm} contains predefined banjo tunings.