1 @c -*- coding: utf-8; mode: texinfo; -*-
7 @cindex guitar tablature
10 * String number indications::
12 * Non-guitar tablatures::
15 * Right hand fingerings::
16 * Other guitar issues::
19 @anchor{String number indications}
20 @unnumberedsubsubsec String number indications
22 @cindex String numbers
24 String numbers can be added to chords, by indicating the string number
25 with @code{\}@var{number},
27 @lilypond[relative,relative=1,ragged-right,fragment]
34 Program reference: @internalsref{StringNumber},
35 @lsr{guitar/,string-number.ly}.
38 @anchor{Tablatures basic}
39 @unnumberedsubsubsec Tablatures basic
40 @cindex Tablatures basic
42 Tablature notation is used for notating music for plucked string
43 instruments. Pitches are not denoted with note heads, but by
44 numbers indicating on which string and fret a note must be played. LilyPond
45 offers limited support for tablature.
47 The string number associated to a note is given as a backslash
48 followed by a number, e.g., @code{c4\3} for a C quarter on the third
49 string. By default, string 1 is the highest one, and the tuning
50 defaults to the standard guitar tuning (with 6 strings). The notes
51 are printed as tablature, by using @internalsref{TabStaff} and
52 @internalsref{TabVoice} contexts
54 @lilypond[quote,ragged-right,fragment,verbatim]
64 When no string is specified, the first string that does not give a
65 fret number less than @code{minimumFret} is selected. The default
66 value for @code{minimumFret} is 0
71 \set TabStaff.minimumFret = #8
74 @lilypond[quote,ragged-right]
78 \set TabStaff.minimumFret = #8
82 \new Staff { \clef "G_8" \frag }
83 \new TabStaff { \frag }
90 To print tablatures with stems down and horizontal beams,
91 initialize the @code{TabStaff} with this code:
95 \override Beam #'damping = #100000
100 Program reference: @internalsref{TabStaff}, @internalsref{TabVoice}.
104 Chords are not handled in a special way, and hence the automatic
105 string selector may easily select the same string to two notes in a
108 In order to handle @code{\partcombine}, a @code{TabStaff} must use
109 specially-created voices:
111 @lilypond[quote,ragged-right,verbatim]
112 melodia = \partcombine { e4 g g g }{ e4 e e e }
115 \new TabVoice = "one" s1
116 \new TabVoice = "two" s1
117 \new TabVoice = "shared" s1
118 \new TabVoice = "solo" s1
125 @anchor{Non-guitar tablatures}
126 @unnumberedsubsubsec Non-guitar tablatures
127 @cindex Non-guitar tablatures
129 You can change the tuning of the strings. A string tuning is given as
130 a Scheme list with one integer number for each string, the number
131 being the pitch (measured in semitones relative to middle C) of an
132 open string. The numbers specified for @code{stringTunings} are the
133 numbers of semitones to subtract or add, starting the specified pitch
134 by default middle C, in string order. LilyPond automatically calculates
135 the number of strings by looking at @code{stringTunings}.
138 @code{stringTunings} is set for the pitches e, a, d, and g
140 @lilypond[quote,ragged-right,fragment,verbatim]
142 \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
144 a,4 c' a e' e c' a e'
149 LilyPond comes with predefined string tunings for banjo, mandolin, guitar
153 \set TabStaff.stringTunings = #bass-tuning
156 The default string tuning is @code{guitar-tuning} (the standard EADGBE
158 Some other predefined tunings are @code{guitar-open-g-tuning},
159 @code{mandolin-tuning} and @code{banjo-open-g-tuning}.
163 The file @file{scm/@/output@/-lib@/.scm} contains the predefined string
165 Program reference: @internalsref{Tab_note_heads_engraver}.
169 No guitar special effects have been implemented.
173 @anchor{Banjo tablatures}
174 @unnumberedsubsubsec Banjo tablatures
175 @cindex Banjo tablatures
177 LilyPond has basic support for five stringed banjo. When making tablatures
178 for five stringed banjo, use the banjo tablature format function to get
180 fret numbers for the fifth string:
182 @lilypond[quote,ragged-right,fragment,verbatim]
184 \set TabStaff.tablatureFormat = #fret-number-tablature-format-banjo
185 \set TabStaff.stringTunings = #banjo-open-g-tuning
188 g8 d' g'\5 a b g e d' |
189 g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
195 A number of common tunings for banjo are predefined in LilyPond:
196 @code{banjo-c-tuning} (gCGBD), @code{banjo-modal-tuning} (gDGCD),
197 @code{banjo-open-d-tuning} (aDF#AD) and @code{banjo-open-dm-tuning}
200 These tunings may be converted to four string banjo tunings using the
201 @code{four-string-banjo} function:
204 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
209 The file @file{scm/@/output@/-lib@/.scm} contains predefined banjo tunings.
212 @anchor{Fret diagrams}
213 @unnumberedsubsubsec Fret diagrams
214 @cindex fret diagrams
215 @cindex chord diagrams
217 Fret diagrams can be added to music as a markup to the desired note. The
218 markup contains information about the desired fret diagram, as shown in the
221 @lilypond[verbatim, ragged-right, quote]
223 d'^\markup \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
225 fis'^\markup \override #'(size . 0.75) {
226 \override #'(finger-code . below-string) {
227 \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
228 (place-fret 5 4 3) (place-fret 4 4 4)
229 (place-fret 3 3 2) (place-fret 2 2 1)
234 c'^\markup \override #'(dot-radius . 0.35) {
235 \override #'(finger-code . in-dot) {
236 \override #'(dot-color . white) {
237 \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
246 There are three different fret-diagram markup interfaces: standard, terse,
247 and verbose. The three interfaces produce equivalent markups, but have
248 varying amounts of information in the markup string. Details about the
249 markup interfaces are found at @ref{Overview of text markup commands}.
251 You can set a number of graphical properties according to your preference.
252 Details about the property interface to fret diagrams are found at
253 @internalsref{fret-diagram-interface}.
258 Examples: @lsrdir{guitar}
261 @anchor{Right hand fingerings}
262 @unnumberedsubsubsec Right hand fingerings
264 Right hand fingerings in chords can be entered using
265 @code{@var{note}-\rightHandFinger @var{finger}}
267 @lilypond[verbatim,fragment,relative=2]
268 <c-\rightHandFinger #1 e-\rightHandFinger #2 >
271 for brevity, you can abbreviate @code{\rightHandFinger} to something
272 short, for example @code{RH},
275 #(define RH rightHandFinger)
278 @cindex fingerings, right hand, for guitar
279 @cindex right hand fingerings for guitar
283 You may exercise greater control over right handing fingerings by
284 setting @code{strokeFingerOrientations},
286 @lilypond[quote,verbatim,ragged-right,fragment,relative=1]
287 #(define RH rightHandFinger)
289 \set strokeFingerOrientations = #'(up down)
290 <c-\RH #1 es-\RH #2 g-\RH #4 > 4
291 \set strokeFingerOrientations = #'(up right down)
292 <c-\RH #1 es-\RH #2 g-\RH #4 > 4
296 The letters used for the fingerings are contained in the property
297 @code{digit-names}, but they can also be set individually by supplying
298 @code{\rightHandFinger} with a string argument, as in the following example
301 @lilypond[quote,verbatim,ragged-right,fragment,relative=1]
302 #(define RH rightHandFinger)
304 \set strokeFingerOrientations = #'(right)
305 \override StrokeFinger #'digit-names = ##("x" "y" "z" "!" "@")
313 Program reference: @internalsref{StrokeFinger}
317 @anchor{Other guitar issues}
318 @unnumberedsubsubsec Other guitar issues
320 This example demonstrates how to include guitar position and
323 @lilypond[quote,ragged-right,fragment,verbatim,relative=0]
327 \override TextSpanner #'bound-details #'left #'text = #"XII "
329 b16 e16 g16 e16 b16 g16\stopTextSpan
334 Stopped (X) note heads are used in guitar music to signal a place where the
335 guitarist must play a certain note or chord, with its fingers just
336 touching the strings instead of fully pressing them. This gives the sound a
337 percussive noise-like sound that still maintains part of the original
338 pitch. It is notated with cross noteheads; this is
339 demonstrated in @ref{Special noteheads}.