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. See TRANSLATION for details.
11 @node Fretted string instruments
12 @section Fretted string instruments
14 @lilypondfile[quote]{fretted-headword.ly}
16 This section discusses several aspects of music notation that are unique
17 to fretted string instruments.
20 @cindex guitar tablature
23 * Common notation for fretted strings::
28 @node Common notation for fretted strings
29 @subsection Common notation for fretted strings
31 This section discusses common notation that is unique
32 to fretted string instruments.
35 * References for fretted strings::
36 * String number indications::
37 * Default tablatures::
39 * Automatic fret diagrams::
40 * Fret diagram markups::
41 * Right-hand fingerings::
44 @node References for fretted strings
45 @subsubsection References for fretted strings
47 Music for fretted string instruments is normally notated on
48 a single staff, either in traditional music notation or in
49 tablature. Sometimes the two types are combined, and it is
50 especially common in popular music to use chord diagrams above
51 a staff of traditional notation. The guitar and the banjo are
52 transposing instruments, sounding an octave lower than written.
53 Scores for these instruments should use the @code{"treble_8"} clef.
54 Some other elements pertinent to fretted string instruments
55 are covered elsewhere:
58 @item Fingerings are indicated with @ref{Fingering instructions}.
60 @item Instructions for @notation{Laissez vibrer} ties
61 as well as ties on arpeggios and tremolos is described in
64 @item Instructions on handling multiple voices is described
65 in @ref{Collision resolution}.
72 @ref{Instrument names},
73 @ref{Writing music in parallel},
74 @ref{Fingering instructions},
77 @ref{List of articulations},
80 @node String number indications
81 @subsubsection String number indications
83 @cindex String numbers
85 The string on which a note should be played may be indicated by
86 appending @code{\@var{number}} to a note inside a chord construct
89 @warning{String numbers @strong{must} be defined inside a chord
90 construct even if there is only a single note.}
92 @lilypond[verbatim,quote,relative=0]
98 When fingerings and string indications are used together, their
99 placement is controlled by the order in which the two items appear
102 @lilypond[verbatim,quote,relative=1]
110 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
111 {controlling-the-placement-of-chord-fingerings.ly}
113 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
114 {allowing-fingerings-to-be-printed-inside-the-staff.ly}
119 @ref{Fingering instructions}.
122 @rlsr{Fretted strings}.
125 @rinternals{StringNumber},
126 @rinternals{Fingering}.
129 @node Default tablatures
130 @subsubsection Default tablatures
131 @cindex Tablatures, basic
132 @cindex Tablatures, default
134 Tablature notation is used for notating music for plucked string
135 instruments. Pitches are not denoted with note heads, but by
136 numbers indicating on which string and fret a note must be played.
137 LilyPond offers limited support for tablature.
139 The string number associated with a note is given as a backslash
140 followed by a number. By default, string 1 is the highest,
141 and the tuning defaults to the standard guitar tuning (with 6 strings).
142 The notes are printed as tablature, by using @code{TabStaff} and
143 @code{TabVoice} contexts
145 @lilypond[quote,ragged-right,fragment,verbatim]
152 @funindex minimumFret
156 When no string is specified for a note, the note is assigned to
157 the lowest string that can generate the note with a fret number
158 greater than or equal to @code{minimumFret} is selected. The
159 default value for @code{minimumFret} is 0.
162 @lilypond[quote,ragged-right,verbatim]
164 \new Staff \relative c {
169 \new TabStaff \relative c {
171 \set TabStaff.minimumFret = #5
179 The direction of stems is controlled the same way in tablature as
180 in traditional notation. Beams can be made horizontal:
182 @lilypond[quote,ragged-right,verbatim]
188 \override Beam #'damping = #100000
195 Polyphony is created the same way in a @code{TabStaff} as in a
198 @lilypond[quote,ragged-right,verbatim]
199 upper = \relative c' {
203 r4. r8 e, fis g16 b g e e' b c b a g fis e
206 lower = \relative c {
209 r16 e d c b a g4 fis8 e fis g a b c
214 \new StaffGroup = "tab with traditional" <<
215 \new Staff = "guitar traditional" <<
217 \context Voice = "upper" \upper
218 \context Voice = "lower" \lower
220 \new TabStaff = "guitar tab" <<
221 \context TabVoice = "upper" \upper
222 \context TabVoice = "lower" \lower
235 @rlsr{Fretted strings}.
238 @rinternals{TabNoteHead},
239 @rinternals{TabStaff},
240 @rinternals{TabVoice},
245 Chords are not handled in a special way, and hence the automatic
246 string selector may easily select the same string for two notes in
249 In order to handle @code{\partcombine}, a @code{TabStaff} must use
250 specially-created voices:
252 @lilypond[quote,ragged-right,verbatim]
253 melodia = \partcombine { e4 g g g }{ e4 e e e }
256 \new TabVoice = "one" s1
257 \new TabVoice = "two" s1
258 \new TabVoice = "shared" s1
259 \new TabVoice = "solo" s1
266 @node Custom tablatures
267 @subsubsection Custom tablatures
268 @cindex Tablatures, custom
270 You can change the tuning of the strings. A string tuning is
271 given as a Scheme list with one integer number for each string,
272 the number being the pitch (measured in semitones relative to
273 middle C) of an open string. The numbers specified for
274 @code{stringTunings} are the numbers of semitones to subtract or
275 add, starting the specified pitch by default middle C, in string
276 order. LilyPond automatically calculates the number of strings by
277 looking at @code{stringTunings}.
279 In the next example, @code{stringTunings} is set for the pitches
282 @lilypond[quote,ragged-right,fragment,verbatim]
284 \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
286 a,4 c' a e' e c' a e'
291 LilyPond comes with predefined string tunings for banjo, mandolin,
292 guitar and bass guitar. Lilypond automatically sets the correct
293 transposition for predefined tunings. The following example is
294 for bass guitar, which sounds an octave lower than written.
296 @lilypond[quote,ragged-right,verbatim]
305 \set TabStaff.stringTunings = #bass-tuning
313 The default string tuning is @code{guitar-tuning} (the standard
314 EADGBE tuning). Some other predefined tunings are
315 @code{guitar-open-g-tuning}, @code{mandolin-tuning} and
316 @code{banjo-open-g-tuning}.
321 @rlsr{Fretted strings}.
323 The file @file{scm/@/output@/-lib@/.scm} contains the predefined string
327 @rinternals{Tab_note_heads_engraver}.
331 No guitar special effects have been implemented.
333 @node Automatic fret diagrams
334 @subsubsection Automatic fret diagrams
335 @cindex fret diagrams
336 @cindex chord diagrams
338 Fret diagrams can be automatically created from entered notes using the
339 @code{FretBoards} context. This context calculates strings and frets
340 which can be used to play the notes.
342 @lilypond[quote,ragged-right,verbatim]
344 \context ChordNames {
349 \context FretBoards {
361 Notes can be explicitly placed on a string. It is often enough
362 to place only the lowest note on an explicit string; the rest of
363 the notes will then be placed appropriately by the @code{FretBoards}
366 @lilypond[quote,ragged-right,verbatim]
368 \context ChordNames {
373 \context FretBoards {
389 Fingerings can be added to FretBoard fret diagrams.
391 @lilypond[quote, verbatim]
393 \context ChordNames {
398 \context FretBoards {
399 < c\5-3 e-2 g c'-1 e' > 1
410 The strings and frets for the @code{FretBoards} context depend
411 on the @code{stringTunings} property, which has the same meaning
412 as in the TabStaff context. See @ref{Custom tablatures} for
413 information on the @code{stringTunings} property.
415 The graphical layout of a fret diagram can be customized according to
416 user preference through the properties of the @code{fret-diagram-interface}.
417 Details are found at @rinternals{fret-diagram-interface}. For a
418 @code{FretBoards} fret diagram, the interface properties belong to
422 The minimum fret to be used in calculating strings and frets for
423 the FretBoard context can be set with the @code{minimumFret}
426 @c TODO -- snippet showing minimum fret.
428 @c TODO -- snippet for using StringTunings
433 @ref{Custom tablatures}
436 @rlsr{Fretted strings}.
439 @rinternals {fret-diagram-interface}.
442 @node Fret diagram markups
443 @subsubsection Fret diagram markups
444 @cindex fret diagrams
445 @cindex chord diagrams
447 Fret diagrams can be added to music as a markup to the desired
448 note. The markup contains information about the desired fret
449 diagram. There are three different fret-diagram markup
450 interfaces: standard, terse, and verbose. The three interfaces
451 produce equivalent markups, but have varying amounts of
452 information in the markup string. Details about the markup
453 interfaces are found at @ref{Text markup commands}.
455 The standard fret diagram markup string indicates the string
456 number and the fret number for each dot to be placed on the string.
457 In addition, open and unplayed (muted) strings can be indicated.
459 @lilypond[quote, verbatim]
461 \context ChordNames {
468 < c e g c' e' > 1 ^\markup
469 \fret-diagram #"6-x;5-3;4-2;3-o;2-1;1-o;"
470 < d a d' f'> ^\markup
471 \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-1;"
476 Barre indications can be added to the diagram from
477 the fret-diagram markup string.
479 @lilypond[quote, verbatim]
481 \context ChordNames {
488 < f, c f a c' f'>1 ^\markup
489 \fret-diagram #"c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
490 < g, b, d g b' g'> ^\markup
491 \fret-diagram #"c:6-1-3;6-3;5-5;4-5;3-4;2-3;1-3;"
496 The size of the fret diagram, and the number of frets in the diagram
497 can be changed in the fret-diagram markup string.
499 @lilypond[quote, verbatim]
501 \context ChordNames {
508 < f, c f a c' f'>1 ^\markup
509 \fret-diagram #"s:1.5;c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
510 < g, b, d g b' g'> ^\markup
511 \fret-diagram #"h:6;6-3;5-2;4-o;3-o;2-o;1-3;"
516 The number of strings in a fret diagram can be changed to accomodate
517 different instruments such as banjos and ukeleles with the fret-diagram
520 @lilypond[quote, verbatim]
522 \context ChordNames {
528 %% A chord for ukelele
529 a'1 ^\markup \fret-diagram #"w:4;4-2-2;3-1-1;2-o;1-o;"
534 Fingering indications can be added, and the location of fingering labels
535 can be controlled by the fret-diagram markup string.
537 @lilypond[quote, verbatim]
539 \context ChordNames {
546 < c e g c' e' > 1 ^\markup
547 \fret-diagram #"f:1;6-x;5-3-3;4-2-2;3-o;2-1-1;1-o;"
548 < d a d' f'> ^\markup
549 \fret-diagram #"f:2;6-x;5-x;4-o;3-2-2;2-3-3;1-1-1;"
554 Dot radius and dot position can be controlled with the fret-diagram
557 @lilypond[quote, verbatim]
559 \context ChordNames {
566 < c e g c' e' > 1 ^\markup
567 \fret-diagram #"d:0.35;6-x;5-3;4-2;3-o;2-1;1-o;"
568 < d a d' f'> ^\markup
569 \fret-diagram #"p:0.2;6-x;5-x;4-o;3-2;2-3;1-1;"
574 The fret-diagram-terse markup string omits string numbers; the string
575 number is implied by the presence of semicolons. There is one semicolon
576 for each string in the diagram. The first semicolon corresponds to the
577 highest string number and the last semicolon corresponds to the first string.
578 Mute strings, open strings, and fret numbers can be indicated.
580 @lilypond[quote, verbatim]
582 \context ChordNames {
589 < c e g c' e' > 1 ^\markup
590 \fret-diagram-terse #"x;3;2;o;1;o;"
591 < d a d' f'> ^\markup
592 \fret-diagram-terse #"x;x;o;2;3;1;"
597 Barre indicators can be included in the fret-diagram-terse markup string.
599 @lilypond[quote, verbatim]
601 \context ChordNames {
608 < f, c f a c' f'>1 ^\markup
609 \fret-diagram-terse #"1-(;3;3;2;1;1-);"
610 < g, b, d g b' g'> ^\markup
611 \fret-diagram-terse #"3-(;5;5;4;3;3-);"
616 Fingering indications can be included in the fret-diagram-terse markup string.
618 @c Need to use override to enable fingerings to show this -- can we do so?
619 @lilypond[quote, verbatim]
621 \context ChordNames {
627 \override Voice.TextScript
628 #'fret-diagram-details #'finger-code = #'below-string
630 < c e g c' e' > 1 ^\markup
631 \fret-diagram-terse #"x;3-3;2-2;o;1-1;o;"
632 < d a d' f'> ^\markup
633 \fret-diagram-terse #"x;x;o;2-2;3-3;1-1;"
638 Other fret diagram properties must be adjusted using @code{\override} when using
639 the fret-diagram-terse markup.
641 The fret-diagram-verbose markup string is in the format of a Scheme list. Each
642 element of the list indicates an item to be placed on the fret diagram.
644 @lilypond[quote, verbatim]
645 << \context ChordNames {
652 < c e g c' e' > 1 ^\markup
653 \fret-diagram-verbose #'(
661 < d a d' f'> ^\markup
662 \fret-diagram-verbose #'(
674 Fingering indications and barres can be included in a
675 fret-diagram-verbose markup string.
677 @c \override is necessary to make fingering visible
678 @lilypond[quote, verbatim]
680 \context ChordNames {
687 \override Voice.TextScript
688 #'fret-diagram-details #'finger-code = #'below-string
690 < f, c f a c' f'>1 ^\markup
691 \fret-diagram-verbose #'(
700 < g, b, d g b' g'> ^\markup
701 \fret-diagram-verbose #'(
713 All other fret diagram properties must be adjusted using @code{\override}
714 when using the fret-diagram-verbose markup.
717 The following example shows the three fret-diagram markup
718 interfaces, along with examples of common tweaks. For example,
719 the size of the verbose fret diagram is reduced to 0.75, and the
720 finger indications are specified to appear below the diagram. The
721 terse diagram includes tweaks to specify placement of finger code
724 @lilypond[verbatim,ragged-right,quote]
727 d^\markup \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
729 fis^\markup \override #'(size . 0.75) {
730 \override #'(finger-code . below-string) {
731 \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
740 c^\markup \override #'(dot-radius . 0.35) {
741 \override #'(finger-code . in-dot) {
742 \override #'(dot-color . white) {
743 \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
752 The graphical layout of a fret diagram can be customized according to
753 user preference through the properties of the @code{fret-diagram-interface}.
754 Details are found at @rinternals{fret-diagram-interface}. For a fret diagram
755 markup , the interface properties belong to @code{Voice.TextScript}.
758 TODO create snippets for changing properties. Use regression test?
763 @ref{Text markup commands}.
766 @rlsr{Fretted strings}.
769 @rinternals{fret-diagram-interface}.
771 @node Right-hand fingerings
772 @subsubsection Right-hand fingerings
774 Right-hand fingerings @var{p-i-m-a} must be entered within a
775 chord construct @code{<>} for them to be printed in the score,
776 even when applied to a single note.
778 @warning{There @strong{must} be a hyphen after the note and a space
779 before the closing @code{>}.}
781 @lilypond[quote,verbatim,relative=0]
783 <c-\rightHandFinger #1 >4
784 <e-\rightHandFinger #2 >
785 <g-\rightHandFinger #3 >
786 <c-\rightHandFinger #4 >
787 <c,-\rightHandFinger #1 e-\rightHandFinger #2 g-\rightHandFinger #3 c-\rightHandFinger #4 >1
790 For convenience, you can abbreviate @code{\rightHandFinger} to something
791 short, for example @code{RH},
794 #(define RH rightHandFinger)
797 @cindex fingerings, right hand, for guitar
798 @cindex right hand fingerings for guitar
802 You may exercise greater control over the placement of right-hand
803 fingerings by setting @code{strokeFingerOrientations},
805 @lilypond[quote,verbatim]
806 #(define RH rightHandFinger)
809 \set strokeFingerOrientations = #'(up down)
810 <c-\RH #1 e-\RH #2 g-\RH #3 c-\RH #4 > 4
811 \set strokeFingerOrientations = #'(up right down)
812 <c-\RH #1 e-\RH #2 g-\RH #3 c-\RH #4 > 4
813 \set strokeFingerOrientations = #'(left)
814 <c-\RH #1 e-\RH #2 g-\RH #3 c-\RH #4 > 2
818 This example combines left-hand fingering, string indication, and
821 @lilypond[quote,verbatim]
822 #(define RH rightHandFinger)
835 @rlsr{Fretted strings}.
838 @rinternals{StrokeFinger}.
844 Most of the notational issues associated with guitar music are
845 covered sufficiently in the general fretted strings section, but there
846 are a few more worth covering here. Occasionally users want to
847 create songbook-type documents having only lyrics with chord
848 indications above them. Since Lilypond is a music typesetter,
849 it is not recommended for documents that have no music notation
850 in them. A better alternative is a word processor, text editor,
851 or, for experienced users, a typesetter like GuitarTeX.
854 * Indicating position and barring::
855 * Indicating harmonics and dampened notes::
858 @node Indicating position and barring
859 @subsubsection Indicating position and barring
861 This example demonstrates how to include guitar position and
864 @lilypond[quote,ragged-right,fragment,verbatim,relative=0]
868 \override TextSpanner #'bound-details #'left #'text = #"XII "
870 b16 e g e b g\stopTextSpan
880 @rlsr{Fretted strings},
881 @rlsr{Expressive marks}.
883 @node Indicating harmonics and dampened notes
884 @subsubsection Indicating harmonics and dampened notes
886 Special note heads can be used to indicate dampened notes or
887 harmonics. Harmonics are normally further explained with a
890 @lilypond[quote,ragged-right,fragment,verbatim]
893 \override Staff.NoteHead #'style = #'cross
895 \override Staff.NoteHead #'style = #'harmonic-mixed
896 d^\markup { \italic { \fontsize #-2 { "harm. 12" }}} <g b>1
903 @rlsr{Fretted strings}.
906 @ref{Special note heads},
907 @ref{Note head styles}.
916 @node Banjo tablatures
917 @subsubsection Banjo tablatures
918 @cindex Banjo tablatures
920 LilyPond has basic support for the five-string banjo. When making tablatures
921 for five-string banjo, use the banjo tablature format function to get
922 correct fret numbers for the fifth string:
924 @c due to crazy intervals of banjo music, absolute pitch is recommended
926 @lilypond[quote,ragged-right,fragment,verbatim]
928 \set TabStaff.tablatureFormat = #fret-number-tablature-format-banjo
929 \set TabStaff.stringTunings = #banjo-open-g-tuning
932 g8 d' g'\5 a b g e d' |
933 g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
939 A number of common tunings for banjo are predefined in LilyPond:
940 @code{banjo-c-tuning} (gCGBD), @code{banjo-modal-tuning} (gDGCD),
941 @code{banjo-open-d-tuning} (aDF#AD) and @code{banjo-open-dm-tuning}
944 These tunings may be converted to four string banjo tunings using the
945 @code{four-string-banjo} function:
948 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
954 @rlsr{Fretted strings}.
956 The file @file{scm/@/output@/-lib@/.scm} contains predefined banjo tunings.