]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/fretted-strings.itely
Merge branch 'master' of ssh+git://hanwen@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.53"
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 * Automatic fret diagrams::               
40 * Fret diagram markups::
41 * Right-hand fingerings::       
42 @end menu
43
44 @node References for fretted strings
45 @subsubsection References for fretted strings
46
47 Music for fretted string instruments is normally notated on
48 a single staff, either in traditional music notation or in
49 tablature.  Sometimes the two types are combined, and it is
50 especially common in popular music to use chord diagrams above
51 a staff of traditional notation.  The guitar and the banjo are
52 transposing instruments, sounding an octave lower than written. 
53 Scores for these instruments should use the @code{"treble_8"} clef. 
54 Some other elements pertinent to fretted string instruments 
55 are covered elsewhere:
56
57 @itemize
58 @item Fingerings are indicated with @ref{Fingering instructions}.
59
60 @item Instructions for @notation{Laissez vibrer} ties
61 as well as ties on arpeggios and tremolos is described in
62 @ref{Ties}.
63
64 @item Instructions on handling multiple voices is described 
65 in @ref{Collision resolution}. 
66
67 @end itemize
68
69 @seealso
70
71 Notation Reference:
72 @ref{Instrument names},
73 @ref{Writing music in parallel},
74 @ref{Fingering instructions},
75 @ref{Ties},
76 @ref{Arpeggio},
77 @ref{List of articulations},
78 @ref{Clef}.
79
80 @node String number indications
81 @subsubsection String number indications
82
83 @cindex String numbers
84
85 The string on which a note should be played may be indicated by
86 appending @code{\@var{number}} to a note inside a chord construct
87 @code{<>}.
88
89 @warning{String numbers @strong{must} be defined inside a chord
90 construct even if there is only a single note.}
91
92 @lilypond[verbatim,quote,relative=0]
93 \clef "treble_8"
94 <c\5>4 <e\4> <g\3>2
95 <c,\5 e\4 g\3>1
96 @end lilypond
97
98 When fingerings and string indications are used together, their
99 placement is controlled by the order in which the two items appear
100 in the code:
101
102 @lilypond[verbatim,quote,relative=1]
103 \clef "treble_8"
104 <g\3-0>2
105 <g-0\3>
106 @end lilypond
107
108 @snippets
109
110 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
111 {controlling-the-placement-of-chord-fingerings.ly}
112
113 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
114 {allowing-fingerings-to-be-printed-inside-the-staff.ly}
115
116 @seealso
117
118 Notation Reference:
119 @ref{Fingering instructions}.
120
121 Snippets:
122 @rlsr{Fretted strings}.
123
124 Internals Reference:
125 @rinternals{StringNumber},
126 @rinternals{Fingering}.
127
128
129 @node Default tablatures
130 @subsubsection Default tablatures
131 @cindex Tablatures, basic
132 @cindex Tablatures, default
133
134 Tablature notation is used for notating music for plucked string
135 instruments.  Pitches are not denoted with note heads, but by
136 numbers indicating on which string and fret a note must be played.  
137 LilyPond offers limited support for tablature.
138
139 The string number associated with a note is given as a backslash
140 followed by a number.  By default, string 1 is the highest, 
141 and the tuning defaults to the standard guitar tuning (with 6 strings).  
142 The notes are printed as tablature, by using @code{TabStaff} and
143 @code{TabVoice} contexts
144
145 @lilypond[quote,ragged-right,fragment,verbatim]
146 \new TabStaff {
147   a,4\5 c'\2 a\3 e'\1
148   e\4 c'\2 a\3 e'\1
149 }
150 @end lilypond
151
152 @funindex minimumFret
153 @cindex fret
154
155
156 When no string is specified for a note, the note is assigned to
157 the lowest string that can generate the note with a fret number
158 greater than or equal to @code{minimumFret} is selected.  The
159 default value for @code{minimumFret} is 0.
160
161
162 @lilypond[quote,ragged-right,verbatim]
163 \new StaffGroup <<
164    \new Staff \relative c {
165      \clef "treble_8"
166      c16 d e f g4
167      c,16 d e f g4
168    }
169    \new TabStaff \relative c {
170      c16 d e f g4
171      \set TabStaff.minimumFret = #5
172      c,16 d e f g4
173    }
174 >>
175 @end lilypond
176
177 @snippets
178
179 The direction of stems is controlled the same way in tablature as
180 in traditional notation. Beams can be made horizontal:
181
182 @lilypond[quote,ragged-right,verbatim]
183 \new TabStaff {
184   \relative c {
185     g16 b d g
186     b d g b
187     \stemDown
188     \override Beam #'damping = #100000
189     g,,16 b d g
190     b d g b
191   }
192 }
193 @end lilypond
194
195 Polyphony is created the same way in a @code{TabStaff} as in a
196 regular staff.
197
198 @lilypond[quote,ragged-right,verbatim]
199 upper = \relative c' {
200         \time 12/8
201         \key e \minor
202         \voiceOne
203         r4. r8 e, fis g16 b g e e' b c b a g fis e
204 }
205
206 lower = \relative c {
207         \key e \minor
208         \voiceTwo
209         r16 e d c b a g4 fis8 e fis g a b c  
210 }
211
212 \score {
213   <<
214     \new StaffGroup = "tab with traditional" <<
215       \new Staff = "guitar traditional" <<
216             \clef "treble_8"
217             \context Voice = "upper" \upper
218             \context Voice = "lower" \lower
219       >>
220       \new TabStaff = "guitar tab" << 
221             \context TabVoice = "upper"  \upper 
222             \context TabVoice = "lower"  \lower 
223       >>
224     >>
225   >>
226 }
227 @end lilypond
228
229 @seealso
230
231 Notation Reference:
232 @ref{Stems}.
233
234 Snippets:
235 @rlsr{Fretted strings}.
236
237 Internals Reference: 
238 @rinternals{TabNoteHead},
239 @rinternals{TabStaff},
240 @rinternals{TabVoice},
241 @rinternals{Beam}.
242
243 @knownissues
244
245 Chords are not handled in a special way, and hence the automatic
246 string selector may easily select the same string for two notes in
247 a chord.
248
249 In order to handle @code{\partcombine}, a @code{TabStaff} must use
250 specially-created voices:
251
252 @lilypond[quote,ragged-right,verbatim]
253 melodia = \partcombine { e4 g g g }{ e4 e e e }
254 <<
255   \new TabStaff <<
256     \new TabVoice = "one" s1
257     \new TabVoice = "two" s1
258     \new TabVoice = "shared" s1
259     \new TabVoice = "solo" s1
260     { \melodia }
261   >>
262 >>
263 @end lilypond
264
265
266 @node Custom tablatures
267 @subsubsection Custom tablatures
268 @cindex Tablatures, custom
269
270 You can change the tuning of the strings.  A string tuning is
271 given as a Scheme list with one integer number for each string,
272 the number being the pitch (measured in semitones relative to
273 middle C) of an open string.  The numbers specified for
274 @code{stringTunings} are the numbers of semitones to subtract or
275 add, starting the specified pitch by default middle C, in string
276 order.  LilyPond automatically calculates the number of strings by
277 looking at @code{stringTunings}.
278
279 In the next example, @code{stringTunings} is set for the pitches
280 e, a, d, and g.
281
282 @lilypond[quote,ragged-right,fragment,verbatim]
283 \new TabStaff <<
284   \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
285   {
286     a,4 c' a e' e c' a e'
287   }
288 >>
289 @end lilypond
290
291 LilyPond comes with predefined string tunings for banjo, mandolin,
292 guitar and bass guitar.  Lilypond automatically sets the correct 
293 transposition for predefined tunings.  The following example is
294 for bass guitar, which sounds an octave lower than written.
295
296 @lilypond[quote,ragged-right,verbatim]
297 <<
298   \new Staff <<
299     \clef "bass_8"
300     \relative c, {
301     c4 d e f
302     }
303   >>
304   \new TabStaff <<
305     \set TabStaff.stringTunings = #bass-tuning
306     \relative c, {
307     c4 d e f
308     }
309   >>
310 >>
311 @end lilypond
312
313 The default string tuning is @code{guitar-tuning} (the standard
314 EADGBE tuning).  Some other predefined tunings are
315 @code{guitar-open-g-tuning}, @code{mandolin-tuning} and
316 @code{banjo-open-g-tuning}.
317
318 @seealso
319
320 Snippets:
321 @rlsr{Fretted strings}.
322
323 The file @file{scm/@/output@/-lib@/.scm} contains the predefined string
324 tunings.
325
326 Internals Reference: 
327 @rinternals{Tab_note_heads_engraver}.
328
329 @knownissues
330
331 No guitar special effects have been implemented.
332
333 @node Automatic fret diagrams
334 @subsubsection Automatic fret diagrams
335 @cindex fret diagrams
336 @cindex chord diagrams
337
338 Fret diagrams can be automatically created from entered notes using the 
339 @code{FretBoards} context.  This context calculates strings and frets
340 which can be used to play the notes.
341
342 @lilypond[quote,ragged-right,verbatim]
343 <<
344   \context ChordNames {
345      \chordmode { 
346        f1 g  
347      }
348   }
349   \context FretBoards {
350     < f, c f a c' f'>1
351     < g,\6 b, d g b g'>
352   }
353   \context Staff {
354     \clef "treble_8"
355     < f, c f a c' f'>1
356     < g, b, d g b' g'>
357   }  
358 >>
359 @end lilypond
360
361 Notes can be explicitly placed on a string.  It is often enough
362 to place only the lowest note on an explicit string; the rest of 
363 the notes will then be placed appropriately by the @code{FretBoards}
364 context.
365
366 @lilypond[quote,ragged-right,verbatim]
367 <<
368   \context ChordNames {
369      \chordmode { 
370        c1 c d:m d:m    
371      }
372   }
373   \context FretBoards {
374     < c e g c' e' > 1
375     < c\5 e g c' e' > 1
376     < d a d' f'>
377     < d\4 a d' f'>
378   }
379   \context Staff {
380     \clef "treble_8"
381     < c e g c' e' > 1
382     < c e g c' e' > 1
383     < d a d' f'>
384     < d a d' f'>
385   }  
386 >>
387 @end lilypond
388
389 Fingerings can be added to FretBoard fret diagrams.
390
391 @lilypond[quote, verbatim]
392 <<
393   \context ChordNames {
394      \chordmode { 
395        c1 d:m          
396      }
397   }
398   \context FretBoards {
399     < c\5-3 e-2 g c'-1 e' > 1
400     < d\4 a-2 d'-3 f'-1>
401   }
402   \context Staff {
403     \clef "treble_8"
404     < c e g c' e' > 1
405     < d a d' f'>
406   }  
407 >>
408 @end lilypond
409
410 The strings and frets for the @code{FretBoards} context depend
411 on the @code{stringTunings} property, which has the same meaning
412 as in the TabStaff context.  See @ref{Custom tablatures} for 
413 information on the @code{stringTunings} property. 
414
415 The graphical layout of a fret diagram can be customized according to
416 user preference through the properties of the @code{fret-diagram-interface}.
417 Details are found at @rinternals{fret-diagram-interface}.  For a 
418 @code{FretBoards} fret diagram, the interface properties belong to 
419 @code{FretBoards}.
420
421 @snippets
422 The minimum fret to be used in calculating strings and frets for
423 the FretBoard context can be set with the @code{minimumFret}
424 property.
425
426 @c TODO -- snippet showing minimum fret.
427
428 @c TODO -- snippet for using StringTunings
429
430 @seealso
431
432 Notation Reference:
433 @ref{Custom tablatures}
434
435 Snippets:
436 @rlsr{Fretted strings}.
437
438 Internals Reference:
439 @rinternals {fret-diagram-interface}.
440
441
442 @node Fret diagram markups
443 @subsubsection Fret diagram markups
444 @cindex fret diagrams
445 @cindex chord diagrams
446
447 Fret diagrams can be added to music as a markup to the desired
448 note.  The markup contains information about the desired fret
449 diagram.  There are three different fret-diagram markup
450 interfaces: standard, terse, and verbose.  The three interfaces
451 produce equivalent markups, but have varying amounts of
452 information in the markup string.  Details about the markup
453 interfaces are found at @ref{Text markup commands}.
454
455 The standard fret diagram markup string indicates the string
456 number and the fret number for each dot to be placed on the string.
457 In addition, open and unplayed (muted) strings can be indicated.
458
459 @lilypond[quote, verbatim]
460 <<
461   \context ChordNames {
462      \chordmode { 
463        c1 d:m          
464      }
465   }
466   \context Staff {
467     \clef "treble_8"
468     < c e g c' e' > 1 ^\markup 
469       \fret-diagram #"6-x;5-3;4-2;3-o;2-1;1-o;"
470     < d a d' f'> ^\markup
471       \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-1;"
472   }  
473 >>
474 @end lilypond
475
476 Barre indications can be added to the diagram from
477 the fret-diagram markup string.
478
479 @lilypond[quote, verbatim]
480 <<
481   \context ChordNames {
482      \chordmode {
483        f1 g
484      }
485   }
486   \context Staff {
487     \clef "treble_8"
488     < f, c f a c' f'>1 ^\markup
489       \fret-diagram #"c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
490     < g, b, d g b' g'> ^\markup
491       \fret-diagram #"c:6-1-3;6-3;5-5;4-5;3-4;2-3;1-3;"
492   }
493 >>
494 @end lilypond
495
496 The size of the fret diagram, and the number of frets in the diagram
497 can be changed in the fret-diagram markup string.
498
499 @lilypond[quote, verbatim]
500 <<
501   \context ChordNames {
502      \chordmode {
503        f1 g
504      }
505   }
506   \context Staff {
507     \clef "treble_8"
508     < f, c f a c' f'>1 ^\markup
509       \fret-diagram #"s:1.5;c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
510     < g, b, d g b' g'> ^\markup
511       \fret-diagram #"h:6;6-3;5-2;4-o;3-o;2-o;1-3;"
512   }
513 >>
514 @end lilypond
515
516 The number of strings in a fret diagram can be changed to accomodate
517 different instruments such as banjos and ukeleles with the fret-diagram
518 markup string.
519
520 @lilypond[quote, verbatim]
521 <<
522   \context ChordNames {
523      \chordmode {
524        a1
525      }
526   }
527   \context Staff {
528         %% A chord for ukelele
529     a'1 ^\markup \fret-diagram #"w:4;4-2-2;3-1-1;2-o;1-o;"
530   }
531 >>
532 @end lilypond
533
534 Fingering indications can be added, and the location of fingering labels
535 can be controlled by the fret-diagram markup string.
536
537 @lilypond[quote, verbatim]
538 <<
539   \context ChordNames {
540      \chordmode { 
541        c1 d:m          
542      }
543   }
544   \context Staff {
545     \clef "treble_8"
546     < c e g c' e' > 1 ^\markup 
547       \fret-diagram #"f:1;6-x;5-3-3;4-2-2;3-o;2-1-1;1-o;"
548     < d a d' f'> ^\markup
549       \fret-diagram #"f:2;6-x;5-x;4-o;3-2-2;2-3-3;1-1-1;"
550   }  
551 >>
552 @end lilypond
553
554 Dot radius and dot position can be controlled with the fret-diagram
555 markup string.
556
557 @lilypond[quote, verbatim]
558 <<
559   \context ChordNames {
560      \chordmode { 
561        c1 d:m          
562      }
563   }
564   \context Staff {
565     \clef "treble_8"
566     < c e g c' e' > 1 ^\markup 
567       \fret-diagram #"d:0.35;6-x;5-3;4-2;3-o;2-1;1-o;"
568     < d a d' f'> ^\markup
569       \fret-diagram #"p:0.2;6-x;5-x;4-o;3-2;2-3;1-1;"
570   }  
571 >>
572 @end lilypond
573
574 The fret-diagram-terse markup string omits string numbers; the string
575 number is implied by the presence of semicolons.  There is one semicolon 
576 for each string in the diagram.  The first semicolon corresponds to the
577 highest string number and the last semicolon corresponds to the first string.
578 Mute strings, open strings, and fret numbers can be indicated.
579
580 @lilypond[quote, verbatim]
581 <<
582   \context ChordNames {
583      \chordmode {
584        c1 d:m
585      }
586   }
587   \context Staff {
588     \clef "treble_8"
589     < c e g c' e' > 1 ^\markup
590       \fret-diagram-terse #"x;3;2;o;1;o;"
591     < d a d' f'> ^\markup
592       \fret-diagram-terse #"x;x;o;2;3;1;"
593   }
594 >>
595 @end lilypond
596
597 Barre indicators can be included in the fret-diagram-terse markup string.
598
599 @lilypond[quote, verbatim]
600 <<
601   \context ChordNames {
602      \chordmode {
603        f1 g
604      }
605   }
606   \context Staff {
607     \clef "treble_8"
608     < f, c f a c' f'>1 ^\markup
609       \fret-diagram-terse #"1-(;3;3;2;1;1-);"
610     < g, b, d g b' g'> ^\markup
611       \fret-diagram-terse #"3-(;5;5;4;3;3-);"
612   }
613 >>
614 @end lilypond      
615
616 Fingering indications can be included in the fret-diagram-terse markup string.
617
618 @c Need to use override to enable fingerings to show this -- can we do so?
619 @lilypond[quote, verbatim]
620 <<    
621   \context ChordNames {
622      \chordmode {
623        c1 d:m
624      }
625   }
626   \context Staff {
627     \override Voice.TextScript 
628       #'fret-diagram-details #'finger-code = #'below-string
629     \clef "treble_8"
630     < c e g c' e' > 1 ^\markup
631       \fret-diagram-terse #"x;3-3;2-2;o;1-1;o;"
632     < d a d' f'> ^\markup
633       \fret-diagram-terse #"x;x;o;2-2;3-3;1-1;"
634   }
635 >>
636 @end lilypond
637
638 Other fret diagram properties must be adjusted using @code{\override} when using
639 the fret-diagram-terse markup.
640
641 The fret-diagram-verbose markup string is in the format of a Scheme list.  Each
642 element of the list indicates an item to be placed on the fret diagram.
643
644 @lilypond[quote, verbatim]
645 <<  \context ChordNames {
646      \chordmode {
647        c1 d:m
648      }
649   }
650   \context Staff {
651     \clef "treble_8"
652     < c e g c' e' > 1 ^\markup
653       \fret-diagram-verbose #'(
654         (mute 6)
655         (place-fret 5 3)
656         (place-fret 4 2)
657         (open 3)
658         (place-fret 2 1)
659         (open 1)
660       )
661     < d a d' f'> ^\markup
662       \fret-diagram-verbose #'(
663         (mute 6)
664         (mute 5)
665         (open 4)
666         (place-fret 3 2)
667         (place-fret 2 3)
668         (place-fret 1 1)
669       )
670   }
671 >>
672 @end lilypond
673
674 Fingering indications and barres can be included in a 
675 fret-diagram-verbose markup string.
676
677 @c \override is necessary to make fingering visible
678 @lilypond[quote, verbatim]
679 <<
680   \context ChordNames {
681      \chordmode {
682        f1 g
683      }
684   }
685   \context Staff {
686     \clef "treble_8"
687     \override Voice.TextScript
688       #'fret-diagram-details #'finger-code = #'below-string
689
690     < f, c f a c' f'>1 ^\markup
691       \fret-diagram-verbose #'(
692         (place-fret 6 1)
693         (place-fret 5 3)
694         (place-fret 4 3)
695         (place-fret 3 2)
696         (place-fret 2 1)
697         (place-fret 1 1)
698         (barre 6 1 1)
699       )
700     < g, b, d g b' g'> ^\markup
701       \fret-diagram-verbose #'(
702         (place-fret 6 3 2)
703         (place-fret 5 2 1)
704         (open 4)
705         (open 3)
706         (open 2)
707         (place-fret 1 3 3)
708       )
709   }
710 >>
711 @end lilypond
712
713 All other fret diagram properties must be adjusted using @code{\override} 
714 when using the fret-diagram-verbose markup.
715
716 @ignore
717 The following example shows the three fret-diagram markup
718 interfaces, along with examples of common tweaks.  For example,
719 the size of the verbose fret diagram is reduced to 0.75, and the
720 finger indications are specified to appear below the diagram.  The
721 terse diagram includes tweaks to specify placement of finger code
722 and color of dots.
723
724 @lilypond[verbatim,ragged-right,quote]
725 \new Voice {
726   \clef "treble_8"
727   d^\markup \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
728   d d d
729   fis^\markup \override #'(size . 0.75) {
730     \override #'(finger-code . below-string) {
731       \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
732                                (place-fret 5 4 3) 
733                                (place-fret 4 4 4)
734                                (place-fret 3 3 2) 
735                                (place-fret 2 2 1)
736                                (place-fret 1 2 1))
737     }
738   }
739   fis fis fis
740   c^\markup \override #'(dot-radius . 0.35) {
741     \override #'(finger-code . in-dot) {
742       \override #'(dot-color . white) {
743         \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
744       }
745     }
746   }
747   c c c
748 }
749 @end lilypond
750 @end ignore
751
752 The graphical layout of a fret diagram can be customized according to
753 user preference through the properties of the @code{fret-diagram-interface}.
754 Details are found at @rinternals{fret-diagram-interface}.  For a fret diagram
755 markup , the interface properties belong to @code{Voice.TextScript}.
756
757 @snippets
758 TODO create snippets for changing properties.  Use regression test?
759
760 @seealso
761
762 Notation Reference:
763 @ref{Text markup commands}.
764
765 Snippets:
766 @rlsr{Fretted strings}.
767
768 Internals Reference:
769 @rinternals{fret-diagram-interface}.
770
771 @node Right-hand fingerings
772 @subsubsection Right-hand fingerings
773
774 Right-hand fingerings @var{p-i-m-a} must be entered within a  
775 chord construct @code{<>} for them to be printed in the score, 
776 even when applied to a single note. 
777
778 @warning{There @strong{must} be a hyphen after the note and a space 
779 before the closing @code{>}.}
780
781 @lilypond[quote,verbatim,relative=0]
782 \clef "treble_8"
783 <c-\rightHandFinger #1 >4 
784 <e-\rightHandFinger #2 > 
785 <g-\rightHandFinger #3 > 
786 <c-\rightHandFinger #4 >
787 <c,-\rightHandFinger #1 e-\rightHandFinger #2 g-\rightHandFinger #3 c-\rightHandFinger #4 >1
788 @end lilypond
789
790 For convenience, you can abbreviate @code{\rightHandFinger} to something
791 short, for example @code{RH},
792
793 @example
794 #(define RH rightHandFinger)
795 @end example
796
797 @cindex fingerings, right hand, for guitar
798 @cindex right hand fingerings for guitar
799
800 @snippets
801
802 You may exercise greater control over the placement of right-hand 
803 fingerings by setting @code{strokeFingerOrientations},
804
805 @lilypond[quote,verbatim]
806 #(define RH rightHandFinger)
807 \relative c {
808   \clef "treble_8"
809   \set strokeFingerOrientations = #'(up down)
810   <c-\RH #1 e-\RH #2 g-\RH #3 c-\RH #4 > 4
811   \set strokeFingerOrientations = #'(up right down)
812   <c-\RH #1 e-\RH #2 g-\RH #3 c-\RH #4 > 4
813   \set strokeFingerOrientations = #'(left)
814   <c-\RH #1 e-\RH #2 g-\RH #3 c-\RH #4 > 2
815 }
816 @end lilypond
817
818 This example combines left-hand fingering, string indication, and 
819 right-hand fingering
820
821 @lilypond[quote,verbatim]
822 #(define RH rightHandFinger)
823 \relative c {
824   \clef "treble_8"
825   <c-3\5-\RH #1 >4 
826   <e-2\4-\RH #2 > 
827   <g-0\3-\RH #3 > 
828   <c-1\2-\RH #4 >
829 }
830 @end lilypond
831
832 @seealso
833
834 Snippets:
835 @rlsr{Fretted strings}.
836
837 Internals Reference: 
838 @rinternals{StrokeFinger}.
839
840
841 @node Guitar
842 @subsection Guitar
843
844 Most of the notational issues associated with guitar music are
845 covered sufficiently in the general fretted strings section, but there
846 are a few more worth covering here.  Occasionally users want to 
847 create songbook-type documents having only lyrics with chord
848 indications above them.  Since Lilypond is a music typesetter,
849 it is not recommended for documents that have no music notation
850 in them.  A better alternative is a word processor, text editor, 
851 or, for experienced users, a typesetter like GuitarTeX.
852
853 @menu
854 * Indicating position and barring::  
855 * Indicating harmonics and dampened notes::  
856 @end menu
857
858 @node Indicating position and barring
859 @subsubsection Indicating position and barring
860
861 This example demonstrates how to include guitar position and
862 barring indications.
863
864 @lilypond[quote,ragged-right,fragment,verbatim,relative=0]
865 \clef "treble_8"
866 b16 d g b e
867 \textSpannerDown
868 \override TextSpanner #'bound-details #'left #'text = #"XII "
869   g16\startTextSpan
870   b16 e g e b g\stopTextSpan
871 e16 b g d
872 @end lilypond
873
874 @seealso
875
876 Notation Reference:
877 @ref{Text spanners}.
878
879 Snippets:
880 @rlsr{Fretted strings},
881 @rlsr{Expressive marks}.
882
883 @node Indicating harmonics and dampened notes
884 @subsubsection Indicating harmonics and dampened notes
885
886 Special note heads can be used to indicate dampened notes or 
887 harmonics.  Harmonics are normally further explained with a 
888 text markup.
889
890 @lilypond[quote,ragged-right,fragment,verbatim]
891 \relative c' {
892   \clef "treble_8"
893   \override Staff.NoteHead #'style = #'cross
894   g8 a b c b4
895   \override Staff.NoteHead #'style = #'harmonic-mixed
896   d^\markup { \italic { \fontsize #-2 { "harm. 12" }}} <g b>1
897 }
898 @end lilypond
899
900 @seealso
901
902 Snippets:
903 @rlsr{Fretted strings}.
904
905 Notation Reference:
906 @ref{Special note heads},
907 @ref{Note head styles}.
908
909 @node Banjo
910 @subsection Banjo
911
912 @menu
913 * Banjo tablatures::            
914 @end menu
915
916 @node Banjo tablatures
917 @subsubsection Banjo tablatures
918 @cindex Banjo tablatures
919
920 LilyPond has basic support for the five-string banjo.  When making tablatures
921 for five-string banjo, use the banjo tablature format function to get
922 correct fret numbers for the fifth string:
923
924 @c due to crazy intervals of banjo music, absolute pitch is recommended
925
926 @lilypond[quote,ragged-right,fragment,verbatim]
927 \new TabStaff <<
928   \set TabStaff.tablatureFormat = #fret-number-tablature-format-banjo
929   \set TabStaff.stringTunings = #banjo-open-g-tuning
930   {
931     \stemDown
932     g8 d' g'\5 a b g e d' |
933     g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
934     g4
935   }
936 >>
937 @end lilypond
938
939 A number of common tunings for banjo are predefined in LilyPond:
940 @code{banjo-c-tuning} (gCGBD), @code{banjo-modal-tuning} (gDGCD),
941 @code{banjo-open-d-tuning} (aDF#AD) and @code{banjo-open-dm-tuning}
942 (aDFAD).
943
944 These tunings may be converted to four string banjo tunings using the
945 @code{four-string-banjo} function:
946
947 @example
948 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
949 @end example
950
951 @seealso
952
953 Snippets:
954 @rlsr{Fretted strings}.
955
956 The file @file{scm/@/output@/-lib@/.scm} contains predefined banjo tunings.
957
958
959
960
961