]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/fretted-strings.itely
Merge branch 'lilypond/translation' of ssh://trettig@git.sv.gnu.org/srv/git/lilypond...
[lilypond.git] / Documentation / user / fretted-strings.itely
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @ignore
3     Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
4
5     When revising a translation, copy the HEAD committish of the
6     version that you are working on.  See TRANSLATION for details.
7 @end ignore
8
9 @c \version "2.11.38"
10
11 @node Fretted string instruments
12 @section Fretted string instruments
13
14 @cindex tablature
15 @cindex guitar tablature
16
17 @menu
18 * Common notation for fretted strings::
19 * Guitar::
20 * Banjo::
21 @end menu
22
23 @node Common notation for fretted strings
24 @subsection Common notation for fretted strings
25
26 @menu
27 * References for fretted strings::
28 * String number indications::
29 * Default tablatures::
30 * Custom tablatures::
31 * Fret diagrams::
32 * Right hand fingerings::
33 @end menu
34
35 @node References for fretted strings
36 @subsubsection References for fretted strings
37
38 @c TODO Add refs
39 TBC
40
41 @node String number indications
42 @subsubsection String number indications
43
44 @cindex String numbers
45
46 String numbers can be added to chords, by indicating the string number
47 with @code{\}@var{number},
48
49 @lilypond[relative,relative=1,ragged-right,fragment]
50 <c\1 e\2 g\3>
51 @end lilypond
52
53
54 @seealso
55
56 Internals Reference: @rinternals{StringNumber},
57 @c @lsr{guitar/,string-number.ly}.
58
59
60 @node Default tablatures
61 @subsubsection Default tablatures
62 @cindex Tablatures, basic
63 @cindex Tablatures, default
64
65 Tablature notation is used for notating music for plucked string
66 instruments.  Pitches are not denoted with note heads, but by
67 numbers indicating on which string and fret a note must be played.  LilyPond
68 offers limited support for tablature.
69
70 The string number associated to a note is given as a backslash
71 followed by a number, e.g., @code{c4\3} for a C quarter on the third
72 string.  By default, string 1 is the highest one, and the tuning
73 defaults to the standard guitar tuning (with 6 strings).  The notes
74 are printed as tablature, by using @rinternals{TabStaff} and
75 @rinternals{TabVoice} contexts
76
77 @lilypond[quote,ragged-right,fragment,verbatim]
78 \new TabStaff {
79   a,4\5 c'\2 a\3 e'\1
80   e\4 c'\2 a\3 e'\1
81 }
82 @end lilypond
83
84 @funindex minimumFret
85 @cindex fret
86
87 When no string is specified, the first string that does not give a
88 fret number less than @code{minimumFret} is selected.  The default
89 value for @code{minimumFret} is 0
90
91
92 @example
93 e16 fis gis a b4
94 \set TabStaff.minimumFret = #8
95 e16 fis gis a b4
96 @end example
97 @lilypond[quote,ragged-right]
98 frag = {
99   \key e \major
100   e16 fis gis a b4
101   \set TabStaff.minimumFret = #8
102   e16 fis gis a b4
103 }
104   \new StaffGroup <<
105     \new Staff { \clef "G_8" \frag }
106     \new TabStaff { \frag }
107   >>
108 @end lilypond
109
110
111 @snippets
112
113 To print tablatures with stems down and horizontal beams,
114 initialize the @code{TabStaff} with this code:
115
116 @example
117 \stemDown
118 \override Beam #'damping = #100000
119 @end example
120
121 @seealso
122
123 Internals Reference: @rinternals{TabNoteHead}, @rinternals{TabStaff}, @rinternals{TabVoice}.
124
125 @knownissues
126
127 Chords are not handled in a special way, and hence the automatic
128 string selector may easily select the same string to two notes in a
129 chord.
130
131 In order to handle @code{\partcombine}, a @code{TabStaff} must use
132 specially-created voices:
133
134 @lilypond[quote,ragged-right,verbatim]
135 melodia = \partcombine { e4 g g g }{ e4 e e e }
136 <<
137   \new TabStaff <<
138     \new TabVoice = "one" s1
139     \new TabVoice = "two" s1
140     \new TabVoice = "shared" s1
141     \new TabVoice = "solo" s1
142     { \melodia }
143   >>
144 >>
145 @end lilypond
146
147
148 @node Custom tablatures
149 @subsubsection Custom tablatures
150 @cindex Tablatures, custom
151
152 You can change the tuning of the strings.  A string tuning is given as
153 a Scheme list with one integer number for each string, the number
154 being the pitch (measured in semitones relative to middle C) of an
155 open string.  The numbers specified for @code{stringTunings} are the
156 numbers of semitones to subtract or add, starting the specified pitch
157 by default middle C, in string order.  LilyPond automatically calculates
158 the number of strings by looking at @code{stringTunings}.
159
160 In the next example,
161 @code{stringTunings} is set for the pitches e, a, d, and g
162
163 @lilypond[quote,ragged-right,fragment,verbatim]
164 \new TabStaff <<
165   \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
166   {
167     a,4 c' a e' e c' a e'
168   }
169 >>
170 @end lilypond
171
172 LilyPond comes with predefined string tunings for banjo, mandolin, guitar
173 and bass guitar.
174
175 @example
176 \set TabStaff.stringTunings = #bass-tuning
177 @end example
178
179 The default string tuning is @code{guitar-tuning} (the standard EADGBE
180 tuning).
181 Some other predefined tunings are @code{guitar-open-g-tuning},
182 @code{mandolin-tuning} and @code{banjo-open-g-tuning}.
183
184 @seealso
185
186 The file @file{scm/@/output@/-lib@/.scm} contains the predefined string
187 tunings.
188 Internals Reference: @rinternals{Tab_note_heads_engraver}.
189
190 @knownissues
191
192 No guitar special effects have been implemented.
193
194
195
196 @node Fret diagrams
197 @subsubsection Fret diagrams
198 @cindex fret diagrams
199 @cindex chord diagrams
200
201 Fret diagrams can be added to music as a markup to the desired note.  The
202 markup contains information about the desired fret diagram, as shown in the
203 following example
204
205 @lilypond[verbatim, ragged-right, quote]
206 \new Voice {
207   d'^\markup \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
208   d' d' d'
209   fis'^\markup \override #'(size . 0.75) {
210     \override #'(finger-code . below-string) {
211       \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
212                                (place-fret 5 4 3) (place-fret 4 4 4)
213                                (place-fret 3 3 2) (place-fret 2 2 1)
214                                (place-fret 1 2 1))
215     }
216   }
217   fis' fis' fis'
218   c'^\markup \override #'(dot-radius . 0.35) {
219     \override #'(finger-code . in-dot) {
220       \override #'(dot-color . white) {
221         \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
222       }
223     }
224   }
225   c' c' c'
226 }
227 @end lilypond
228
229
230 There are three different fret-diagram markup interfaces: standard, terse,
231 and verbose.  The three interfaces produce equivalent markups, but have
232 varying amounts of information in the markup string.  Details about the
233 markup interfaces are found at @ref{Text markup commands}.
234
235 You can set a number of graphical properties according to your preference.
236 Details about the property interface to fret diagrams are found at
237 @rinternals{fret-diagram-interface}.
238
239
240 @seealso
241
242
243
244 @node Right hand fingerings
245 @subsubsection Right hand fingerings
246
247 Right hand fingerings in chords can be entered using
248 @code{@var{note}-\rightHandFinger @var{finger}}
249
250 @lilypond[verbatim,fragment,relative=2]
251   <c-\rightHandFinger #1 e-\rightHandFinger #2 >
252 @end lilypond
253
254 for brevity, you can abbreviate @code{\rightHandFinger} to something
255 short, for example @code{RH},
256
257 @example
258 #(define RH rightHandFinger)
259 @end example
260
261 @cindex fingerings, right hand, for guitar
262 @cindex right hand fingerings for guitar
263
264 @snippets
265
266 You may exercise greater control over right handing fingerings by
267 setting @code{strokeFingerOrientations},
268
269 @lilypond[quote,verbatim,ragged-right,fragment,relative=1]
270 #(define RH rightHandFinger)
271 {
272   \set strokeFingerOrientations = #'(up down)
273   <c-\RH #1 es-\RH #2 g-\RH #4 > 4
274   \set strokeFingerOrientations = #'(up right down)
275   <c-\RH #1 es-\RH #2 g-\RH #4 > 4
276 }
277 @end lilypond
278
279 The letters used for the fingerings are contained in the property
280 @code{digit-names}, but they can also be set individually by supplying
281 @code{\rightHandFinger} with a string argument, as in the following example
282
283
284 @lilypond[quote,verbatim,ragged-right,fragment,relative=1]
285 #(define RH rightHandFinger)
286 {
287   \set strokeFingerOrientations = #'(right)
288   \override StrokeFinger #'digit-names = ##("x" "y" "z" "!" "@")
289   <c-\RH #5 >4
290   <c-\RH "@">4
291 }
292 @end lilypond
293
294 @seealso
295
296 Internals Reference: @rinternals{StrokeFinger}
297
298
299 @node Guitar
300 @subsection Guitar
301
302 @c TODO Make a snippet based on
303 @c http://www.nabble.com/Creating-a-nice-formatted-Chords-%2B-Lyrics-layout-for-guitar-players-to13829430.html
304 @c and include it somewhere -td
305
306 @menu
307 * Guitar tablatures::
308 * Indicating position and barring::
309 @end menu
310
311 @node Guitar tablatures
312 @subsubsection Guitar tablatures
313
314 @c TODO Add text
315 TBC
316
317 @node Indicating position and barring
318 @subsubsection Indicating position and barring
319
320 This example demonstrates how to include guitar position and
321 barring indications.
322
323 @lilypond[quote,ragged-right,fragment,verbatim,relative=0]
324 \clef "G_8"
325 b16 d16 g16 b16 e16
326 \textSpannerDown
327 \override TextSpanner #'bound-details #'left #'text = #"XII "
328   g16\startTextSpan
329   b16 e16 g16 e16 b16 g16\stopTextSpan
330 e16 b16 g16 d16
331 @end lilypond
332
333
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 note heads; this is
339 demonstrated in @ref{Special note heads}.
340
341
342 @node Banjo
343 @subsection Banjo
344
345 @menu Banjo tablatures
346 * Banjo tablatures::
347 @end menu
348
349 @node Banjo tablatures
350 @subsubsection Banjo tablatures
351 @cindex Banjo tablatures
352
353 LilyPond has basic support for five stringed banjo.  When making tablatures
354 for five stringed banjo, use the banjo tablature format function to get
355 correct
356 fret numbers for the fifth string:
357
358 @lilypond[quote,ragged-right,fragment,verbatim]
359 \new TabStaff <<
360   \set TabStaff.tablatureFormat = #fret-number-tablature-format-banjo
361   \set TabStaff.stringTunings = #banjo-open-g-tuning
362   {
363     \stemDown
364     g8 d' g'\5 a b g e d' |
365     g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
366     g4
367   }
368 >>
369 @end lilypond
370
371 A number of common tunings for banjo are predefined in LilyPond:
372 @code{banjo-c-tuning} (gCGBD), @code{banjo-modal-tuning} (gDGCD),
373 @code{banjo-open-d-tuning} (aDF#AD) and @code{banjo-open-dm-tuning}
374 (aDFAD).
375
376 These tunings may be converted to four string banjo tunings using the
377 @code{four-string-banjo} function:
378
379 @example
380 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
381 @end example
382
383 @seealso
384
385 The file @file{scm/@/output@/-lib@/.scm} contains predefined banjo tunings.
386
387