1 @c -*- coding: utf-8; mode: texinfo; -*-
7 @cindex guitar tablature
14 @subsection Guitar TODO
17 * String number indications::
19 * Non-guitar tablatures::
22 * Right hand fingerings::
23 * Other guitar issues::
26 @node String number indications
27 @unnumberedsubsubsec String number indications
29 @cindex String numbers
31 String numbers can be added to chords, by indicating the string number
32 with @code{\}@var{number},
34 @lilypond[relative,relative=1,ragged-right,fragment]
41 Program reference: @internalsref{StringNumber},
42 @lsr{guitar/,string-number.ly}.
45 @node Tablatures basic
46 @unnumberedsubsubsec Tablatures basic
47 @cindex Tablatures basic
49 Tablature notation is used for notating music for plucked string
50 instruments. Pitches are not denoted with note heads, but by
51 numbers indicating on which string and fret a note must be played. LilyPond
52 offers limited support for tablature.
54 The string number associated to a note is given as a backslash
55 followed by a number, e.g., @code{c4\3} for a C quarter on the third
56 string. By default, string 1 is the highest one, and the tuning
57 defaults to the standard guitar tuning (with 6 strings). The notes
58 are printed as tablature, by using @internalsref{TabStaff} and
59 @internalsref{TabVoice} contexts
61 @lilypond[quote,ragged-right,fragment,verbatim]
71 When no string is specified, the first string that does not give a
72 fret number less than @code{minimumFret} is selected. The default
73 value for @code{minimumFret} is 0
78 \set TabStaff.minimumFret = #8
81 @lilypond[quote,ragged-right]
85 \set TabStaff.minimumFret = #8
89 \new Staff { \clef "G_8" \frag }
90 \new TabStaff { \frag }
97 To print tablatures with stems down and horizontal beams,
98 initialize the @code{TabStaff} with this code:
102 \override Beam #'damping = #100000
107 Program reference: @internalsref{TabStaff}, @internalsref{TabVoice}.
111 Chords are not handled in a special way, and hence the automatic
112 string selector may easily select the same string to two notes in a
115 In order to handle @code{\partcombine}, a @code{TabStaff} must use
116 specially-created voices:
118 @lilypond[quote,ragged-right,verbatim]
119 melodia = \partcombine { e4 g g g }{ e4 e e e }
122 \new TabVoice = "one" s1
123 \new TabVoice = "two" s1
124 \new TabVoice = "shared" s1
125 \new TabVoice = "solo" s1
132 @node Non-guitar tablatures
133 @unnumberedsubsubsec Non-guitar tablatures
134 @cindex Non-guitar tablatures
136 You can change the tuning of the strings. A string tuning is given as
137 a Scheme list with one integer number for each string, the number
138 being the pitch (measured in semitones relative to middle C) of an
139 open string. The numbers specified for @code{stringTunings} are the
140 numbers of semitones to subtract or add, starting the specified pitch
141 by default middle C, in string order. LilyPond automatically calculates
142 the number of strings by looking at @code{stringTunings}.
145 @code{stringTunings} is set for the pitches e, a, d, and g
147 @lilypond[quote,ragged-right,fragment,verbatim]
149 \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
151 a,4 c' a e' e c' a e'
156 LilyPond comes with predefined string tunings for banjo, mandolin, guitar
160 \set TabStaff.stringTunings = #bass-tuning
163 The default string tuning is @code{guitar-tuning} (the standard EADGBE
165 Some other predefined tunings are @code{guitar-open-g-tuning},
166 @code{mandolin-tuning} and @code{banjo-open-g-tuning}.
170 The file @file{scm/@/output@/-lib@/.scm} contains the predefined string
172 Program reference: @internalsref{Tab_note_heads_engraver}.
176 No guitar special effects have been implemented.
180 @node Banjo tablatures
181 @unnumberedsubsubsec Banjo tablatures
182 @cindex Banjo tablatures
184 LilyPond has basic support for five stringed banjo. When making tablatures
185 for five stringed banjo, use the banjo tablature format function to get
187 fret numbers for the fifth string:
189 @lilypond[quote,ragged-right,fragment,verbatim]
191 \set TabStaff.tablatureFormat = #fret-number-tablature-format-banjo
192 \set TabStaff.stringTunings = #banjo-open-g-tuning
195 g8 d' g'\5 a b g e d' |
196 g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
202 A number of common tunings for banjo are predefined in LilyPond:
203 @code{banjo-c-tuning} (gCGBD), @code{banjo-modal-tuning} (gDGCD),
204 @code{banjo-open-d-tuning} (aDF#AD) and @code{banjo-open-dm-tuning}
207 These tunings may be converted to four string banjo tunings using the
208 @code{four-string-banjo} function:
211 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
216 The file @file{scm/@/output@/-lib@/.scm} contains predefined banjo tunings.
220 @unnumberedsubsubsec Fret diagrams
221 @cindex fret diagrams
222 @cindex chord diagrams
224 Fret diagrams can be added to music as a markup to the desired note. The
225 markup contains information about the desired fret diagram, as shown in the
228 @lilypond[verbatim, ragged-right, quote]
230 d'^\markup \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
232 fis'^\markup \override #'(size . 0.75) {
233 \override #'(finger-code . below-string) {
234 \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
235 (place-fret 5 4 3) (place-fret 4 4 4)
236 (place-fret 3 3 2) (place-fret 2 2 1)
241 c'^\markup \override #'(dot-radius . 0.35) {
242 \override #'(finger-code . in-dot) {
243 \override #'(dot-color . white) {
244 \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
253 There are three different fret-diagram markup interfaces: standard, terse,
254 and verbose. The three interfaces produce equivalent markups, but have
255 varying amounts of information in the markup string. Details about the
256 markup interfaces are found at @ref{Overview of text markup commands}.
258 You can set a number of graphical properties according to your preference.
259 Details about the property interface to fret diagrams are found at
260 @internalsref{fret-diagram-interface}.
265 Examples: @lsrdir{guitar}
268 @node Right hand fingerings
269 @unnumberedsubsubsec Right hand fingerings
271 Right hand fingerings in chords can be entered using
272 @code{@var{note}-\rightHandFinger @var{finger}}
274 @lilypond[verbatim,fragment,relative=2]
275 <c-\rightHandFinger #1 e-\rightHandFinger #2 >
278 for brevity, you can abbreviate @code{\rightHandFinger} to something
279 short, for example @code{RH},
282 #(define RH rightHandFinger)
285 @cindex fingerings, right hand, for guitar
286 @cindex right hand fingerings for guitar
290 You may exercise greater control over right handing fingerings by
291 setting @code{strokeFingerOrientations},
293 @lilypond[quote,verbatim,ragged-right,fragment,relative=1]
294 #(define RH rightHandFinger)
296 \set strokeFingerOrientations = #'(up down)
297 <c-\RH #1 es-\RH #2 g-\RH #4 > 4
298 \set strokeFingerOrientations = #'(up right down)
299 <c-\RH #1 es-\RH #2 g-\RH #4 > 4
303 The letters used for the fingerings are contained in the property
304 @code{digit-names}, but they can also be set individually by supplying
305 @code{\rightHandFinger} with a string argument, as in the following example
308 @lilypond[quote,verbatim,ragged-right,fragment,relative=1]
309 #(define RH rightHandFinger)
311 \set strokeFingerOrientations = #'(right)
312 \override StrokeFinger #'digit-names = ##("x" "y" "z" "!" "@")
320 Program reference: @internalsref{StrokeFinger}
324 @node Other guitar issues
325 @unnumberedsubsubsec Other guitar issues
327 This example demonstrates how to include guitar position and
330 @lilypond[quote,ragged-right,fragment,verbatim,relative=0]
334 \override TextSpanner #'bound-details #'left #'text = #"XII "
336 b16 e16 g16 e16 b16 g16\stopTextSpan
341 Stopped (X) note heads are used in guitar music to signal a place where the
342 guitarist must play a certain note or chord, with its fingers just
343 touching the strings instead of fully pressing them. This gives the sound a
344 percussive noise-like sound that still maintains part of the original
345 pitch. It is notated with cross noteheads; this is
346 demonstrated in @ref{Special noteheads}.