]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/fretted-strings.itely
c96f6c5972a1f77d8e83a03d6e5a1f6fb23c585f
[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.  Lilypond automatically sets the correct 
292 transposition for predefined tunings.  The following example is
293 for bass guitar, which sounds an octave lower than written.
294
295 @lilypond[quote,ragged-right,verbatim]
296 <<
297   \new Staff <<
298     \clef "bass_8"
299     \relative c, {
300     c4 d e f
301     }
302   >>
303   \new TabStaff <<
304     \set TabStaff.stringTunings = #bass-tuning
305     \relative c, {
306     c4 d e f
307     }
308   >>
309 >>
310 @end lilypond
311
312 The default string tuning is @code{guitar-tuning} (the standard
313 EADGBE tuning).  Some other predefined tunings are
314 @code{guitar-open-g-tuning}, @code{mandolin-tuning} and
315 @code{banjo-open-g-tuning}.
316
317 @seealso
318
319 Snippets:
320 @rlsr{Fretted strings}.
321
322 The file @file{scm/@/output@/-lib@/.scm} contains the predefined string
323 tunings.
324
325 Internals Reference: @rinternals{Tab_note_heads_engraver}.
326
327 @knownissues
328
329 No guitar special effects have been implemented.
330
331
332
333 @node Fret diagrams
334 @subsubsection Fret diagrams
335 @cindex fret diagrams
336 @cindex chord diagrams
337
338 Fret diagrams can be added to music as a markup to the desired
339 note.  The markup contains information about the desired fret
340 diagram.  There are three different fret-diagram markup
341 interfaces: standard, terse, and verbose.  The three interfaces
342 produce equivalent markups, but have varying amounts of
343 information in the markup string.  Details about the markup
344 interfaces are found at @ref{Text markup commands}.
345
346 The following example shows the three fret-diagram markup
347 interfaces, along with examples of common tweaks.  For example,
348 the size of the verbose fret diagram is reduced to 0.75, and the
349 finger indications are specified to appear below the diagram.  The
350 terse diagram includes tweaks to specify placement of finger code
351 and color of dots.
352
353 @lilypond[verbatim,ragged-right,quote]
354 \new Voice {
355   \clef "treble_8"
356   d^\markup \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
357   d d d
358   fis^\markup \override #'(size . 0.75) {
359     \override #'(finger-code . below-string) {
360       \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
361                                (place-fret 5 4 3) 
362                                (place-fret 4 4 4)
363                                (place-fret 3 3 2) 
364                                (place-fret 2 2 1)
365                                (place-fret 1 2 1))
366     }
367   }
368   fis fis fis
369   c^\markup \override #'(dot-radius . 0.35) {
370     \override #'(finger-code . in-dot) {
371       \override #'(dot-color . white) {
372         \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
373       }
374     }
375   }
376   c c c
377 }
378 @end lilypond
379
380 You can set a number of graphical properties according to your preference.
381 Details about the property interface to fret diagrams are found at
382 @rinternals{fret-diagram-interface}.
383
384
385 @seealso
386
387 Snippets:
388 @rlsr{Fretted strings}.
389
390 @node Right-hand fingerings
391 @subsubsection Right-hand fingerings
392
393 Right-hand fingerings @var{p-i-m-a} must be entered within a  
394 chord construct @code{<>} for them to be printed in the score, 
395 even when applied to a single note. 
396
397 @warning{There @strong{must} be a hyphen after the note and a space 
398 before the closing @code{>}.}
399
400 @lilypond[quote,verbatim,relative=0]
401 \clef "treble_8"
402 <c-\rightHandFinger #1 >4 
403 <e-\rightHandFinger #2 > 
404 <g-\rightHandFinger #3 > 
405 <c-\rightHandFinger #4 >
406 <c,-\rightHandFinger #1 e-\rightHandFinger #2 g-\rightHandFinger #3 c-\rightHandFinger #4 >1
407 @end lilypond
408
409 For convenience, you can abbreviate @code{\rightHandFinger} to something
410 short, for example @code{RH},
411
412 @example
413 #(define RH rightHandFinger)
414 @end example
415
416 @cindex fingerings, right hand, for guitar
417 @cindex right hand fingerings for guitar
418
419 @snippets
420
421 You may exercise greater control over the placement of right-hand 
422 fingerings by setting @code{strokeFingerOrientations},
423
424 @lilypond[quote,verbatim]
425 #(define RH rightHandFinger)
426 \relative c {
427   \clef "treble_8"
428   \set strokeFingerOrientations = #'(up down)
429   <c-\RH #1 e-\RH #2 g-\RH #3 c-\RH #4 > 4
430   \set strokeFingerOrientations = #'(up right down)
431   <c-\RH #1 e-\RH #2 g-\RH #3 c-\RH #4 > 4
432   \set strokeFingerOrientations = #'(left)
433   <c-\RH #1 e-\RH #2 g-\RH #3 c-\RH #4 > 2
434 }
435 @end lilypond
436
437 This example combines left-hand fingering, string indication, and 
438 right-hand fingering
439
440 @lilypond[quote,verbatim]
441 #(define RH rightHandFinger)
442 \relative c {
443   \clef "treble_8"
444   <c-3\5-\RH #1 >4 
445   <e-2\4-\RH #2 > 
446   <g-0\3-\RH #3 > 
447   <c-1\2-\RH #4 >
448 }
449 @end lilypond
450
451 @seealso
452
453 Snippets:
454 @rlsr{Fretted strings}.
455
456 Internals Reference: 
457 @rinternals{StrokeFinger}.
458
459
460 @node Guitar
461 @subsection Guitar
462
463 @c TODO Make a snippet based on
464 @c http://www.nabble.com/Creating-a-nice-formatted-Chords-%2B-Lyrics-layout-for-guitar-players-to13829430.html
465 @c and include it somewhere -td
466
467 @menu
468 * Guitar tablatures::           
469 * Indicating position and barring::  
470 * Indicating harmonics and dampened notes::  
471 @end menu
472
473 @node Guitar tablatures
474 @subsubsection Guitar tablatures
475
476 @c TODO Add text
477 TBC
478
479 @node Indicating position and barring
480 @subsubsection Indicating position and barring
481
482 This example demonstrates how to include guitar position and
483 barring indications.
484
485 @lilypond[quote,ragged-right,fragment,verbatim,relative=0]
486 \clef "treble_8"
487 b16 d g b e
488 \textSpannerDown
489 \override TextSpanner #'bound-details #'left #'text = #"XII "
490   g16\startTextSpan
491   b16 e g e b g\stopTextSpan
492 e16 b g d
493 @end lilypond
494
495 @node Indicating harmonics and dampened notes
496 @subsubsection Indicating harmonics and dampened notes
497
498 Special note heads can be used to indicate dampened notes or 
499 harmonics.  Harmonics are normally further explained with a 
500 text markup.
501
502 @lilypond[quote,ragged-right,fragment,verbatim]
503 \relative c' {
504   \clef "treble_8"
505   \override Staff.NoteHead #'style = #'cross
506   g8 a b c b4
507   \override Staff.NoteHead #'style = #'harmonic-mixed
508   d^\markup { \italic { \fontsize #-2 { "harm. 12" }}} <g b>1
509 }
510 @end lilypond
511
512 @seealso
513
514 Snippets:
515 @rlsr{Fretted strings}.
516
517 Notation Reference:
518 @ref{Special note heads},
519 @ref{Note head styles}.
520
521 @node Banjo
522 @subsection Banjo
523
524 @menu
525 * Banjo tablatures::            
526 @end menu
527
528 @node Banjo tablatures
529 @subsubsection Banjo tablatures
530 @cindex Banjo tablatures
531
532 LilyPond has basic support for the five-string banjo.  When making tablatures
533 for five-string banjo, use the banjo tablature format function to get
534 correct fret numbers for the fifth string:
535
536 @lilypond[quote,ragged-right,fragment,verbatim]
537 \new TabStaff <<
538   \set TabStaff.tablatureFormat = #fret-number-tablature-format-banjo
539   \set TabStaff.stringTunings = #banjo-open-g-tuning
540   {
541     \stemDown
542     g8 d' g'\5 a b g e d' |
543     g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
544     g4
545   }
546 >>
547 @end lilypond
548
549 A number of common tunings for banjo are predefined in LilyPond:
550 @code{banjo-c-tuning} (gCGBD), @code{banjo-modal-tuning} (gDGCD),
551 @code{banjo-open-d-tuning} (aDF#AD) and @code{banjo-open-dm-tuning}
552 (aDFAD).
553
554 These tunings may be converted to four string banjo tunings using the
555 @code{four-string-banjo} function:
556
557 @example
558 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
559 @end example
560
561 @seealso
562
563 Snippets:
564 @rlsr{Fretted strings}.
565
566 The file @file{scm/@/output@/-lib@/.scm} contains predefined banjo tunings.
567
568
569
570