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 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
180 {stem-and-beam-behavior-in-tablature.ly}
182 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
183 {polyphony-in-tablature.ly}
191 @rlsr{Fretted strings}.
194 @rinternals{TabNoteHead},
195 @rinternals{TabStaff},
196 @rinternals{TabVoice},
201 Chords are not handled in a special way, and hence the automatic
202 string selector may easily select the same string for two notes in
205 In order to handle @code{\partcombine}, a @code{TabStaff} must use
206 specially-created voices:
208 @lilypond[quote,ragged-right,verbatim]
209 melodia = \partcombine { e4 g g g }{ e4 e e e }
212 \new TabVoice = "one" s1
213 \new TabVoice = "two" s1
214 \new TabVoice = "shared" s1
215 \new TabVoice = "solo" s1
222 @node Custom tablatures
223 @subsubsection Custom tablatures
224 @cindex Tablatures, custom
226 You can change the tuning of the strings. A string tuning is
227 given as a Scheme list with one integer number for each string,
228 the number being the pitch (measured in semitones relative to
229 middle C) of an open string. The numbers specified for
230 @code{stringTunings} are the numbers of semitones to subtract or
231 add, starting the specified pitch by default middle C, in string
232 order. LilyPond automatically calculates the number of strings by
233 looking at @code{stringTunings}.
235 In the next example, @code{stringTunings} is set for the pitches
238 @lilypond[quote,ragged-right,fragment,verbatim]
240 \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
242 a,4 c' a e' e c' a e'
247 LilyPond comes with predefined string tunings for banjo, mandolin,
248 guitar and bass guitar. Lilypond automatically sets the correct
249 transposition for predefined tunings. The following example is
250 for bass guitar, which sounds an octave lower than written.
252 @lilypond[quote,ragged-right,verbatim]
261 \set TabStaff.stringTunings = #bass-tuning
269 The default string tuning is @code{guitar-tuning} (the standard
270 EADGBE tuning). Some other predefined tunings are
271 @code{guitar-open-g-tuning}, @code{mandolin-tuning} and
272 @code{banjo-open-g-tuning}.
277 @rlsr{Fretted strings}.
279 The file @file{scm/@/output@/-lib@/.scm} contains the predefined string
283 @rinternals{Tab_note_heads_engraver}.
287 No guitar special effects have been implemented.
289 @node Automatic fret diagrams
290 @subsubsection Automatic fret diagrams
291 @cindex fret diagrams
292 @cindex chord diagrams
294 Fret diagrams can be automatically created from entered notes using the
295 @code{FretBoards} context. This context calculates strings and frets
296 which can be used to play the notes.
298 @lilypond[quote,ragged-right,verbatim]
300 \context ChordNames {
305 \context FretBoards {
317 Notes can be explicitly placed on a string. It is often enough
318 to place only the lowest note on an explicit string; the rest of
319 the notes will then be placed appropriately by the @code{FretBoards}
322 @lilypond[quote,ragged-right,verbatim]
324 \context ChordNames {
329 \context FretBoards {
345 Fingerings can be added to FretBoard fret diagrams.
347 @lilypond[quote, verbatim]
349 \context ChordNames {
354 \context FretBoards {
355 < c\5-3 e-2 g c'-1 e' > 1
366 The strings and frets for the @code{FretBoards} context depend
367 on the @code{stringTunings} property, which has the same meaning
368 as in the TabStaff context. See @ref{Custom tablatures} for
369 information on the @code{stringTunings} property.
371 The graphical layout of a fret diagram can be customized according to
372 user preference through the properties of the @code{fret-diagram-interface}.
373 Details are found at @rinternals{fret-diagram-interface}. For a
374 @code{FretBoards} fret diagram, the interface properties belong to
378 The minimum fret to be used in calculating strings and frets for
379 the FretBoard context can be set with the @code{minimumFret}
382 @c TODO -- snippet showing minimum fret.
384 @c TODO -- snippet for using StringTunings
389 @ref{Custom tablatures}
392 @rlsr{Fretted strings}.
395 @rinternals {fret-diagram-interface}.
398 @node Fret diagram markups
399 @subsubsection Fret diagram markups
400 @cindex fret diagrams
401 @cindex chord diagrams
403 Fret diagrams can be added to music as a markup to the desired
404 note. The markup contains information about the desired fret
405 diagram. There are three different fret-diagram markup
406 interfaces: standard, terse, and verbose. The three interfaces
407 produce equivalent markups, but have varying amounts of
408 information in the markup string. Details about the markup
409 interfaces are found at @ref{Text markup commands}.
411 The standard fret diagram markup string indicates the string
412 number and the fret number for each dot to be placed on the string.
413 In addition, open and unplayed (muted) strings can be indicated.
415 @lilypond[quote, verbatim]
417 \context ChordNames {
424 < c e g c' e' > 1 ^\markup
425 \fret-diagram #"6-x;5-3;4-2;3-o;2-1;1-o;"
426 < d a d' f'> ^\markup
427 \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-1;"
432 Barre indications can be added to the diagram from
433 the fret-diagram markup string.
435 @lilypond[quote, verbatim]
437 \context ChordNames {
444 < f, c f a c' f'>1 ^\markup
445 \fret-diagram #"c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
446 < g, b, d g b' g'> ^\markup
447 \fret-diagram #"c:6-1-3;6-3;5-5;4-5;3-4;2-3;1-3;"
452 The size of the fret diagram, and the number of frets in the diagram
453 can be changed in the fret-diagram markup string.
455 @lilypond[quote, verbatim]
457 \context ChordNames {
464 < f, c f a c' f'>1 ^\markup
465 \fret-diagram #"s:1.5;c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
466 < g, b, d g b' g'> ^\markup
467 \fret-diagram #"h:6;6-3;5-2;4-o;3-o;2-o;1-3;"
472 The number of strings in a fret diagram can be changed to accomodate
473 different instruments such as banjos and ukeleles with the fret-diagram
476 @lilypond[quote, verbatim]
478 \context ChordNames {
484 %% A chord for ukelele
485 a'1 ^\markup \fret-diagram #"w:4;4-2-2;3-1-1;2-o;1-o;"
490 Fingering indications can be added, and the location of fingering labels
491 can be controlled by the fret-diagram markup string.
493 @lilypond[quote, verbatim]
495 \context ChordNames {
502 < c e g c' e' > 1 ^\markup
503 \fret-diagram #"f:1;6-x;5-3-3;4-2-2;3-o;2-1-1;1-o;"
504 < d a d' f'> ^\markup
505 \fret-diagram #"f:2;6-x;5-x;4-o;3-2-2;2-3-3;1-1-1;"
510 Dot radius and dot position can be controlled with the fret-diagram
513 @lilypond[quote, verbatim]
515 \context ChordNames {
522 < c e g c' e' > 1 ^\markup
523 \fret-diagram #"d:0.35;6-x;5-3;4-2;3-o;2-1;1-o;"
524 < d a d' f'> ^\markup
525 \fret-diagram #"p:0.2;6-x;5-x;4-o;3-2;2-3;1-1;"
530 The fret-diagram-terse markup string omits string numbers; the string
531 number is implied by the presence of semicolons. There is one semicolon
532 for each string in the diagram. The first semicolon corresponds to the
533 highest string number and the last semicolon corresponds to the first string.
534 Mute strings, open strings, and fret numbers can be indicated.
536 @lilypond[quote, verbatim]
538 \context ChordNames {
545 < c e g c' e' > 1 ^\markup
546 \fret-diagram-terse #"x;3;2;o;1;o;"
547 < d a d' f'> ^\markup
548 \fret-diagram-terse #"x;x;o;2;3;1;"
553 Barre indicators can be included in the fret-diagram-terse markup string.
555 @lilypond[quote, verbatim]
557 \context ChordNames {
564 < f, c f a c' f'>1 ^\markup
565 \fret-diagram-terse #"1-(;3;3;2;1;1-);"
566 < g, b, d g b' g'> ^\markup
567 \fret-diagram-terse #"3-(;5;5;4;3;3-);"
572 Fingering indications can be included in the fret-diagram-terse markup string.
574 @c Need to use override to enable fingerings to show this -- can we do so?
575 @lilypond[quote, verbatim]
577 \context ChordNames {
583 \override Voice.TextScript
584 #'fret-diagram-details #'finger-code = #'below-string
586 < c e g c' e' > 1 ^\markup
587 \fret-diagram-terse #"x;3-3;2-2;o;1-1;o;"
588 < d a d' f'> ^\markup
589 \fret-diagram-terse #"x;x;o;2-2;3-3;1-1;"
594 Other fret diagram properties must be adjusted using @code{\override} when using
595 the fret-diagram-terse markup.
597 The fret-diagram-verbose markup string is in the format of a Scheme list. Each
598 element of the list indicates an item to be placed on the fret diagram.
600 @lilypond[quote, verbatim]
601 << \context ChordNames {
608 < c e g c' e' > 1 ^\markup
609 \fret-diagram-verbose #'(
617 < d a d' f'> ^\markup
618 \fret-diagram-verbose #'(
630 Fingering indications and barres can be included in a
631 fret-diagram-verbose markup string.
633 @c \override is necessary to make fingering visible
634 @lilypond[quote, verbatim]
636 \context ChordNames {
643 \override Voice.TextScript
644 #'fret-diagram-details #'finger-code = #'below-string
646 < f, c f a c' f'>1 ^\markup
647 \fret-diagram-verbose #'(
656 < g, b, d g b' g'> ^\markup
657 \fret-diagram-verbose #'(
669 All other fret diagram properties must be adjusted using @code{\override}
670 when using the fret-diagram-verbose markup.
673 The following example shows the three fret-diagram markup
674 interfaces, along with examples of common tweaks. For example,
675 the size of the verbose fret diagram is reduced to 0.75, and the
676 finger indications are specified to appear below the diagram. The
677 terse diagram includes tweaks to specify placement of finger code
680 @lilypond[verbatim,ragged-right,quote]
683 d^\markup \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
685 fis^\markup \override #'(size . 0.75) {
686 \override #'(finger-code . below-string) {
687 \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
696 c^\markup \override #'(dot-radius . 0.35) {
697 \override #'(finger-code . in-dot) {
698 \override #'(dot-color . white) {
699 \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
708 The graphical layout of a fret diagram can be customized according to
709 user preference through the properties of the @code{fret-diagram-interface}.
710 Details are found at @rinternals{fret-diagram-interface}. For a fret diagram
711 markup , the interface properties belong to @code{Voice.TextScript}.
714 TODO create snippets for changing properties. Use regression test?
719 @ref{Text markup commands}.
722 @rlsr{Fretted strings}.
725 @rinternals{fret-diagram-interface}.
727 @node Right-hand fingerings
728 @subsubsection Right-hand fingerings
730 Right-hand fingerings @var{p-i-m-a} must be entered within a
731 chord construct @code{<>} for them to be printed in the score,
732 even when applied to a single note.
734 @warning{There @strong{must} be a hyphen after the note and a space
735 before the closing @code{>}.}
737 @lilypond[quote,verbatim,relative=0]
739 <c-\rightHandFinger #1 >4
740 <e-\rightHandFinger #2 >
741 <g-\rightHandFinger #3 >
742 <c-\rightHandFinger #4 >
743 <c,-\rightHandFinger #1 e-\rightHandFinger #2 g-\rightHandFinger #3 c-\rightHandFinger #4 >1
746 For convenience, you can abbreviate @code{\rightHandFinger} to something
747 short, for example @code{RH},
750 #(define RH rightHandFinger)
753 @cindex fingerings, right hand, for guitar
754 @cindex right hand fingerings for guitar
758 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
759 {placement-of-right-hand-fingerings.ly}
761 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
762 {fingerings,-string-indications,-and-right-hand-fingerings.ly}
767 @rlsr{Fretted strings}.
770 @rinternals{StrokeFinger}.
776 Most of the notational issues associated with guitar music are
777 covered sufficiently in the general fretted strings section, but there
778 are a few more worth covering here. Occasionally users want to
779 create songbook-type documents having only lyrics with chord
780 indications above them. Since Lilypond is a music typesetter,
781 it is not recommended for documents that have no music notation
782 in them. A better alternative is a word processor, text editor,
783 or, for experienced users, a typesetter like GuitarTeX.
786 * Indicating position and barring::
787 * Indicating harmonics and dampened notes::
790 @node Indicating position and barring
791 @subsubsection Indicating position and barring
793 This example demonstrates how to include guitar position and
796 @lilypond[quote,ragged-right,fragment,verbatim,relative=0]
800 \override TextSpanner #'bound-details #'left #'text = #"XII "
802 b16 e g e b g\stopTextSpan
812 @rlsr{Fretted strings},
813 @rlsr{Expressive marks}.
815 @node Indicating harmonics and dampened notes
816 @subsubsection Indicating harmonics and dampened notes
818 Special note heads can be used to indicate dampened notes or
819 harmonics. Harmonics are normally further explained with a
822 @lilypond[quote,ragged-right,fragment,verbatim]
825 \override Staff.NoteHead #'style = #'cross
827 \override Staff.NoteHead #'style = #'harmonic-mixed
828 d^\markup { \italic { \fontsize #-2 { "harm. 12" }}} <g b>1
835 @rlsr{Fretted strings}.
838 @ref{Special note heads},
839 @ref{Note head styles}.
848 @node Banjo tablatures
849 @subsubsection Banjo tablatures
850 @cindex Banjo tablatures
852 LilyPond has basic support for the five-string banjo. When making tablatures
853 for five-string banjo, use the banjo tablature format function to get
854 correct fret numbers for the fifth string:
856 @c due to crazy intervals of banjo music, absolute pitch is recommended
858 @lilypond[quote,ragged-right,fragment,verbatim]
860 \set TabStaff.tablatureFormat = #fret-number-tablature-format-banjo
861 \set TabStaff.stringTunings = #banjo-open-g-tuning
864 g8 d' g'\5 a b g e d' |
865 g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
871 A number of common tunings for banjo are predefined in LilyPond:
872 @code{banjo-c-tuning} (gCGBD), @code{banjo-modal-tuning} (gDGCD),
873 @code{banjo-open-d-tuning} (aDF#AD) and @code{banjo-open-dm-tuning}
876 These tunings may be converted to four-string banjo tunings using the
877 @code{four-string-banjo} function:
880 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
886 @rlsr{Fretted strings}.
888 The file @file{scm/@/output@/-lib@/.scm} contains predefined banjo tunings.