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::
33 @node Common notation for fretted strings
34 @subsection Common notation for fretted strings
36 This section discusses common notation that is unique
37 to fretted string instruments.
40 * References for fretted strings::
41 * String number indications::
42 * Default tablatures::
44 * Fret diagram markups::
45 * Predefined fret diagrams::
46 * Automatic fret diagrams::
47 * Right-hand fingerings::
50 @node References for fretted strings
51 @unnumberedsubsubsec References for fretted strings
53 Music for fretted string instruments is normally notated on
54 a single staff, either in traditional music notation or in
55 tablature. Sometimes the two types are combined, and it is
56 especially common in popular music to use chord diagrams above
57 a staff of traditional notation. The guitar and the banjo are
58 transposing instruments, sounding an octave lower than written.
59 Scores for these instruments should use the @code{"treble_8"} clef
60 (or @code{\transposition c} to get correct MIDI output).
61 Some other elements pertinent to fretted string instruments
62 are covered elsewhere:
65 @item Fingerings are indicated as shown in
66 @ref{Fingering instructions}.
68 @item Instructions for @notation{Laissez vibrer} ties
69 as well as ties on arpeggios and tremolos can be found in
72 @item Instructions for handling multiple voices can be found
73 in @ref{Collision resolution}.
75 @item Instructions for indicating harmonics can be found in
82 @ref{Fingering instructions},
84 @ref{Collision resolution},
85 @ref{Instrument names},
86 @ref{Writing music in parallel},
88 @ref{List of articulations},
90 @ref{Instrument transpositions}.
93 @node String number indications
94 @unnumberedsubsubsec String number indications
96 @cindex string numbers
97 @cindex string vs. fingering numbers
98 @cindex fingering vs. string numbers
100 The string on which a note should be played may be indicated by
101 appending @code{\@var{number}} to a note.
103 @lilypond[verbatim,quote,fragment]
109 When fingerings and string indications are used together, their
110 placement can be controlled by the order in which the two items appear
111 in the code @emph{only} if they appear inside of an explicit chord:
112 applied to whole chords or single notes @emph{outside} of chords,
113 fingerings are placed using a different mechanism.
115 @lilypond[verbatim,quote,fragment]
123 String numbers may also, as is customary with unfretted strings,
124 be printed in Roman numerals and placed below the staff rather
127 @lilypond[verbatim,quote,fragment]
133 \set stringNumberOrientations = #'(down)
141 @lilypondfile[verbatim,quote,texidoc,doctitle]
142 {controlling-the-placement-of-chord-fingerings.ly}
144 @lilypondfile[verbatim,quote,texidoc,doctitle]
145 {allowing-fingerings-to-be-printed-inside-the-staff.ly}
148 @code{\arabicStringNumbers},
149 @code{\romanStringNumbers}.
154 @ref{Fingering instructions}.
157 @rlsr{Fretted strings}.
160 @rinternals{StringNumber},
161 @rinternals{Fingering}.
164 @node Default tablatures
165 @unnumberedsubsubsec Default tablatures
167 @cindex tablatures, basic
168 @cindex tablatures, default
173 Music for plucked string instruments is frequently notated using a
174 finger/touch notation or tablature. In contrast to traditional
175 notation pitches are not denoted with note heads, but by numbers (or
176 letter-like symbols in historical intavolatura). The staff lines
177 in tablature indicate the string on which the note is to be played,
178 and a number placed on a staff line indicated the fret at which
179 the corresponding string is to be pressed.
180 Notes that are to be played simultaneously are vertically aligned.
182 By default, string 1 is the highest string, and corresponds to the top
183 line on the @code{TabStaff}. The tuning of the @code{TabStaff}
184 strings defaults to the
185 standard guitar tuning (with 6 strings). The notes are printed as
186 tablature, by using @code{TabStaff} and @code{TabVoice} contexts. A
187 calligraphic tablature clef is added automatically.
189 @lilypond[quote,ragged-right,verbatim]
190 \new TabStaff \relative {
196 Default tablatures do not contain any symbols for tone duration nor any
197 other musical symbols such as e.g. expressive marks.
199 @lilypond[quote,ragged-right,verbatim]
211 \new Staff { \clef "G_8" \symbols }
212 \new TabStaff { \symbols }
217 @funindex \tabFullNotation
219 If all musical symbols used in traditional notation should also show up
220 in tablature one has to apply the command @code{\tabFullNotation} in a
221 @code{TabStaff}-context. Please bear in mind that half notes are
222 double-stemmed in tablature in order to distinguish them from quarter
225 @lilypond[quote,ragged-right,verbatim]
245 @funindex minimumFret
246 @funindex restrainOpenStrings
248 By default pitches are assigned to the lowest playing position on the
249 fret-board (first position). Open strings are automatically preferred.
250 If you would like a certain pitch to be played on a specific string you
251 can add a string number indication to the pitch name. If you don't want
252 to have string number indications appear in traditional notation, you
253 can override the respective stencil. Usually it will be more
254 comfortable to define the playing position by using the value of
255 @code{minimumFret}. The default value for minimumFret is 0.
257 Even when @code{minimumFret} is set, open strings are used whenever
258 possible. This behaviour can be changed by setting @code{restrainOpenStrings}
261 @lilypond[quote,ragged-right,verbatim]
262 \layout { \omit Voice.StringNumber }
264 \new Staff \relative {
268 c,16\5 d\5 e\4 f\4 g4\4
271 \new TabStaff \relative {
273 c,16\5 d\5 e\4 f\4 g4\4
274 \set TabStaff.minimumFret = #5
275 \set TabStaff.restrainOpenStrings = ##t
281 @funindex \tabChordRepeats
282 @funindex \chordRepeats
283 @cindex chord, repetition
284 @cindex repetition, using @code{q}
285 @cindex @code{q}, chord repetition
287 Chord constructs can be repeated by the chord repetition symbol
288 @code{q}. In combination with tabulatures, its behavior of removing
289 string and finger numbers alongside with other events is cumbersome, so
292 \chordRepeats #'(string-number-event fingering-event)
294 explicitly on music expressions in tabulature using @ref{Chord
295 repetition}. This particular command is so common that it is available
296 as @code{\tabChordRepeats}.
298 @lilypond[quote,verbatim]
300 r8 <gis-2 cis-3 b-0>~ q4 q8~ 8 q4
309 \tabChordRepeats \guitar
314 Ties over a line break are parenthesized by default. The same holds for
315 the second alternative of a repeat.
317 @lilypond[quote,ragged-right,verbatim]
325 { g4\repeatTie c,2. }
352 @funindex \hideSplitTiedTabNotes
354 The command @code{\hideSplitTiedTabNotes} cancels the behavior of
355 engraving fret numbers in parentheses:
357 @lilypond[quote,ragged-right,verbatim]
364 { g4\repeatTie c,2. }
380 \hideSplitTiedTabNotes
392 @cindex harmonic indications in tablature notation
393 @cindex tablature and harmonic indications
395 @funindex \harmonicByFret
396 @funindex \harmonicByRatio
398 Harmonic indications can be added to tablature notation as sounding
401 @lilypond[verbatim,quote]
402 \layout { \omit Voice.StringNumber }
414 \new TabStaff { \firstHarmonic }
419 Note that the command @code{\harmonic} must always be attached to single
420 notes (possibly inside of a chord) instead of whole chords.
421 It only makes sense for open-string harmonics
422 in the 12th fret. All other harmonics should be calculated by LilyPond.
423 This can be achieved by indicating the fret where a finger of the
424 fretting hand should touch a string.
426 @lilypond[verbatim,quote]
428 \harmonicByFret #5 d16\4
429 \harmonicByFret #4 d16\4
430 \harmonicByFret #3 d8\4
431 \harmonicByFret #5 <g\3 b\2>2.
439 \new TabStaff { \fretHarmonics }
444 Alternatively, harmonics can be computed by defining the ratio of
445 string lengths above and below the harmonic fingering.
447 @lilypond[verbatim,quote]
449 \harmonicByRatio #1/2 <g\3 b\2 e'\1>4
450 \harmonicByRatio #1/3 <g\3 b\2 e'\1>4
451 \harmonicByRatio #1/4 { g8\3 b8\2 e'4\1 }
459 \new TabStaff { \ratioHarmonics }
465 @lilypondfile[verbatim,quote,texidoc,doctitle]
466 {stem-and-beam-behavior-in-tablature.ly}
468 @lilypondfile[verbatim,quote,texidoc,doctitle]
469 {polyphony-in-tablature.ly}
471 @lilypondfile[verbatim,quote,texidoc,doctitle]
472 {open-string-harmonics-in-tablature.ly}
474 @lilypondfile[verbatim,quote,texidoc,doctitle]
475 {fretted-string-harmonics-in-tablature.ly}
477 @cindex slides in tablature notation
478 @cindex tablature and slides
480 @lilypondfile[verbatim,quote,texidoc,doctitle]
481 {slides-in-tablature.ly}
483 @cindex chord glissandi
485 @lilypondfile[verbatim,quote,texidoc,doctitle]
486 {chord-glissando-in-tablature.ly}
491 @lilypondfile[verbatim,quote,texidoc,doctitle]
492 {hammer-on-and-pull-off.ly}
494 @lilypondfile[verbatim,quote,texidoc,doctitle]
495 {hammer-on-and-pull-off-using-voices.ly}
497 @lilypondfile[verbatim,quote,texidoc,doctitle]
498 {hammer-on-and-pull-off-using-chords.ly}
502 @ref{Chord repetition},
506 @ref{Written-out repeats}.
509 @rlsr{Fretted strings}.
512 @rinternals{TabNoteHead},
513 @rinternals{TabStaff},
514 @rinternals{TabVoice},
518 Chords are not handled in a special way, and hence the automatic
519 string selector may easily select the same string for two notes in
522 In order to handle @code{\partcombine}, a @code{TabStaff} must use
523 specially-created voices:
525 @lilypond[quote,ragged-right,verbatim]
526 melodia = \partcombine { e4 g g g } { e4 e e e }
529 \new TabVoice = "one" s1
530 \new TabVoice = "two" s1
531 \new TabVoice = "shared" s1
532 \new TabVoice = "solo" s1
538 Guitar special effects are limited to harmonics and slides.
541 @node Custom tablatures
542 @unnumberedsubsubsec Custom tablatures
544 @cindex tablatures, custom
545 @cindex tablature, banjo
546 @cindex tablature, mandolin
547 @cindex tablature, guitar
548 @cindex tablature, bass guitar
549 @cindex tablature, ukulele
550 @cindex tablature, predefined string tunings
551 @cindex fretted instruments, predefined string tunings
552 @cindex predefined string tunings for fretted instruments
553 @cindex tablature, violin
554 @cindex tablature, viola
555 @cindex tablature, cello
556 @cindex tablature, bass
557 @cindex tablature, double bass
559 @funindex stringTunings
561 LilyPond tablature automatically calculates the fret for
562 a note based on the string to which the note is assigned.
563 In order to do this, the tuning of the strings must be
564 specified. The tuning of the strings is given in the
565 @code{stringTunings} property.
567 LilyPond comes with predefined string tunings for banjo, mandolin,
568 guitar, bass guitar, ukulele, violin, viola, cello, and double bass.
569 LilyPond automatically sets
570 the correct transposition for predefined tunings. The following
571 example is for bass guitar, which sounds an octave lower than
574 @lilypond[quote,ragged-right,verbatim]
584 \new TabStaff \with {
585 stringTunings = #bass-tuning
594 The default string tuning is @code{guitar-tuning}, which
595 is the standard EADGBE tuning. Some other predefined tunings are
596 @code{guitar-open-g-tuning}, @code{mandolin-tuning} and
597 @code{banjo-open-g-tuning}. The predefined string tunings
598 are found in @file{ly/string-tunings-init.ly}.
600 @funindex stringTuning
601 @funindex \stringTuning
602 @cindex tablature, custom string tunings
603 @cindex custom string tunings
605 Any desired string tuning can be created. The
606 @code{\stringTuning} function can be
607 used to define a string tuning which can be used
608 to set @code{stringTunings} for the current context.
610 Its argument is a chord construct
611 defining the pitches of each string in the tuning.
612 The chord construct must be in absolute octave mode,
613 see @ref{Absolute octave entry}. The string
614 with the highest number (generally the lowest string) must
615 come first in the chord. For example, we can
616 define a string tuning for a four-string instrument with pitches
617 of @code{a''}, @code{d''}, @code{g'}, and @code{c'}:
619 @lilypond[quote,verbatim]
632 \set Staff.stringTunings = \stringTuning <c' g' d'' a''>
638 The @code{stringTunings} property is also used by
639 @code{FretBoards} to calculate automatic fret diagrams.
641 String tunings are used as part of the hash key
642 for predefined fret diagrams
643 (see @ref{Predefined fret diagrams}).
645 The previous example could also be written as follows:
647 @lilypond[quote,verbatim]
648 custom-tuning = \stringTuning <c' g' d'' a''>
661 \set TabStaff.stringTunings = #custom-tuning
667 Internally, a string tuning is a Scheme list of string pitches,
668 one for each string, ordered by string number from 1 to N,
669 where string 1 is at the top of the tablature staff and
670 string N is at the bottom. This ordinarily results in ordering
671 from highest pitch to lowest pitch, but some instruments
672 (e.g. ukulele) do not have strings ordered by pitch.
674 A string pitch in a string tuning list is a LilyPond pitch
675 object. Pitch objects are created with the Scheme function
676 @code{ly:make-pitch} (see @ref{Scheme functions}).
678 @code{\stringTuning} creates such an object from chord input.
680 LilyPond automatically calculates the number of lines in the
681 @code{TabStaff} and the number of strings in an automatically
682 calculated @code{FretBoard} as the number of elements
683 in @code{stringTunings}.
685 To let all TabStaff contexts use the same custom tuning by default,
692 stringTunings = \stringTuning <c' g' d'' a''>
698 @cindex moderntab clef
699 @cindex clef, moderntab
703 A modern tab clef can also be used.
705 @lilypond[quote,ragged-right,verbatim]
715 The modern tab clef supports tablatures from 4 to 7 strings.
717 @cindex micro-tones, tab
718 @cindex quarter-tones, tab
719 @cindex tab micro-tones
720 @cindex tab quarter-tones
722 @code{TabStaff} may support micro-tones like quarter-tones, which
723 can be played using bendings.
724 @code{supportNonIntegerFret = ##t} needs to be set in
725 Score-context. However, micro-tones are not supported in @code{FretBoards}.
727 @lilypond[quote,ragged-right,verbatim]
731 supportNonIntegerFret = ##t
735 custom-tuning = \stringTuning <e, a, d ges beh eeh'>
750 \new Staff << \clef "G_8" \mus >>
751 \new TabStaff \with { stringTunings = \custom-tuning } \mus
757 @ref{Absolute octave entry},
758 @ref{Predefined fret diagrams},
759 @ref{Scheme functions}.
762 @file{ly/string-tunings-init.ly},
763 @file{scm/tablature.scm}.
766 @rlsr{Fretted strings}.
769 @rinternals{Tab_note_heads_engraver}.
772 Automatic tablature calculations do not work properly in most
773 cases for instruments where string pitches do not vary
774 monotonically with string number, such as ukuleles.
777 @node Fret diagram markups
778 @unnumberedsubsubsec Fret diagram markups
780 @cindex fret diagrams
781 @cindex chord diagrams
782 @cindex diagrams, fret
783 @cindex diagrams, chord for fretted instruments
784 @cindex fret diagrams, custom
785 @cindex custom fret diagrams
787 Fret diagrams can be added to music as a markup to the desired
788 note. The markup contains information about the desired fret
789 diagram. There are three different fret-diagram markup
790 interfaces: standard, terse, and verbose. The three interfaces
791 produce equivalent markups, but have varying amounts of
792 information in the markup string. Details about the
793 syntax of the different markup strings used to define
794 fret diagrams are found at @ref{Instrument Specific Markup}.
796 The standard fret diagram markup string indicates the string
797 number and the fret number for each dot to be placed on the string.
798 In addition, open and unplayed (muted) strings can be indicated.
800 @lilypond[quote, verbatim]
809 <c e g c' e'>1^\markup {
810 \fret-diagram #"6-x;5-3;4-2;3-o;2-1;1-o;"
812 <d a d' f'>1^\markup {
813 \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-1;"
819 @cindex barre indications
821 Barre indications can be added to the diagram from
822 the fret-diagram markup string.
824 @lilypond[quote, verbatim]
833 <f, c f a c' f'>1^\markup {
834 \fret-diagram #"c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
836 <g, d g b d' g'>1^\markup {
837 \fret-diagram #"c:6-1-3;6-3;5-5;4-5;3-4;2-3;1-3;"
843 @cindex fret-diagram markup
846 @funindex fret-diagram
847 @funindex \fret-diagram
849 The size of the fret diagram, and the number of frets in the diagram
850 can be changed in the fret-diagram markup string.
852 @lilypond[quote, verbatim]
861 <f, c f a c' f'>1^\markup {
862 \fret-diagram #"s:1.5;c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
864 <g, b, d g b g'>1^\markup {
865 \fret-diagram #"h:6;6-3;5-2;4-o;3-o;2-o;1-3;"
871 The number of strings in a fret diagram can be changed to accommodate
872 different instruments such as banjos and ukuleles with the fret-diagram
875 @lilypond[quote, verbatim]
883 % An 'A' chord for ukulele
885 \fret-diagram #"w:4;4-2-2;3-1-1;2-o;1-o;"
891 Fingering indications can be added, and the location of fingering labels
892 can be controlled by the fret-diagram markup string.
894 @lilypond[quote, verbatim]
903 <c e g c' e'>1^\markup {
904 \fret-diagram #"f:1;6-x;5-3-3;4-2-2;3-o;2-1-1;1-o;"
906 <d a d' f'>1^\markup {
907 \fret-diagram #"f:2;6-x;5-x;4-o;3-2-2;2-3-3;1-1-1;"
913 Dot radius and dot position can be controlled with the fret-diagram
916 @lilypond[quote, verbatim]
925 <c e g c' e'>1^\markup {
926 \fret-diagram #"d:0.35;6-x;5-3;4-2;3-o;2-1;1-o;"
928 <d a d' f'>1^\markup {
929 \fret-diagram #"p:0.2;6-x;5-x;4-o;3-2;2-3;1-1;"
935 @cindex fret-diagram-terse markup
937 @funindex fret-diagram-terse
938 @funindex \fret-diagram-terse
940 The fret-diagram-terse markup string omits string numbers; the string
941 number is implied by the presence of semicolons. There is one semicolon
942 for each string in the diagram. The first semicolon corresponds to the
943 highest string number and the last semicolon corresponds to the first string.
944 Mute strings, open strings, and fret numbers can be indicated.
946 @lilypond[quote, verbatim]
955 <c e g c' e'>1^\markup {
956 \fret-diagram-terse #"x;3;2;o;1;o;"
958 <d a d' f'>1^\markup {
959 \fret-diagram-terse #"x;x;o;2;3;1;"
965 Barre indicators can be included in the fret-diagram-terse markup string.
967 @lilypond[quote, verbatim]
976 <f, c f a c' f'>1^\markup {
977 \fret-diagram-terse #"1-(;3;3;2;1;1-);"
979 <g, d g b d' g'>1^\markup {
980 \fret-diagram-terse #"3-(;5;5;4;3;3-);"
986 Fingering indications can be included in the fret-diagram-terse markup string.
988 @c Need to use override to enable fingerings to show this -- can we do so?
989 @lilypond[quote, verbatim]
997 \override Voice.TextScript.fret-diagram-details.finger-code = #'below-string
999 <c e g c' e'>1^\markup {
1000 \fret-diagram-terse #"x;3-3;2-2;o;1-1;o;"
1002 <d a d' f'>1^\markup {
1003 \fret-diagram-terse #"x;x;o;2-2;3-3;1-1;"
1009 Other fret diagram properties must be adjusted using
1010 @code{\override} when using the fret-diagram-terse markup.
1012 @cindex fret-diagram-verbose markup
1015 @funindex fret-diagram-verbose
1016 @funindex \fret-diagram-verbose
1018 The fret-diagram-verbose markup string is in the format of a Scheme list. Each
1019 element of the list indicates an item to be placed on the fret diagram.
1021 @lilypond[quote, verbatim]
1030 <c e g c' e'>1^\markup {
1031 \fret-diagram-verbose #'(
1040 <d a d' f'>1^\markup {
1041 \fret-diagram-verbose #'(
1054 Fingering indications and barres can be included in a
1055 fret-diagram-verbose markup string. Unique to the
1056 fret-diagram-verbose interface is a capo indication that
1057 can be placed on the fret diagram. The capo indication is
1058 a thick bar that covers all strings. The fret with the
1059 capo will be the lowest fret in the fret diagram.
1061 Fingering indication dots can be colored as well as parenthesized;
1062 the parenthesis's color can also be altered independently.
1064 Markups can be placed into the dots as well.
1066 @c \override is necessary to make fingering visible
1067 @lilypond[quote, verbatim]
1076 \override Voice.TextScript.fret-diagram-details.finger-code = #'below-string
1077 <f, c f a c' f'>1^\markup {
1078 \fret-diagram-verbose #'(
1088 <g, b, d g b g'>1^\markup {
1089 \fret-diagram-verbose #'(
1098 <c g c' e' g'>1^\markup {
1099 \fret-diagram-verbose #'(
1107 \override Voice.TextScript.size = 1.4
1108 <c g c' e' g'>1^\markup {
1109 \fret-diagram-verbose #'(
1110 (place-fret 6 3 1 red parenthesized default-paren-color)
1111 (place-fret 5 3 1 inverted)
1112 (place-fret 4 5 2 blue parenthesized)
1113 (place-fret 3 5 3 blue)
1114 (place-fret 2 5 4 blue)
1115 (place-fret 1 3 1 inverted)
1118 \override Voice.TextScript.size = 1.5
1119 <b, fis b dis' fis'>1^\markup {
1120 \override #'(fret-diagram-details . ((finger-code . in-dot)))
1121 \fret-diagram-verbose #`(
1123 (place-fret 4 4 "fis" red)
1124 (place-fret 3 4 "b" red)
1131 \musicglyph #"accidentals.sharp"} #}
1140 All other fret diagram properties must be adjusted using
1141 @code{\override} when using the fret-diagram-verbose markup.
1144 The following example shows the three fret-diagram markup
1145 interfaces, along with examples of common tweaks. For example,
1146 the size of the verbose fret diagram is reduced to 0.75, and the
1147 finger indications are specified to appear below the diagram. The
1148 terse diagram includes tweaks to specify placement of finger code
1151 @lilypond[verbatim,ragged-right,quote]
1155 \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
1159 \override #'(size . 0.75) {
1160 \override #'(finger-code . below-string) {
1161 \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
1172 \override #'(dot-radius . 0.35) {
1173 \override #'(finger-code . in-dot) {
1174 \override #'(dot-color . white) {
1175 \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
1185 @cindex customized fret diagram
1186 @cindex fret diagram, customized
1187 @cindex diagram, fret, customized
1189 @funindex fret-diagram-interface
1191 The graphical layout of a fret diagram can be customized according to
1192 user preference through the properties of the
1193 @code{fret-diagram-interface}. Details are found at
1194 @rinternals{fret-diagram-interface}. For a fret diagram
1195 markup, the interface properties belong to @code{Voice.TextScript}.
1199 @lilypondfile[verbatim,quote,texidoc,doctitle]
1200 {changing-fret-orientations.ly}
1202 @lilypondfile[verbatim,quote,texidoc,doctitle]
1203 {customizing-markup-fret-diagrams.ly}
1207 @ref{Instrument Specific Markup}.
1210 @rlsr{Fretted strings}.
1212 Internals Reference:
1213 @rinternals{fret-diagram-interface}.
1216 @node Predefined fret diagrams
1217 @unnumberedsubsubsec Predefined fret diagrams
1219 @cindex fret diagrams
1220 @cindex fret diagrams, ukulele
1221 @cindex fret diagrams, mandolin
1222 @cindex chord diagrams
1224 @funindex FretBoards
1225 @funindex stringTunings
1227 Fret diagrams can be displayed using the @code{FretBoards} context. By
1228 default, the @code{FretBoards} context will display fret diagrams that
1229 are stored in a lookup table:
1231 @lilypond[verbatim, ragged-right, quote]
1232 \include "predefined-guitar-fretboards.ly"
1240 The default predefined fret diagrams are contained in the file
1241 @file{predefined-guitar-fretboards.ly}. Fret diagrams are
1242 stored based on the pitches of a chord and the value of
1243 @code{stringTunings} that is currently in use.
1244 @file{predefined-guitar-fretboards.ly} contains predefined
1245 fret diagrams only for @code{guitar-tuning}. Predefined fret
1246 diagrams can be added for other instruments or other tunings
1247 by following the examples found in
1248 @file{predefined-guitar-fretboards.ly}.
1250 Fret diagrams for the ukulele are contained in the file @*
1251 @file{predefined-ukulele-fretboards.ly}.
1253 @lilypond[verbatim, ragged-right, quote]
1254 \include "predefined-ukulele-fretboards.ly"
1256 myChords = \chordmode { a1 a:m a:aug }
1263 \set Staff.stringTunings = #ukulele-tuning
1268 Fret diagrams for the mandolin are contained in the file @*
1269 @file{predefined-mandolin-fretboards.ly}.
1271 @lilypond[verbatim, ragged-right, quote]
1272 \include "predefined-mandolin-fretboards.ly"
1274 myChords = \chordmode { c1 c:m7.5- c:aug }
1281 \set Staff.stringTunings = #mandolin-tuning
1286 Chord pitches can be entered
1287 either as simultaneous music or using chord mode (see
1288 @ref{Chord mode overview}).
1290 @lilypond[verbatim, ragged-right,quote]
1291 \include "predefined-guitar-fretboards.ly"
1298 @cindex chord names with fret diagrams
1299 @cindex fret diagrams with chord names
1301 @funindex ChordNames
1303 @funindex \chordmode
1305 It is common that both chord names and fret diagrams are displayed together.
1306 This is achieved by putting a @code{ChordNames} context in parallel with
1307 a @code{FretBoards} context and giving both contexts the same music.
1309 @lilypond[verbatim, ragged-right, quote]
1310 \include "predefined-guitar-fretboards.ly"
1311 mychords = \chordmode{
1325 @cindex transposing fret diagrams
1326 @cindex fret diagrams, transposing
1327 @cindex diagrams, fret, transposing
1329 Predefined fret diagrams are transposable, as long as a diagram for the
1330 transposed chord is stored in the fret diagram table.
1332 @lilypond[verbatim, ragged-right, quote]
1333 \include "predefined-guitar-fretboards.ly"
1334 mychords = \chordmode{
1340 \transpose c e { \mychords }
1353 The predefined fret diagram table for guitar contains eight chords (major, minor,
1354 augmented, diminished, dominant seventh, major seventh, minor seventh, dominant ninth)
1355 for each of 17 keys.
1356 The predefined fret diagram table for ukulele contains these chords
1357 plus an additional three chords (major sixth, suspended second, and
1359 A complete list of the predefined fret diagrams is
1360 shown in @ref{Predefined fretboard diagrams}. If there is no entry in
1361 the table for a chord, the FretBoards engraver will calculate a
1362 fret-diagram using the automatic fret diagram functionality described in
1363 @ref{Automatic fret diagrams}.
1365 @lilypond[verbatim, ragged-right, quote]
1366 \include "predefined-guitar-fretboards.ly"
1367 mychords = \chordmode{
1381 @cindex fret diagrams, adding custom
1382 @cindex custom fret diagrams, adding
1383 @cindex adding custom fret diagrams
1385 Fret diagrams can be added to the fret diagram table. To add a diagram,
1386 you must specify the hash table for the diagram, the chord for the
1387 diagram, the tuning to be used, and
1388 a definition for the diagram. Normally, the hash table will be
1389 @var{default-fret-table}. The diagram definition can be either a
1390 fret-diagram-terse definition string or a fret-diagram-verbose
1393 @lilypond[verbatim, ragged-right, quote]
1394 \include "predefined-guitar-fretboards.ly"
1396 \storePredefinedDiagram #default-fret-table
1397 \chordmode { c:maj9 }
1401 mychords = \chordmode {
1415 Different fret diagrams for the same chord name can be stored using different
1416 octaves of pitches. The different octave should be at least two octaves
1417 above or below the default octave, because the octaves above and below the
1418 default octave are used for transposing fretboards.
1420 @lilypond[verbatim, ragged-right, quote]
1421 \include "predefined-guitar-fretboards.ly"
1423 \storePredefinedDiagram #default-fret-table
1426 #(offset-fret 2 (chord-shape 'bes guitar-tuning))
1428 mychords = \chordmode {
1442 @cindex fretted instruments, chord shapes
1443 @cindex chord shapes for fretted instruments
1445 @funindex \addChordShape
1446 @funindex addChordShape
1447 @funindex storePredefinedDiagram
1448 @funindex \storePredefinedDiagram
1450 In addition to fret diagrams, LilyPond stores an internal list of chord
1451 shapes. The chord shapes are fret diagrams that can be shifted along
1452 the neck to different positions to provide different chords. Chord
1453 shapes can be added to the internal list and then used to define
1454 predefined fret diagrams. Because they can be moved to various
1455 positions on the neck, chord shapes will normally not contain
1456 any open strings. Like fret diagrams, chord shapes can be
1457 entered as either fret-diagram-terse strings or fret-diagram-verbose
1460 @lilypond[verbatim, ragged-right, quote]
1461 \include "predefined-guitar-fretboards.ly"
1463 % Add a new chord shape
1465 \addChordShape #'powerf #guitar-tuning #"1-1;3-3;3-4;x;x;x;"
1467 % add some new chords based on the power chord shape
1469 \storePredefinedDiagram #default-fret-table
1472 #(chord-shape 'powerf guitar-tuning)
1473 \storePredefinedDiagram #default-fret-table
1476 #(offset-fret 2 (chord-shape 'powerf guitar-tuning))
1478 mychords = \chordmode{
1492 The graphical layout of a fret diagram can be customized according to
1493 user preference through the properties of the
1494 @code{fret-diagram-interface}. Details are found at
1495 @rinternals{fret-diagram-interface}. For a predefined fret diagram,
1496 the interface properties belong to @code{FretBoards.FretBoard}.
1500 @lilypondfile[verbatim,quote,texidoc,doctitle]
1501 {customizing-fretboard-fret-diagrams.ly}
1503 @lilypondfile[verbatim,quote,texidoc,doctitle]
1504 {defining-predefined-fretboards-for-other-instruments.ly}
1506 @lilypondfile[verbatim,quote,texidoc,doctitle,ragged-right]
1507 {chordchanges-for-fretboards.ly}
1509 @lilypondfile[verbatim,quote,texidoc,doctitle]
1510 {fretboards-alternate-tables.ly}
1514 @ref{Custom tablatures},
1515 @ref{Automatic fret diagrams},
1516 @ref{Chord mode overview},
1517 @ref{Predefined fretboard diagrams}.
1520 @file{ly/predefined-guitar-fretboards.ly}, @*
1521 @file{ly/predefined-guitar-ninth-fretboards.ly}, @*
1522 @file{ly/predefined-ukulele-fretboards.ly}, @*
1523 @file{ly/predefined-mandolin-fretboards.ly}.
1526 @rlsr{Fretted strings}.
1528 Internals Reference:
1529 @rinternals {fret-diagram-interface}.
1532 @node Automatic fret diagrams
1533 @unnumberedsubsubsec Automatic fret diagrams
1535 @cindex fret diagrams, automatic
1536 @cindex chord diagrams, automatic
1537 @cindex automatic fret diagrams
1538 @cindex automatic chord diagrams
1540 Fret diagrams can be automatically created from entered notes using the
1541 @code{FretBoards} context. If no predefined diagram is available for
1542 the entered notes in the active @code{stringTunings}, this context
1543 calculates strings and frets that can be used to play the notes.
1545 @lilypond[quote,ragged-right,verbatim]
1564 @funindex predefinedFretboardsOff
1565 @funindex \predefinedFretboardsOff
1566 @funindex predefinedFretboardsOn
1567 @funindex \predefinedFretboardsOn
1569 As no predefined diagrams are loaded by default, automatic calculation
1570 of fret diagrams is the default behavior. Once default diagrams are
1571 loaded, automatic calculation can be enabled and disabled with predefined
1574 @lilypond[quote,ragged-right,verbatim]
1576 \storePredefinedDiagram #default-fret-table
1579 #"x;3-1-(;5-2;5-3;5-4;3-1-1-);"
1588 \predefinedFretboardsOff
1590 \predefinedFretboardsOn
1604 Sometimes the fretboard calculator will be unable to find
1605 an acceptable diagram. This can often be remedied by
1606 manually assigning a note to a string. In many cases, only one
1607 note need be manually placed on a string; the rest of
1608 the notes will then be placed appropriately by the
1609 @code{FretBoards} context.
1611 @cindex fret diagrams, adding fingerings
1612 @cindex fingerings, adding to fret diagrams
1614 Fingerings can be added to FretBoard fret diagrams.
1616 @lilypond[quote, verbatim]
1624 <c-3 e-2 g c'-1 e'>1
1635 @funindex minimumFret
1637 The minimum fret to be used in calculating strings and frets for
1638 the FretBoard context can be set with the @code{minimumFret}
1641 @lilypond[quote, verbatim]
1650 \set FretBoards.minimumFret = #5
1661 The strings and frets for the @code{FretBoards} context depend
1662 on the @code{stringTunings} property, which has the same meaning
1663 as in the TabStaff context. See @ref{Custom tablatures} for
1664 information on the @code{stringTunings} property.
1666 The graphical layout of a fret diagram can be customized according to
1667 user preference through the properties of the
1668 @code{fret-diagram-interface}. Details are found at
1669 @rinternals{fret-diagram-interface}. For a @code{FretBoards} fret
1670 diagram, the interface properties belong to
1671 @code{FretBoards.FretBoard}.
1675 @code{\predefinedFretboardsOff},
1676 @code{\predefinedFretboardsOn}.
1681 @ref{Custom tablatures}.
1684 @rlsr{Fretted strings}.
1686 Internals Reference:
1687 @rinternals {fret-diagram-interface}.
1690 Automatic fretboard calculations do not work properly for instruments
1691 with non-monotonic tunings.
1694 @node Right-hand fingerings
1695 @unnumberedsubsubsec Right-hand fingerings
1697 @cindex fretted instruments, right hand fingerings
1698 @cindex fingerings, right hand for fretted instruments
1699 @cindex right hand fingerings for fretted instruments
1701 @funindex rightHandFinger
1702 @funindex \rightHandFinger
1704 Right-hand fingerings @var{p-i-m-a} must be entered using
1705 @code{\rightHandFinger} followed by a number.
1707 @warning{If the number is entered in Scheme notation, remember to append
1708 a space before following it with a closing @code{>} or similar.}
1710 @lilypond[quote,verbatim,fragment]
1712 c4\rightHandFinger #1
1713 e\rightHandFinger #2
1714 g\rightHandFinger #3
1715 c'\rightHandFinger #4
1716 <c\rightHandFinger #1 e\rightHandFinger #2
1717 g\rightHandFinger #3 c'\rightHandFinger #4 >1
1720 For convenience, you can abbreviate @code{\rightHandFinger} to something
1721 short, for example @code{RH},
1730 @lilypondfile[verbatim,quote,texidoc,doctitle]
1731 {placement-of-right-hand-fingerings.ly}
1733 @lilypondfile[verbatim,quote,texidoc,doctitle]
1734 {fingerings,-string-indications,-and-right-hand-fingerings.ly}
1738 @rlsr{Fretted strings}.
1740 Internals Reference:
1741 @rinternals{StrokeFinger}.
1747 Most of the notational issues associated with guitar music are
1748 covered sufficiently in the general fretted strings section, but there
1749 are a few more worth covering here. Occasionally users want to
1750 create songbook-type documents having only lyrics with chord
1751 indications above them. Since LilyPond is a music typesetter,
1752 it is not recommended for documents that have no music notation
1753 in them. A better alternative is a word processor, text editor,
1754 or, for experienced users, a typesetter like GuitarTeX.
1757 * Indicating position and barring::
1758 * Indicating harmonics and dampened notes::
1759 * Indicating power chords::
1762 @node Indicating position and barring
1763 @unnumberedsubsubsec Indicating position and barring
1765 @cindex indicating position and barring for fretted instruments
1766 @cindex fretted instruments, indicating position and barring
1768 This example demonstrates how to include guitar position and
1769 barring indications.
1771 @lilypond[quote,ragged-right,verbatim,fragment]
1776 \override TextSpanner.bound-details.left.text = #"XII "
1778 b16 e g e b g\stopTextSpan
1785 @ref{Text spanners}.
1788 @rlsr{Fretted strings},
1789 @rlsr{Expressive marks}.
1792 @node Indicating harmonics and dampened notes
1793 @unnumberedsubsubsec Indicating harmonics and dampened notes
1795 @cindex fretted instruments, dampened notes
1796 @cindex fretted instruments, harmonics
1797 @cindex dampened notes on fretted instruments
1798 @cindex harmonics on fretted instruments
1800 Special note heads can be used to indicate dampened notes or
1801 harmonics. Harmonics are normally further explained with a
1804 @lilypond[quote,ragged-right,verbatim]
1807 \override Staff.NoteHead.style = #'harmonic-mixed
1808 d'^\markup { \italic { \fontsize #-2 { "harm. 12" }}} <g b>1
1812 Dampened notes (also called @notation{dead notes}) are supported
1813 within normal and tablature staves:
1815 @lilypond[quote,ragged-right,verbatim]
1817 < a\3 \deadNote c\2 a'\1 >4
1818 < b\3 \deadNote d\2 b'\1 >
1819 < c\3 \deadNote e\2 c'\1 >
1821 \tuplet 3/2 { g8 b e }
1836 Another playing technique (especially used on electric guitars) is
1837 called @notation{palm mute}. The string is hereby partly muted by the
1838 palm of the striking hand (hence the name). Lilypond supports
1839 the notation of palm mute-style notes by changing the note head to a
1842 @lilypond[quote,ragged-right,verbatim]
1843 \new Voice { % Warning: explicit Voice instantiation is
1844 % required to have palmMuteOff work properly
1845 % when palmMuteOn comes at the beginning of
1850 e8^\markup { \musicglyph #"noteheads.u2do" = palm mute }
1853 e e \palmMute e e e |
1854 e8 \palmMute { e e e } e e e e |
1855 < \palmMute e b' e >8 \palmMute { e e e } < \palmMute e b' e >2
1862 @rlsr{Fretted strings}.
1865 @ref{Special note heads},
1866 @ref{Note head styles}.
1869 @node Indicating power chords
1870 @unnumberedsubsubsec Indicating power chords
1872 @funindex powerChords
1873 @funindex \powerChords
1875 @cindex power chords
1876 @cindex chords, power
1878 Power chords and their symbols can be engraved in chord mode or as chord
1881 @lilypond[quote,ragged-right,verbatim]
1882 ChordsAndSymbols = {
1887 \set minimumFret = #8
1891 \set minimumFret = #5
1911 Power chord symbols are automatically switched off as soon as one of the
1912 other common chord modifier is used:
1914 @lilypond[quote,ragged-right,verbatim]
1915 mixedChords = \chordmode {
1940 @rglos{power chord}.
1943 @ref{Extended and altered chords},
1944 @ref{Printing chord names}.
1947 @rlsr{Fretted strings}.
1954 * Banjo tablatures::
1957 @node Banjo tablatures
1958 @unnumberedsubsubsec Banjo tablatures
1960 @cindex banjo tablatures
1961 @cindex tablature, banjo
1963 LilyPond has basic support for the five-string banjo. When making tablatures
1964 for five-string banjo, use the banjo tablature format function to get
1965 correct fret numbers for the fifth string:
1967 @c due to crazy intervals of banjo music, absolute pitch is recommended
1969 @lilypond[quote,ragged-right,verbatim]
1971 g8 d' g'\5 a b g e d' |
1972 g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
1977 \new Staff \with { \omit StringNumber }
1978 { \clef "treble_8" \music }
1979 \new TabStaff \with {
1980 tablatureFormat = #fret-number-tablature-format-banjo
1981 stringTunings = #banjo-open-g-tuning
1987 @cindex banjo tunings
1988 @cindex tunings, banjo
1990 @funindex banjo-c-tuning
1991 @funindex banjo-modal-tuning
1992 @funindex banjo-open-d-tuning
1993 @funindex banjo-open-dm-tuning
1994 @funindex four-string-banjo
1996 A number of common tunings for the five-string banjo are predefined:
1997 @code{banjo-c-tuning} (gCGBD), @code{banjo-modal-tuning} (gDGCD),
1998 @code{banjo-open-d-tuning} (aDF#AD) and @code{banjo-open-dm-tuning}
2001 These may be converted to four-string tunings using the
2002 @code{four-string-banjo} function:
2005 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
2010 @file{ly/string-tunings-init.ly}.
2013 @rlsr{Fretted strings}.
2023 @node Lute tablatures
2024 @unnumberedsubsubsec Lute tablatures
2026 @cindex lute tablatures
2027 @cindex tablature, lute
2029 LilyPond supports tablature for lute.
2031 To get additional bass strings use @code{additionalBassStrings}, where the
2032 pitches of those strings are set. They will be printed below lowest line as:
2033 a, /a, //a, ///a, 4, 5 etc.
2035 @code{fret-letter-tablature-format} for @code{tablatureFormat} should be used,
2036 probably @code{fretLabels} for further customizing.
2038 @lilypond[quote,ragged-right,verbatim]
2039 m = { f'4 d' a f d a, g, fis, e, d, c, \bar "|." }
2043 \new Staff { \clef bass \cadenzaOn \m }
2049 tablatureFormat = #fret-letter-tablature-format
2053 stringTunings = \stringTuning <a, d f a d' f'>
2054 additionalBassStrings = \stringTuning <c, d, e, fis, g,>
2055 fretLabels = #'("a" "b" "r" "d" "e" "f" "g" "h" "i" "k")
2061 @cindex lute tunings
2062 @cindex tunings, lute
2065 Using @code{FretBoards} with @code{additionalBassStrings} is not supported and
2066 will yield unsatisfying results.