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 expressive marks, for example.
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 @cindex tablature, custom string tunings
602 @cindex custom string tunings
604 Any desired string tuning can be created. The
605 @code{\stringTuning} function can be
606 used to define a string tuning which can be used
607 to set @code{stringTunings} for the current context.
609 Its argument is a chord construct
610 defining the pitches of each string in the tuning.
611 The chord construct must be in absolute octave mode,
612 see @ref{Absolute octave entry}. The string
613 with the highest number (generally the lowest string) must
614 come first in the chord. For example, we can
615 define a string tuning for a four-string instrument with pitches
616 of @code{a''}, @code{d''}, @code{g'}, and @code{c'}:
618 @lilypond[quote,verbatim]
631 \set Staff.stringTunings = \stringTuning <c' g' d'' a''>
637 The @code{stringTunings} property is also used by
638 @code{FretBoards} to calculate automatic fret diagrams.
640 String tunings are used as part of the hash key
641 for predefined fret diagrams
642 (see @ref{Predefined fret diagrams}).
644 The previous example could also be written as follows:
646 @lilypond[quote,verbatim]
647 custom-tuning = \stringTuning <c' g' d'' a''>
660 \set TabStaff.stringTunings = #custom-tuning
666 Internally, a string tuning is a Scheme list of string pitches,
667 one for each string, ordered by string number from 1 to N,
668 where string 1 is at the top of the tablature staff and
669 string N is at the bottom. This ordinarily results in ordering
670 from highest pitch to lowest pitch, but some instruments
671 (e.g., ukulele) do not have strings ordered by pitch.
673 A string pitch in a string tuning list is a LilyPond pitch
674 object. Pitch objects are created with the Scheme function
675 @code{ly:make-pitch} (see @ref{Scheme functions}).
677 @code{\stringTuning} creates such an object from chord input.
679 LilyPond automatically calculates the number of lines in the
680 @code{TabStaff} and the number of strings in an automatically
681 calculated @code{FretBoard} as the number of elements
682 in @code{stringTunings}.
684 To let all TabStaff contexts use the same custom tuning by default,
691 stringTunings = \stringTuning <c' g' d'' a''>
697 @cindex moderntab clef
698 @cindex clef, moderntab
702 A modern tab clef can also be used.
704 @lilypond[quote,ragged-right,verbatim]
714 The modern tab clef supports tablatures from 4 to 7 strings.
716 @cindex micro-tones, tab
717 @cindex quarter-tones, tab
718 @cindex tab micro-tones
719 @cindex tab quarter-tones
721 @code{TabStaff} may support micro-tones like quarter-tones, which
722 can be played using bendings.
723 @code{supportNonIntegerFret = ##t} needs to be set in
724 Score-context. However, micro-tones are not supported in @code{FretBoards}.
726 @lilypond[quote,ragged-right,verbatim]
730 supportNonIntegerFret = ##t
734 custom-tuning = \stringTuning <e, a, d ges beh eeh'>
749 \new Staff << \clef "G_8" \mus >>
750 \new TabStaff \with { stringTunings = \custom-tuning } \mus
756 @ref{Absolute octave entry},
757 @ref{Predefined fret diagrams},
758 @ref{Scheme functions}.
761 @file{ly/string-tunings-init.ly},
762 @file{scm/tablature.scm}.
765 @rlsr{Fretted strings}.
768 @rinternals{Tab_note_heads_engraver}.
771 Automatic tablature calculations do not work properly in most
772 cases for instruments where string pitches do not vary
773 monotonically with string number, such as ukuleles.
776 @node Fret diagram markups
777 @unnumberedsubsubsec Fret diagram markups
779 @cindex fret diagrams
780 @cindex chord diagrams
781 @cindex diagrams, fret
782 @cindex diagrams, chord for fretted instruments
783 @cindex fret diagrams, custom
784 @cindex custom fret diagrams
786 Fret diagrams can be added to music as a markup to the desired
787 note. The markup contains information about the desired fret
788 diagram. There are three different fret-diagram markup
789 interfaces: standard, terse, and verbose. The three interfaces
790 produce equivalent markups, but have varying amounts of
791 information in the markup string. Details about the
792 syntax of the different markup strings used to define
793 fret diagrams are found at @ref{Instrument Specific Markup}.
795 The standard fret diagram markup string indicates the string
796 number and the fret number for each dot to be placed on the string.
797 In addition, open and unplayed (muted) strings can be indicated.
799 @lilypond[quote, verbatim]
808 <c e g c' e'>1^\markup {
809 \fret-diagram #"6-x;5-3;4-2;3-o;2-1;1-o;"
811 <d a d' f'>1^\markup {
812 \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-1;"
818 @cindex barre indications
820 Barre indications can be added to the diagram from
821 the fret-diagram markup string.
823 @lilypond[quote, verbatim]
832 <f, c f a c' f'>1^\markup {
833 \fret-diagram #"c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
835 <g, d g b d' g'>1^\markup {
836 \fret-diagram #"c:6-1-3;6-3;5-5;4-5;3-4;2-3;1-3;"
842 @cindex fret-diagram markup
845 @funindex \fret-diagram
847 The size of the fret diagram, and the number of frets in the diagram
848 can be changed in the fret-diagram markup string.
850 @lilypond[quote, verbatim]
859 <f, c f a c' f'>1^\markup {
860 \fret-diagram #"s:1.5;c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
862 <g, b, d g b g'>1^\markup {
863 \fret-diagram #"h:6;6-3;5-2;4-o;3-o;2-o;1-3;"
869 The number of strings in a fret diagram can be changed to accommodate
870 different instruments such as banjos and ukuleles with the fret-diagram
873 @lilypond[quote, verbatim]
881 % An 'A' chord for ukulele
883 \fret-diagram #"w:4;4-2-2;3-1-1;2-o;1-o;"
889 Fingering indications can be added, and the location of fingering labels
890 can be controlled by the fret-diagram markup string.
892 @lilypond[quote, verbatim]
901 <c e g c' e'>1^\markup {
902 \fret-diagram #"f:1;6-x;5-3-3;4-2-2;3-o;2-1-1;1-o;"
904 <d a d' f'>1^\markup {
905 \fret-diagram #"f:2;6-x;5-x;4-o;3-2-2;2-3-3;1-1-1;"
911 Dot radius and dot position can be controlled with the fret-diagram
914 @lilypond[quote, verbatim]
923 <c e g c' e'>1^\markup {
924 \fret-diagram #"d:0.35;6-x;5-3;4-2;3-o;2-1;1-o;"
926 <d a d' f'>1^\markup {
927 \fret-diagram #"p:0.2;6-x;5-x;4-o;3-2;2-3;1-1;"
933 @cindex fret-diagram-terse markup
935 @funindex \fret-diagram-terse
937 The fret-diagram-terse markup string omits string numbers; the string
938 number is implied by the presence of semicolons. There is one semicolon
939 for each string in the diagram. The first semicolon corresponds to the
940 highest string number and the last semicolon corresponds to the first string.
941 Mute strings, open strings, and fret numbers can be indicated.
943 @lilypond[quote, verbatim]
952 <c e g c' e'>1^\markup {
953 \fret-diagram-terse #"x;3;2;o;1;o;"
955 <d a d' f'>1^\markup {
956 \fret-diagram-terse #"x;x;o;2;3;1;"
962 Barre indicators can be included in the fret-diagram-terse markup string.
964 @lilypond[quote, verbatim]
973 <f, c f a c' f'>1^\markup {
974 \fret-diagram-terse #"1-(;3;3;2;1;1-);"
976 <g, d g b d' g'>1^\markup {
977 \fret-diagram-terse #"3-(;5;5;4;3;3-);"
983 Fingering indications can be included in the fret-diagram-terse markup string.
985 @c Need to use override to enable fingerings to show this -- can we do so?
986 @lilypond[quote, verbatim]
994 \override Voice.TextScript.fret-diagram-details.finger-code = #'below-string
996 <c e g c' e'>1^\markup {
997 \fret-diagram-terse #"x;3-3;2-2;o;1-1;o;"
999 <d a d' f'>1^\markup {
1000 \fret-diagram-terse #"x;x;o;2-2;3-3;1-1;"
1006 Other fret diagram properties must be adjusted using
1007 @code{\override} when using the fret-diagram-terse markup.
1009 @cindex fret-diagram-verbose markup
1012 @funindex \fret-diagram-verbose
1014 The fret-diagram-verbose markup string is in the format of a Scheme list. Each
1015 element of the list indicates an item to be placed on the fret diagram.
1017 @lilypond[quote, verbatim]
1026 <c e g c' e'>1^\markup {
1027 \fret-diagram-verbose #'(
1036 <d a d' f'>1^\markup {
1037 \fret-diagram-verbose #'(
1050 Fingering indications and barres can be included in a
1051 fret-diagram-verbose markup string. Unique to the
1052 fret-diagram-verbose interface is a capo indication that
1053 can be placed on the fret diagram. The capo indication is
1054 a thick bar that covers all strings. The fret with the
1055 capo will be the lowest fret in the fret diagram.
1057 Fingering indication dots can be colored as well as parenthesized;
1058 the parenthesis's color can also be altered independently.
1060 Markups can be placed into the dots as well.
1062 @c \override is necessary to make fingering visible
1063 @lilypond[quote, verbatim]
1072 \override Voice.TextScript.fret-diagram-details.finger-code = #'below-string
1073 <f, c f a c' f'>1^\markup {
1074 \fret-diagram-verbose #'(
1084 <g, b, d g b g'>1^\markup {
1085 \fret-diagram-verbose #'(
1094 <c g c' e' g'>1^\markup {
1095 \fret-diagram-verbose #'(
1103 \override Voice.TextScript.size = 1.4
1104 <c g c' e' g'>1^\markup {
1105 \fret-diagram-verbose #'(
1106 (place-fret 6 3 1 red parenthesized default-paren-color)
1107 (place-fret 5 3 1 inverted)
1108 (place-fret 4 5 2 blue parenthesized)
1109 (place-fret 3 5 3 blue)
1110 (place-fret 2 5 4 blue)
1111 (place-fret 1 3 1 inverted)
1114 \override Voice.TextScript.size = 1.5
1115 <b, fis b dis' fis'>1^\markup {
1116 \override #'(fret-diagram-details . ((finger-code . in-dot)))
1117 \fret-diagram-verbose #`(
1119 (place-fret 4 4 "fis" red)
1120 (place-fret 3 4 "b" red)
1127 \musicglyph #"accidentals.sharp"} #}
1136 All other fret diagram properties must be adjusted using
1137 @code{\override} when using the fret-diagram-verbose markup.
1140 The following example shows the three fret-diagram markup
1141 interfaces, along with examples of common tweaks. For example,
1142 the size of the verbose fret diagram is reduced to 0.75, and the
1143 finger indications are specified to appear below the diagram. The
1144 terse diagram includes tweaks to specify placement of finger code
1147 @lilypond[verbatim,ragged-right,quote]
1151 \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
1155 \override #'(size . 0.75) {
1156 \override #'(finger-code . below-string) {
1157 \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
1168 \override #'(dot-radius . 0.35) {
1169 \override #'(finger-code . in-dot) {
1170 \override #'(dot-color . white) {
1171 \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
1181 @cindex customized fret diagram
1182 @cindex fret diagram, customized
1183 @cindex diagram, fret, customized
1185 @funindex fret-diagram-interface
1187 The graphical layout of a fret diagram can be customized according to
1188 user preference through the properties of the
1189 @code{fret-diagram-interface}. Details are found at
1190 @rinternals{fret-diagram-interface}. For a fret diagram
1191 markup, the interface properties belong to @code{Voice.TextScript}.
1195 @lilypondfile[verbatim,quote,texidoc,doctitle]
1196 {changing-fret-orientations.ly}
1198 @lilypondfile[verbatim,quote,texidoc,doctitle]
1199 {customizing-markup-fret-diagrams.ly}
1203 @ref{Instrument Specific Markup}.
1206 @rlsr{Fretted strings}.
1208 Internals Reference:
1209 @rinternals{fret-diagram-interface}.
1212 @node Predefined fret diagrams
1213 @unnumberedsubsubsec Predefined fret diagrams
1215 @cindex fret diagrams
1216 @cindex fret diagrams, ukulele
1217 @cindex fret diagrams, mandolin
1218 @cindex chord diagrams
1220 @funindex FretBoards
1221 @funindex stringTunings
1223 Fret diagrams can be displayed using the @code{FretBoards} context. By
1224 default, the @code{FretBoards} context will display fret diagrams that
1225 are stored in a lookup table:
1227 @lilypond[verbatim, ragged-right, quote]
1228 \include "predefined-guitar-fretboards.ly"
1236 The default predefined fret diagrams are contained in the file
1237 @file{predefined-guitar-fretboards.ly}. Fret diagrams are
1238 stored based on the pitches of a chord and the value of
1239 @code{stringTunings} that is currently in use.
1240 @file{predefined-guitar-fretboards.ly} contains predefined
1241 fret diagrams only for @code{guitar-tuning}. Predefined fret
1242 diagrams can be added for other instruments or other tunings
1243 by following the examples found in
1244 @file{predefined-guitar-fretboards.ly}.
1246 Fret diagrams for the ukulele are contained in the file @*
1247 @file{predefined-ukulele-fretboards.ly}.
1249 @lilypond[verbatim, ragged-right, quote]
1250 \include "predefined-ukulele-fretboards.ly"
1252 myChords = \chordmode { a1 a:m a:aug }
1259 \set Staff.stringTunings = #ukulele-tuning
1264 Fret diagrams for the mandolin are contained in the file @*
1265 @file{predefined-mandolin-fretboards.ly}.
1267 @lilypond[verbatim, ragged-right, quote]
1268 \include "predefined-mandolin-fretboards.ly"
1270 myChords = \chordmode { c1 c:m7.5- c:aug }
1277 \set Staff.stringTunings = #mandolin-tuning
1282 Chord pitches can be entered
1283 either as simultaneous music or using chord mode (see
1284 @ref{Chord mode overview}).
1286 @lilypond[verbatim, ragged-right,quote]
1287 \include "predefined-guitar-fretboards.ly"
1294 @cindex chord names with fret diagrams
1295 @cindex fret diagrams with chord names
1297 @funindex ChordNames
1298 @funindex \chordmode
1300 It is common that both chord names and fret diagrams are displayed together.
1301 This is achieved by putting a @code{ChordNames} context in parallel with
1302 a @code{FretBoards} context and giving both contexts the same music.
1304 @lilypond[verbatim, ragged-right, quote]
1305 \include "predefined-guitar-fretboards.ly"
1306 mychords = \chordmode{
1320 @cindex transposing fret diagrams
1321 @cindex fret diagrams, transposing
1322 @cindex diagrams, fret, transposing
1324 Predefined fret diagrams are transposable, as long as a diagram for the
1325 transposed chord is stored in the fret diagram table.
1327 @lilypond[verbatim, ragged-right, quote]
1328 \include "predefined-guitar-fretboards.ly"
1329 mychords = \chordmode{
1335 \transpose c e { \mychords }
1348 The predefined fret diagram table for guitar contains eight chords (major, minor,
1349 augmented, diminished, dominant seventh, major seventh, minor seventh, dominant ninth)
1350 for each of 17 keys.
1351 The predefined fret diagram table for ukulele contains these chords
1352 plus an additional three chords (major sixth, suspended second, and
1354 A complete list of the predefined fret diagrams is
1355 shown in @ref{Predefined fretboard diagrams}. If there is no entry in
1356 the table for a chord, the FretBoards engraver will calculate a
1357 fret-diagram using the automatic fret diagram functionality described in
1358 @ref{Automatic fret diagrams}.
1360 @lilypond[verbatim, ragged-right, quote]
1361 \include "predefined-guitar-fretboards.ly"
1362 mychords = \chordmode{
1376 @cindex fret diagrams, adding custom
1377 @cindex custom fret diagrams, adding
1378 @cindex adding custom fret diagrams
1380 Fret diagrams can be added to the fret diagram table. To add a diagram,
1381 you must specify the hash table for the diagram, the chord for the
1382 diagram, the tuning to be used, and
1383 a definition for the diagram. Normally, the hash table will be
1384 @var{default-fret-table}. The diagram definition can be either a
1385 fret-diagram-terse definition string or a fret-diagram-verbose
1388 @lilypond[verbatim, ragged-right, quote]
1389 \include "predefined-guitar-fretboards.ly"
1391 \storePredefinedDiagram #default-fret-table
1392 \chordmode { c:maj9 }
1396 mychords = \chordmode {
1410 Different fret diagrams for the same chord name can be stored using different
1411 octaves of pitches. The different octave should be at least two octaves
1412 above or below the default octave, because the octaves above and below the
1413 default octave are used for transposing fretboards.
1415 @lilypond[verbatim, ragged-right, quote]
1416 \include "predefined-guitar-fretboards.ly"
1418 \storePredefinedDiagram #default-fret-table
1421 #(offset-fret 2 (chord-shape 'bes guitar-tuning))
1423 mychords = \chordmode {
1437 @cindex fretted instruments, chord shapes
1438 @cindex chord shapes for fretted instruments
1440 @funindex \addChordShape
1441 @funindex \storePredefinedDiagram
1443 In addition to fret diagrams, LilyPond stores an internal list of chord
1444 shapes. The chord shapes are fret diagrams that can be shifted along
1445 the neck to different positions to provide different chords. Chord
1446 shapes can be added to the internal list and then used to define
1447 predefined fret diagrams. Because they can be moved to various
1448 positions on the neck, chord shapes will normally not contain
1449 any open strings. Like fret diagrams, chord shapes can be
1450 entered as either fret-diagram-terse strings or fret-diagram-verbose
1453 @lilypond[verbatim, ragged-right, quote]
1454 \include "predefined-guitar-fretboards.ly"
1456 % Add a new chord shape
1458 \addChordShape #'powerf #guitar-tuning #"1-1;3-3;3-4;x;x;x;"
1460 % add some new chords based on the power chord shape
1462 \storePredefinedDiagram #default-fret-table
1465 #(chord-shape 'powerf guitar-tuning)
1466 \storePredefinedDiagram #default-fret-table
1469 #(offset-fret 2 (chord-shape 'powerf guitar-tuning))
1471 mychords = \chordmode{
1485 The graphical layout of a fret diagram can be customized according to
1486 user preference through the properties of the
1487 @code{fret-diagram-interface}. Details are found at
1488 @rinternals{fret-diagram-interface}. For a predefined fret diagram,
1489 the interface properties belong to @code{FretBoards.FretBoard}.
1493 @lilypondfile[verbatim,quote,texidoc,doctitle]
1494 {customizing-fretboard-fret-diagrams.ly}
1496 @lilypondfile[verbatim,quote,texidoc,doctitle]
1497 {defining-predefined-fretboards-for-other-instruments.ly}
1499 @lilypondfile[verbatim,quote,texidoc,doctitle,ragged-right]
1500 {chordchanges-for-fretboards.ly}
1502 @lilypondfile[verbatim,quote,texidoc,doctitle]
1503 {fretboards-alternate-tables.ly}
1507 @ref{Custom tablatures},
1508 @ref{Automatic fret diagrams},
1509 @ref{Chord mode overview},
1510 @ref{Predefined fretboard diagrams}.
1513 @file{ly/predefined-guitar-fretboards.ly}, @*
1514 @file{ly/predefined-guitar-ninth-fretboards.ly}, @*
1515 @file{ly/predefined-ukulele-fretboards.ly}, @*
1516 @file{ly/predefined-mandolin-fretboards.ly}.
1519 @rlsr{Fretted strings}.
1521 Internals Reference:
1522 @rinternals {fret-diagram-interface}.
1525 @node Automatic fret diagrams
1526 @unnumberedsubsubsec Automatic fret diagrams
1528 @cindex fret diagrams, automatic
1529 @cindex chord diagrams, automatic
1530 @cindex automatic fret diagrams
1531 @cindex automatic chord diagrams
1533 Fret diagrams can be automatically created from entered notes using the
1534 @code{FretBoards} context. If no predefined diagram is available for
1535 the entered notes in the active @code{stringTunings}, this context
1536 calculates strings and frets that can be used to play the notes.
1538 @lilypond[quote,ragged-right,verbatim]
1557 @funindex \predefinedFretboardsOff
1558 @funindex \predefinedFretboardsOn
1560 As no predefined diagrams are loaded by default, automatic calculation
1561 of fret diagrams is the default behavior. Once default diagrams are
1562 loaded, automatic calculation can be enabled and disabled with predefined
1565 @lilypond[quote,ragged-right,verbatim]
1567 \storePredefinedDiagram #default-fret-table
1570 #"x;3-1-(;5-2;5-3;5-4;3-1-1-);"
1579 \predefinedFretboardsOff
1581 \predefinedFretboardsOn
1595 Sometimes the fretboard calculator will be unable to find
1596 an acceptable diagram. This can often be remedied by
1597 manually assigning a note to a string. In many cases, only one
1598 note need be manually placed on a string; the rest of
1599 the notes will then be placed appropriately by the
1600 @code{FretBoards} context.
1602 @cindex fret diagrams, adding fingerings
1603 @cindex fingerings, adding to fret diagrams
1605 Fingerings can be added to FretBoard fret diagrams.
1607 @lilypond[quote, verbatim]
1615 <c-3 e-2 g c'-1 e'>1
1626 @funindex minimumFret
1628 The minimum fret to be used in calculating strings and frets for
1629 the FretBoard context can be set with the @code{minimumFret}
1632 @lilypond[quote, verbatim]
1641 \set FretBoards.minimumFret = #5
1652 The strings and frets for the @code{FretBoards} context depend
1653 on the @code{stringTunings} property, which has the same meaning
1654 as in the TabStaff context. See @ref{Custom tablatures} for
1655 information on the @code{stringTunings} property.
1657 The graphical layout of a fret diagram can be customized according to
1658 user preference through the properties of the
1659 @code{fret-diagram-interface}. Details are found at
1660 @rinternals{fret-diagram-interface}. For a @code{FretBoards} fret
1661 diagram, the interface properties belong to
1662 @code{FretBoards.FretBoard}.
1666 @code{\predefinedFretboardsOff},
1667 @code{\predefinedFretboardsOn}.
1672 @ref{Custom tablatures}.
1675 @rlsr{Fretted strings}.
1677 Internals Reference:
1678 @rinternals {fret-diagram-interface}.
1681 Automatic fretboard calculations do not work properly for instruments
1682 with non-monotonic tunings.
1685 @node Right-hand fingerings
1686 @unnumberedsubsubsec Right-hand fingerings
1688 @cindex fretted instruments, right hand fingerings
1689 @cindex fingerings, right hand for fretted instruments
1690 @cindex right hand fingerings for fretted instruments
1692 @funindex \rightHandFinger
1694 Right-hand fingerings @var{p-i-m-a} must be entered using
1695 @code{\rightHandFinger} followed by a number.
1697 @warning{If the number is entered in Scheme notation, remember to append
1698 a space before following it with a closing @code{>} or similar.}
1700 @lilypond[quote,verbatim,fragment]
1702 c4\rightHandFinger #1
1703 e\rightHandFinger #2
1704 g\rightHandFinger #3
1705 c'\rightHandFinger #4
1706 <c\rightHandFinger #1 e\rightHandFinger #2
1707 g\rightHandFinger #3 c'\rightHandFinger #4 >1
1710 For convenience, you can abbreviate @code{\rightHandFinger} to something
1711 short, for example @code{RH},
1720 @lilypondfile[verbatim,quote,texidoc,doctitle]
1721 {placement-of-right-hand-fingerings.ly}
1723 @lilypondfile[verbatim,quote,texidoc,doctitle]
1724 {fingerings,-string-indications,-and-right-hand-fingerings.ly}
1728 @rlsr{Fretted strings}.
1730 Internals Reference:
1731 @rinternals{StrokeFinger}.
1737 Most of the notational issues associated with guitar music are
1738 covered sufficiently in the general fretted strings section, but there
1739 are a few more worth covering here. Occasionally users want to
1740 create songbook-type documents having only lyrics with chord
1741 indications above them. Since LilyPond is a music typesetter,
1742 it is not recommended for documents that have no music notation
1743 in them. A better alternative is a word processor, text editor,
1744 or, for experienced users, a typesetter like GuitarTeX.
1747 * Indicating position and barring::
1748 * Indicating harmonics and dampened notes::
1749 * Indicating power chords::
1752 @node Indicating position and barring
1753 @unnumberedsubsubsec Indicating position and barring
1755 @cindex indicating position and barring for fretted instruments
1756 @cindex fretted instruments, indicating position and barring
1758 This example demonstrates how to include guitar position and
1759 barring indications.
1761 @lilypond[quote,ragged-right,verbatim,fragment]
1766 \override TextSpanner.bound-details.left.text = #"XII "
1768 b16 e g e b g\stopTextSpan
1775 @ref{Text spanners}.
1778 @rlsr{Fretted strings},
1779 @rlsr{Expressive marks}.
1782 @node Indicating harmonics and dampened notes
1783 @unnumberedsubsubsec Indicating harmonics and dampened notes
1785 @cindex fretted instruments, dampened notes
1786 @cindex fretted instruments, harmonics
1787 @cindex dampened notes on fretted instruments
1788 @cindex harmonics on fretted instruments
1790 Special note heads can be used to indicate dampened notes or
1791 harmonics. Harmonics are normally further explained with a
1794 @lilypond[quote,ragged-right,verbatim]
1797 \override Staff.NoteHead.style = #'harmonic-mixed
1798 d'^\markup { \italic { \fontsize #-2 { "harm. 12" }}} <g b>1
1802 Dampened notes (also called @notation{dead notes}) are supported
1803 within normal and tablature staves:
1805 @lilypond[quote,ragged-right,verbatim]
1807 < a\3 \deadNote c\2 a'\1 >4
1808 < b\3 \deadNote d\2 b'\1 >
1809 < c\3 \deadNote e\2 c'\1 >
1811 \tuplet 3/2 { g8 b e }
1826 Another playing technique (especially used on electric guitars) is
1827 called @notation{palm mute}. The string is hereby partly muted by the
1828 palm of the striking hand (hence the name). Lilypond supports
1829 the notation of palm mute-style notes by changing the note head to a
1832 @lilypond[quote,ragged-right,verbatim]
1833 \new Voice { % Warning: explicit Voice instantiation is
1834 % required to have palmMuteOff work properly
1835 % when palmMuteOn comes at the beginning of
1840 e8^\markup { \musicglyph #"noteheads.u2do" = palm mute }
1843 e e \palmMute e e e |
1844 e8 \palmMute { e e e } e e e e |
1845 < \palmMute e b' e >8 \palmMute { e e e } < \palmMute e b' e >2
1852 @rlsr{Fretted strings}.
1855 @ref{Special note heads},
1856 @ref{Note head styles}.
1859 @node Indicating power chords
1860 @unnumberedsubsubsec Indicating power chords
1862 @funindex \powerChords
1864 @cindex power chords
1865 @cindex chords, power
1867 Power chords and their symbols can be engraved in chord mode or as chord
1870 @lilypond[quote,ragged-right,verbatim]
1871 ChordsAndSymbols = {
1876 \set minimumFret = #8
1880 \set minimumFret = #5
1900 Power chord symbols are automatically switched off as soon as one of the
1901 other common chord modifier is used:
1903 @lilypond[quote,ragged-right,verbatim]
1904 mixedChords = \chordmode {
1929 @rglos{power chord}.
1932 @ref{Extended and altered chords},
1933 @ref{Printing chord names}.
1936 @rlsr{Fretted strings}.
1943 * Banjo tablatures::
1946 @node Banjo tablatures
1947 @unnumberedsubsubsec Banjo tablatures
1949 @cindex banjo tablatures
1950 @cindex tablature, banjo
1952 LilyPond has basic support for the five-string banjo. When making tablatures
1953 for five-string banjo, use the banjo tablature format function to get
1954 correct fret numbers for the fifth string:
1956 @c due to crazy intervals of banjo music, absolute pitch is recommended
1958 @lilypond[quote,ragged-right,verbatim]
1960 g8 d' g'\5 a b g e d' |
1961 g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
1966 \new Staff \with { \omit StringNumber }
1967 { \clef "treble_8" \music }
1968 \new TabStaff \with {
1969 tablatureFormat = #fret-number-tablature-format-banjo
1970 stringTunings = #banjo-open-g-tuning
1976 @cindex banjo tunings
1977 @cindex tunings, banjo
1979 @funindex banjo-c-tuning
1980 @funindex banjo-modal-tuning
1981 @funindex banjo-open-d-tuning
1982 @funindex banjo-open-dm-tuning
1983 @funindex four-string-banjo
1985 A number of common tunings for the five-string banjo are predefined:
1986 @code{banjo-c-tuning} (gCGBD), @code{banjo-modal-tuning} (gDGCD),
1987 @code{banjo-open-d-tuning} (aDF#AD) and @code{banjo-open-dm-tuning}
1990 These may be converted to four-string tunings using the
1991 @code{four-string-banjo} function:
1994 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
1999 @file{ly/string-tunings-init.ly}.
2002 @rlsr{Fretted strings}.
2012 @node Lute tablatures
2013 @unnumberedsubsubsec Lute tablatures
2015 @cindex lute tablatures
2016 @cindex tablature, lute
2018 LilyPond supports tablature for lute.
2020 To get additional bass strings use @code{additionalBassStrings}, where the
2021 pitches of those strings are set. They will be printed below lowest line as:
2022 a, /a, //a, ///a, 4, 5 etc.
2024 @code{fret-letter-tablature-format} for @code{tablatureFormat} should be used,
2025 probably @code{fretLabels} for further customizing.
2027 @lilypond[quote,ragged-right,verbatim]
2028 m = { f'4 d' a f d a, g, fis, e, d, c, \bar "|." }
2032 \new Staff { \clef bass \cadenzaOn \m }
2038 tablatureFormat = #fret-letter-tablature-format
2042 stringTunings = \stringTuning <a, d f a d' f'>
2043 additionalBassStrings = \stringTuning <c, d, e, fis, g,>
2044 fretLabels = #'("a" "b" "r" "d" "e" "f" "g" "h" "i" "k")
2050 @cindex lute tunings
2051 @cindex tunings, lute
2054 Using @code{FretBoards} with @code{additionalBassStrings} is not supported and
2055 will yield unsatisfying results.