]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/fretted-strings.itely
Minor update.
[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.51"
10
11 @node Fretted string instruments
12 @section Fretted string instruments
13
14 @lilypondfile[quote]{fretted-headword.ly}
15
16 This section discusses several aspects of music notation that are unique
17 to fretted string instruments.
18
19 @cindex tablature
20 @cindex guitar tablature
21
22 @menu
23 * Common notation for fretted strings::  
24 * Guitar::                      
25 * Banjo::                       
26 @end menu
27
28 @node Common notation for fretted strings
29 @subsection Common notation for fretted strings
30
31 This section discusses common notation that is unique
32 to fretted string instruments.
33
34 @menu
35 * References for fretted strings::  
36 * String number indications::   
37 * Default tablatures::          
38 * Custom tablatures::           
39 * Fret diagrams::               
40 * Right-hand fingerings::       
41 @end menu
42
43 @node References for fretted strings
44 @subsubsection References for fretted strings
45
46 Music for fretted string instruments is normally notated on
47 a single staff, either in traditional music notation or in
48 tablature.  Sometimes the two types are combined, and it is
49 especially common in popular music to use chord diagrams above
50 a staff of traditional notation.  The guitar and the banjo are
51 transposing instruments, sounding an octave lower than written. 
52 Scores for these instruments should use the @code{"treble_8"} clef. 
53 Some other elements pertinent to fretted string instruments 
54 are covered elsewhere:
55
56 @itemize
57 @item Fingerings are indicated with @ref{Fingering instructions}.
58
59 @item Instructions for @notation{Laissez vibrer} ties
60 as well as ties on arpeggios and tremolos is described in
61 @ref{Ties}.
62
63 @item Instructions on handling multiple voices is described 
64 in @ref{Collision resolution}. 
65
66 @end itemize
67
68 @seealso
69
70 Notation Reference:
71 @ref{Instrument names},
72 @ref{Writing music in parallel},
73 @ref{Fingering instructions},
74 @ref{Ties},
75 @ref{Arpeggio},
76 @ref{List of articulations},
77 @ref{Clef}.
78
79 @node String number indications
80 @subsubsection String number indications
81
82 @cindex String numbers
83
84 The string on which a note should be played may be indicated by
85 appending @code{\@var{number}} to a note inside a chord construct
86 @code{<>}.
87
88 @warning{String numbers @strong{must} be defined inside a chord
89 construct even if there is only a single note.}
90
91 @lilypond[verbatim,quote,relative=0]
92 \clef "treble_8"
93 <c\5>4 <e\4> <g\3>2
94 <c,\5 e\4 g\3>1
95 @end lilypond
96
97 When fingerings and string indications are used together, their
98 placement is controlled by the order in which the two items appear
99 in the code:
100
101 @lilypond[verbatim,quote,relative=1]
102 \clef "treble_8"
103 <g\3-0>2
104 <g-0\3>
105 @end lilypond
106
107 @snippets
108
109 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
110 {controlling-the-placement-of-chord-fingerings.ly}
111
112 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
113 {allowing-fingerings-to-be-printed-inside-the-staff.ly}
114
115 @seealso
116
117 Notation Reference:
118 @ref{Fingering instructions}.
119
120 Snippets:
121 @rlsr{Fretted strings}.
122
123 Internals Reference:
124 @rinternals{StringNumber},
125 @rinternals{Fingering}.
126
127
128 @node Default tablatures
129 @subsubsection Default tablatures
130 @cindex Tablatures, basic
131 @cindex Tablatures, default
132
133 Tablature notation is used for notating music for plucked string
134 instruments.  Pitches are not denoted with note heads, but by
135 numbers indicating on which string and fret a note must be played.  
136 LilyPond offers limited support for tablature.
137
138 The string number associated with a note is given as a backslash
139 followed by a number.  By default, string 1 is the highest, 
140 and the tuning defaults to the standard guitar tuning (with 6 strings).  
141 The notes are printed as tablature, by using @code{TabStaff} and
142 @code{TabVoice} contexts
143
144 @lilypond[quote,ragged-right,fragment,verbatim]
145 \new TabStaff {
146   a,4\5 c'\2 a\3 e'\1
147   e\4 c'\2 a\3 e'\1
148 }
149 @end lilypond
150
151 @funindex minimumFret
152 @cindex fret
153
154
155 When no string is specified for a note, the note is assigned to
156 the lowest string that can generate the note with a fret number
157 greater than or equal to @code{minimumFret} is selected.  The
158 default value for @code{minimumFret} is 0.
159
160
161 @lilypond[quote,ragged-right,verbatim]
162 \new StaffGroup <<
163    \new Staff \relative c {
164      \clef "treble_8"
165      c16 d e f g4
166      c,16 d e f g4
167    }
168    \new TabStaff \relative c {
169      c16 d e f g4
170      \set TabStaff.minimumFret = #5
171      c,16 d e f g4
172    }
173 >>
174 @end lilypond
175
176 @snippets
177
178 The direction of stems is controlled the same way in tablature as
179 in traditional notation. Beams can be made horizontal:
180
181 @lilypond[quote,ragged-right,verbatim]
182 \new TabStaff {
183   \relative c {
184     g16 b d g
185     b d g b
186     \stemDown
187     \override Beam #'damping = #100000
188     g,,16 b d g
189     b d g b
190   }
191 }
192 @end lilypond
193
194 Polyphony is created the same way in a @code{TabStaff} as in a
195 regular staff.
196
197 @lilypond[quote,ragged-right,verbatim]
198 upper = \relative c' {
199         \time 12/8
200         \key e \minor
201         \voiceOne
202         r4. r8 e, fis g16 b g e e' b c b a g fis e
203 }
204
205 lower = \relative c {
206         \key e \minor
207         \voiceTwo
208         r16 e d c b a g4 fis8 e fis g a b c  
209 }
210
211 \score {
212   <<
213     \new StaffGroup = "tab with traditional" <<
214       \new Staff = "guitar traditional" <<
215             \clef "treble_8"
216             \context Voice = "upper" \upper
217             \context Voice = "lower" \lower
218       >>
219       \new TabStaff = "guitar tab" << 
220             \context TabVoice = "upper"  \upper 
221             \context TabVoice = "lower"  \lower 
222       >>
223     >>
224   >>
225 }
226 @end lilypond
227
228 @seealso
229
230 Notation Reference:
231 @ref{Stems}.
232
233 Snippets:
234 @rlsr{Fretted strings}.
235
236 Internals Reference: 
237 @rinternals{TabNoteHead},
238 @rinternals{TabStaff},
239 @rinternals{TabVoice},
240 @rinternals{Beam}.
241
242 @knownissues
243
244 Chords are not handled in a special way, and hence the automatic
245 string selector may easily select the same string for two notes in
246 a chord.
247
248 In order to handle @code{\partcombine}, a @code{TabStaff} must use
249 specially-created voices:
250
251 @lilypond[quote,ragged-right,verbatim]
252 melodia = \partcombine { e4 g g g }{ e4 e e e }
253 <<
254   \new TabStaff <<
255     \new TabVoice = "one" s1
256     \new TabVoice = "two" s1
257     \new TabVoice = "shared" s1
258     \new TabVoice = "solo" s1
259     { \melodia }
260   >>
261 >>
262 @end lilypond
263
264
265 @node Custom tablatures
266 @subsubsection Custom tablatures
267 @cindex Tablatures, custom
268
269 You can change the tuning of the strings.  A string tuning is
270 given as a Scheme list with one integer number for each string,
271 the number being the pitch (measured in semitones relative to
272 middle C) of an open string.  The numbers specified for
273 @code{stringTunings} are the numbers of semitones to subtract or
274 add, starting the specified pitch by default middle C, in string
275 order.  LilyPond automatically calculates the number of strings by
276 looking at @code{stringTunings}.
277
278 In the next example, @code{stringTunings} is set for the pitches
279 e, a, d, and g.
280
281 @lilypond[quote,ragged-right,fragment,verbatim]
282 \new TabStaff <<
283   \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
284   {
285     a,4 c' a e' e c' a e'
286   }
287 >>
288 @end lilypond
289
290 LilyPond comes with predefined string tunings for banjo, mandolin,
291 guitar and bass guitar.
292
293 @example
294 \set TabStaff.stringTunings = #bass-tuning
295 @end example
296
297 The default string tuning is @code{guitar-tuning} (the standard
298 EADGBE tuning).  Some other predefined tunings are
299 @code{guitar-open-g-tuning}, @code{mandolin-tuning} and
300 @code{banjo-open-g-tuning}.
301
302 @seealso
303
304 Snippets:
305 @rlsr{Fretted strings}.
306
307 The file @file{scm/@/output@/-lib@/.scm} contains the predefined string
308 tunings.
309
310 Internals Reference: @rinternals{Tab_note_heads_engraver}.
311
312 @knownissues
313
314 No guitar special effects have been implemented.
315
316
317
318 @node Fret diagrams
319 @subsubsection Fret diagrams
320 @cindex fret diagrams
321 @cindex chord diagrams
322
323 Fret diagrams can be added to music as a markup to the desired
324 note.  The markup contains information about the desired fret
325 diagram.  There are three different fret-diagram markup
326 interfaces: standard, terse, and verbose.  The three interfaces
327 produce equivalent markups, but have varying amounts of
328 information in the markup string.  Details about the markup
329 interfaces are found at @ref{Text markup commands}.
330
331 The following example shows the three fret-diagram markup
332 interfaces, along with examples of common tweaks.  For example,
333 the size of the verbose fret diagram is reduced to 0.75, and the
334 finger indications are specified to appear below the diagram.  The
335 terse diagram includes tweaks to specify placement of finger code
336 and color of dots.
337
338 @lilypond[verbatim,ragged-right,quote]
339 \new Voice {
340   \clef "treble_8"
341   d^\markup \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
342   d d d
343   fis^\markup \override #'(size . 0.75) {
344     \override #'(finger-code . below-string) {
345       \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
346                                (place-fret 5 4 3) 
347                                (place-fret 4 4 4)
348                                (place-fret 3 3 2) 
349                                (place-fret 2 2 1)
350                                (place-fret 1 2 1))
351     }
352   }
353   fis fis fis
354   c^\markup \override #'(dot-radius . 0.35) {
355     \override #'(finger-code . in-dot) {
356       \override #'(dot-color . white) {
357         \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
358       }
359     }
360   }
361   c c c
362 }
363 @end lilypond
364
365 You can set a number of graphical properties according to your preference.
366 Details about the property interface to fret diagrams are found at
367 @rinternals{fret-diagram-interface}.
368
369
370 @seealso
371
372 Snippets:
373 @rlsr{Fretted strings}.
374
375 @node Right-hand fingerings
376 @subsubsection Right-hand fingerings
377
378 Right-hand fingerings @var{p-i-m-a} must be entered within a  
379 chord construct @code{<>} for them to be printed in the score, 
380 even when applied to a single note. 
381
382 @warning{There @strong{must} be a hyphen after the note and a space 
383 before the closing @code{>}.}
384
385 @lilypond[quote,verbatim,relative=0]
386 {
387   \clef "treble_8"
388   <c-\rightHandFinger #1 >4 
389   <e-\rightHandFinger #2 > 
390   <g-\rightHandFinger #3 > 
391   <c-\rightHandFinger #4 >
392   <c,-\rightHandFinger #1 e-\rightHandFinger #2 g-\rightHandFinger #3 c-\rightHandFinger #4 >1
393 }
394 @end lilypond
395
396 For convenience, you can abbreviate @code{\rightHandFinger} to something
397 short, for example @code{RH},
398
399 @example
400 #(define RH rightHandFinger)
401 @end example
402
403 @cindex fingerings, right hand, for guitar
404 @cindex right hand fingerings for guitar
405
406 @snippets
407
408 You may exercise greater control over the placement of right-hand 
409 fingerings by setting @code{strokeFingerOrientations},
410
411 @lilypond[quote,verbatim,ragged-right,fragment,relative=0]
412 #(define RH rightHandFinger)
413 {
414   \clef "treble_8"
415   \set strokeFingerOrientations = #'(up down)
416   <c-\RH #1 e-\RH #2 g-\RH #3 c-\RH #4 > 4
417   \set strokeFingerOrientations = #'(up right down)
418   <c-\RH #1 e-\RH #2 g-\RH #3 c-\RH #4 > 4
419   \set strokeFingerOrientations = #'(left)
420   <c-\RH #1 e-\RH #2 g-\RH #3 c-\RH #4 > 2
421 }
422 @end lilypond
423
424 This example combines left-hand fingering, string indication, and 
425 right-hand fingering
426
427 @lilypond[quote,ragged-right,fragment,verbatim,relative=0]
428 #(define RH rightHandFinger)
429 {
430   \clef "treble_8"
431   <c-3\5-\RH #1 >4 
432   <e-2\4-\RH #2 > 
433   <g-0\3-\RH #3 > 
434   <c-1\2-\RH #4 >
435 }
436 @end lilypond
437
438 @seealso
439
440 Snippets:
441 @rlsr{Fretted strings}.
442
443 Internals Reference: 
444 @rinternals{StrokeFinger}.
445
446
447 @node Guitar
448 @subsection Guitar
449
450 @c TODO Make a snippet based on
451 @c http://www.nabble.com/Creating-a-nice-formatted-Chords-%2B-Lyrics-layout-for-guitar-players-to13829430.html
452 @c and include it somewhere -td
453
454 @menu
455 * Guitar tablatures::           
456 * Indicating position and barring::  
457 * Indicating harmonics and dampened notes::  
458 @end menu
459
460 @node Guitar tablatures
461 @subsubsection Guitar tablatures
462
463 @c TODO Add text
464 TBC
465
466 @node Indicating position and barring
467 @subsubsection Indicating position and barring
468
469 This example demonstrates how to include guitar position and
470 barring indications.
471
472 @lilypond[quote,ragged-right,fragment,verbatim,relative=0]
473 \clef "treble_8"
474 b16 d g b e
475 \textSpannerDown
476 \override TextSpanner #'bound-details #'left #'text = #"XII "
477   g16\startTextSpan
478   b16 e g e b g\stopTextSpan
479 e16 b g d
480 @end lilypond
481
482 @node Indicating harmonics and dampened notes
483 @subsubsection Indicating harmonics and dampened notes
484
485 Special note heads can be used to indicate dampened notes or 
486 harmonics.  Harmonics are normally further explained with a 
487 text markup.
488
489 @lilypond[quote,ragged-right,fragment,verbatim]
490 \relative c' {
491   \clef "treble_8"
492   \override Staff.NoteHead #'style = #'cross
493   g8 a b c b4
494   \override Staff.NoteHead #'style = #'harmonic-mixed
495   d^\markup { \italic { \fontsize #-2 { "harm. 12" }}} <g b>1
496 }
497 @end lilypond
498
499 @seealso
500
501 Snippets:
502 @rlsr{Fretted strings}.
503
504 Notation Reference:
505 @ref{Special note heads},
506 @ref{Note head styles}.
507
508 @node Banjo
509 @subsection Banjo
510
511 @menu
512 * Banjo tablatures::            
513 @end menu
514
515 @node Banjo tablatures
516 @subsubsection Banjo tablatures
517 @cindex Banjo tablatures
518
519 LilyPond has basic support for the five-string banjo.  When making tablatures
520 for five-string banjo, use the banjo tablature format function to get
521 correct fret numbers for the fifth string:
522
523 @lilypond[quote,ragged-right,fragment,verbatim]
524 \new TabStaff <<
525   \set TabStaff.tablatureFormat = #fret-number-tablature-format-banjo
526   \set TabStaff.stringTunings = #banjo-open-g-tuning
527   {
528     \stemDown
529     g8 d' g'\5 a b g e d' |
530     g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
531     g4
532   }
533 >>
534 @end lilypond
535
536 A number of common tunings for banjo are predefined in LilyPond:
537 @code{banjo-c-tuning} (gCGBD), @code{banjo-modal-tuning} (gDGCD),
538 @code{banjo-open-d-tuning} (aDF#AD) and @code{banjo-open-dm-tuning}
539 (aDFAD).
540
541 These tunings may be converted to four string banjo tunings using the
542 @code{four-string-banjo} function:
543
544 @example
545 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
546 @end example
547
548 @seealso
549
550 Snippets:
551 @rlsr{Fretted strings}.
552
553 The file @file{scm/@/output@/-lib@/.scm} contains predefined banjo tunings.
554
555
556