1 @c -*- coding: utf-8; mode: texinfo; -*-
3 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
5 When revising a translation, copy the HEAD committish of the
6 version that you are working on. See TRANSLATION for details.
11 @node Fretted string instruments
12 @section Fretted string instruments
14 @lilypondfile[quote]{fretted-headword.ly}
16 This section discusses several aspects of music notation that are unique
17 to fretted string instruments.
20 @cindex tablature, guitar
21 @cindex tablature, banjo
22 @cindex guitar tablature
23 @cindex banjo tablature
26 * Common notation for fretted strings::
31 @node Common notation for fretted strings
32 @subsection Common notation for fretted strings
34 This section discusses common notation that is unique
35 to fretted string instruments.
38 * References for fretted strings::
39 * String number indications::
40 * Default tablatures::
42 * Fret diagram markups::
43 * Predefined fret diagrams::
44 * Automatic fret diagrams::
45 * Right-hand fingerings::
48 @node References for fretted strings
49 @unnumberedsubsubsec References for fretted strings
51 Music for fretted string instruments is normally notated on
52 a single staff, either in traditional music notation or in
53 tablature. Sometimes the two types are combined, and it is
54 especially common in popular music to use chord diagrams above
55 a staff of traditional notation. The guitar and the banjo are
56 transposing instruments, sounding an octave lower than written.
57 Scores for these instruments should use the @code{"treble_8"} clef.
58 Some other elements pertinent to fretted string instruments
59 are covered elsewhere:
62 @item Fingerings are indicated as shown in @ref{Fingering instructions}.
64 @item Instructions for @notation{Laissez vibrer} ties
65 as well as ties on arpeggios and tremolos can be found in
68 @item Instructions for handling multiple voices can be found
69 in @ref{Collision resolution}.
71 @item Instructions for indicating harmonics can be found in
79 @ref{Fingering instructions},
81 @ref{Collision resolution},
82 @ref{Instrument names},
83 @ref{Writing music in parallel},
85 @ref{List of articulations},
89 @node String number indications
90 @unnumberedsubsubsec String number indications
92 @cindex string numbers
93 @cindex string vs. fingering numbers
94 @cindex fingering vs. string numbers
96 The string on which a note should be played may be indicated by
97 appending @code{\@var{number}} to a note inside a chord construct
100 @warning{String numbers @strong{must} be defined inside a chord
101 construct even if there is only a single note.}
103 @lilypond[verbatim,quote,relative=0]
109 When fingerings and string indications are used together, their
110 placement is controlled by the order in which the two items appear
113 @lilypond[verbatim,quote,relative=1]
121 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
122 {controlling-the-placement-of-chord-fingerings.ly}
124 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
125 {allowing-fingerings-to-be-printed-inside-the-staff.ly}
130 @ref{Fingering instructions}.
133 @rlsr{Fretted strings}.
136 @rinternals{StringNumber},
137 @rinternals{Fingering}.
140 @node Default tablatures
141 @unnumberedsubsubsec Default tablatures
143 @cindex tablatures, basic
144 @cindex tablatures, default
149 Music for plucked string instruments is frequently notated using a
150 finger/touch notation or tablature. In contrast to traditional
151 notation pitches are not denoted with note heads, but by numbers (or
152 letterlike symbols in historical intavolatura). The numbers
153 indicate on which string and fret a note must be played. The numbers
154 are printed on top of each other if they are to be played
158 By default, string 1 is the highest,
159 and the tuning defaults to the standard guitar tuning (with 6 strings).
160 The notes are printed as tablature, by using @code{TabStaff} and
161 @code{TabVoice} contexts
163 @lilypond[quote,ragged-right,fragment,verbatim]
164 \new TabStaff \relative c' {
170 Default tablatures do not contain any symbols for tone duration nor any
171 other musical symbols such as e.g. expressive marks.
173 @lilypond[quote,ragged-right,verbatim]
179 c8_.\<\( c16 c ~ c2\!
185 \new Staff { \clef "G_8" \symbols }
186 \new TabStaff { \symbols }
191 @funindex \tabFullNotation
193 If all musical symbols used in traditional notation should also show up
194 in tablature one has to apply the command @code{\tabFullNotation} in a
195 @code{TabStaff}-context. Please bear in mind that half notes are
196 double-stemmed in tablature in order to distinguish them from quarter
199 @lilypond[quote,ragged-right,verbatim]
205 c8_.\<\( c16 c ~ c2\!
217 @funindex minimumFret
221 By default pitches are assigned to the lowest playing position on the
222 fret-board (first position). Open strings are automatically preferred.
223 If you would like a certain pitch to be played on a specific string
224 you can add a string number indication to the pitch name. If you
225 define pitch names and string numbers without a chord construct
226 (@code{<>}) the string number indications do not appear in traditional
227 notation. It is much more comfortable to define the playing position
228 by using the value of @code{minimumFret}. The default value for
232 @lilypond[quote,ragged-right,verbatim]
234 \new Staff \relative c {
238 c,16\5 d\5 e\4 f\4 g4\4
241 \new TabStaff \relative c {
243 c,16\5 d\5 e\4 f\4 g4\4
244 \set TabStaff.minimumFret = #5
251 Ties over a line break are parenthesized by default. The same holds for
252 the second alternative of a repeat.
254 @lilypond[quote,ragged-right,verbatim]
255 ties = \relative c' {
261 { g4\repeatTie c,2. }
286 @funindex \hideSplitTiedTabNotes
288 The command @code{\hideSplitTiedTabNotes} cancels the behavior of
289 engraving fret numbers in parentheses:
291 @lilypond[quote,ragged-right,verbatim]
292 ties = \relative c' {
298 { g4\repeatTie c,2. }
312 \hideSplitTiedTabNotes
324 @cindex harmonic indications in tablature notation
325 @cindex tablature and harmonic indications
326 @cindex slides in tablature notation
327 @cindex tablature and slides
329 Harmonic indications and slides can be added to tablature
332 @lilypond[verbatim, quote, relative=1]
335 <c g'\harmonic> d\2\glissando e\2
343 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
344 {stem-and-beam-behavior-in-tablature.ly}
346 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
347 {polyphony-in-tablature.ly}
355 @rlsr{Fretted strings}.
358 @rinternals{TabNoteHead},
359 @rinternals{TabStaff},
360 @rinternals{TabVoice},
366 Chords are not handled in a special way, and hence the automatic
367 string selector may easily select the same string for two notes in
370 In order to handle @code{\partcombine}, a @code{TabStaff} must use
371 specially-created voices:
373 @lilypond[quote,ragged-right,verbatim]
374 melodia = \partcombine { e4 g g g }{ e4 e e e }
377 \new TabVoice = "one" s1
378 \new TabVoice = "two" s1
379 \new TabVoice = "shared" s1
380 \new TabVoice = "solo" s1
386 Guitar special effects are limited to harmonics and slides.
388 @node Custom tablatures
389 @unnumberedsubsubsec Custom tablatures
391 @cindex tablatures, custom
392 @cindex tablature, banjo
393 @cindex tablature, mandolin
394 @cindex tablature, bass guitar
395 @cindex tablature, predefined string tunings
396 @cindex fretted instruments, predefined string tunings
397 @cindex predefined string tunings for fretted instruments
399 @funindex StringTunings
401 LilyPond tabulature automatically calculates the fret for
402 a note based on the string to which the note is assigned.
403 In order to do this, the tuning of the strings must be
404 specified. The tuning of the strings is given in the
405 @code{stringTunings} property.
407 LilyPond comes with predefined string tunings for banjo, mandolin,
408 guitar, bass guitar and ukulele. LilyPond automatically sets
409 the correct transposition for predefined tunings. The following
410 example is for bass guitar, which sounds an octave lower than
413 @lilypond[quote,ragged-right,verbatim]
422 \set TabStaff.stringTunings = #bass-tuning
430 The default string tuning is @code{guitar-tuning}, which
431 is the standard EADGBE tuning. Some other predefined tunings are
432 @code{guitar-open-g-tuning}, @code{mandolin-tuning} and
433 @code{banjo-open-g-tuning}. The predefined string tunings
434 are found in @code{scm/tablature.scm}.
436 A string tuning is a Scheme list of string pitches,
437 one for each string, ordered by string number from 1 to N,
438 where string 1 is at the top of the tablature staff and
439 string N is at the bottom. This ordinarily results in ordering
440 from highest pitch to lowest pitch, but some instruments
441 (e.g. ukulele) do not have strings ordered by pitch.
443 A string pitch in a string tuning list is the pitch difference
444 of the open string from middle C measured in semitones. The
445 string pitch must be an integer. LilyPond calculates the actual
446 pitch of the string by adding the string tuning pitch to the
447 actual pitch for middle C.
449 LilyPond automatically calculates the number of strings in the
450 @code{TabStaff} as the number of elements in @code{stringTunings}.
452 Any desired string tuning can be created. For example, we can
453 define a string tuning for a four-string instrument with pitches
454 of @code{a''}, @code{d''}, @code{g'}, and @code{c'}:
457 @lilypond[quote,verbatim]
469 \set TabStaff.stringTunings = #'(21 14 7 0)
478 @file{scm/@/tablature@/.scm}.
481 @rlsr{Fretted strings}.
484 @rinternals{Tab_note_heads_engraver}.
487 Automatic tablature calculations do not work properly in most
488 cases for instruments where string pitches do not vary
489 monotonically with string number, such as ukuleles.
491 @node Fret diagram markups
492 @unnumberedsubsubsec Fret diagram markups
494 @cindex fret diagrams
495 @cindex chord diagrams
496 @cindex diagrams, fret
497 @cindex diagrams, chord for fretted instruments
498 @cindex fret diagrams, custom
499 @cindex custom fret diagrams
501 Fret diagrams can be added to music as a markup to the desired
502 note. The markup contains information about the desired fret
503 diagram. There are three different fret-diagram markup
504 interfaces: standard, terse, and verbose. The three interfaces
505 produce equivalent markups, but have varying amounts of
506 information in the markup string. Details about the markup
507 interfaces are found at @ref{Text markup commands}.
509 The standard fret diagram markup string indicates the string
510 number and the fret number for each dot to be placed on the string.
511 In addition, open and unplayed (muted) strings can be indicated.
513 @lilypond[quote, verbatim]
515 \context ChordNames {
522 < c e g c' e' > 1 ^\markup
523 \fret-diagram #"6-x;5-3;4-2;3-o;2-1;1-o;"
524 < d a d' f'> ^\markup
525 \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-1;"
530 @cindex barre indications
532 Barre indications can be added to the diagram from
533 the fret-diagram markup string.
535 @lilypond[quote, verbatim]
537 \context ChordNames {
544 < f, c f a c' f'>1 ^\markup
545 \fret-diagram #"c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
546 < g, d g b d' g'> ^\markup
547 \fret-diagram #"c:6-1-3;6-3;5-5;4-5;3-4;2-3;1-3;"
552 @cindex fret-diagram markup
554 @funindex fret-diagram
555 @funindex \fret-diagram
557 The size of the fret diagram, and the number of frets in the diagram
558 can be changed in the fret-diagram markup string.
560 @lilypond[quote, verbatim]
562 \context ChordNames {
569 < f, c f a c' f'>1 ^\markup
570 \fret-diagram #"s:1.5;c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
571 < g, b, d g b g'> ^\markup
572 \fret-diagram #"h:6;6-3;5-2;4-o;3-o;2-o;1-3;"
577 The number of strings in a fret diagram can be changed to accomodate
578 different instruments such as banjos and ukeleles with the fret-diagram
581 @lilypond[quote, verbatim]
583 \context ChordNames {
589 %% A chord for ukelele
590 a'1 ^\markup \fret-diagram #"w:4;4-2-2;3-1-1;2-o;1-o;"
595 Fingering indications can be added, and the location of fingering labels
596 can be controlled by the fret-diagram markup string.
598 @lilypond[quote, verbatim]
600 \context ChordNames {
607 < c e g c' e' > 1 ^\markup
608 \fret-diagram #"f:1;6-x;5-3-3;4-2-2;3-o;2-1-1;1-o;"
609 < d a d' f'> ^\markup
610 \fret-diagram #"f:2;6-x;5-x;4-o;3-2-2;2-3-3;1-1-1;"
615 Dot radius and dot position can be controlled with the fret-diagram
618 @lilypond[quote, verbatim]
620 \context ChordNames {
627 < c e g c' e' > 1 ^\markup
628 \fret-diagram #"d:0.35;6-x;5-3;4-2;3-o;2-1;1-o;"
629 < d a d' f'> ^\markup
630 \fret-diagram #"p:0.2;6-x;5-x;4-o;3-2;2-3;1-1;"
635 @cindex fret-diagram-terse markup
637 @funindex fret-diagram-terse
638 @funindex \fret-diagram-terse
640 The fret-diagram-terse markup string omits string numbers; the string
641 number is implied by the presence of semicolons. There is one semicolon
642 for each string in the diagram. The first semicolon corresponds to the
643 highest string number and the last semicolon corresponds to the first string.
644 Mute strings, open strings, and fret numbers can be indicated.
646 @lilypond[quote, verbatim]
648 \context ChordNames {
655 < c e g c' e' > 1 ^\markup
656 \fret-diagram-terse #"x;3;2;o;1;o;"
657 < d a d' f'> ^\markup
658 \fret-diagram-terse #"x;x;o;2;3;1;"
663 Barre indicators can be included in the fret-diagram-terse markup string.
665 @lilypond[quote, verbatim]
667 \context ChordNames {
674 < f, c f a c' f'>1 ^\markup
675 \fret-diagram-terse #"1-(;3;3;2;1;1-);"
676 < g, d g b d' g'> ^\markup
677 \fret-diagram-terse #"3-(;5;5;4;3;3-);"
682 Fingering indications can be included in the fret-diagram-terse markup string.
684 @c Need to use override to enable fingerings to show this -- can we do so?
685 @lilypond[quote, verbatim]
687 \context ChordNames {
693 \override Voice.TextScript
694 #'(fret-diagram-details finger-code) = #'below-string
696 < c e g c' e' > 1 ^\markup
697 \fret-diagram-terse #"x;3-3;2-2;o;1-1;o;"
698 < d a d' f'> ^\markup
699 \fret-diagram-terse #"x;x;o;2-2;3-3;1-1;"
704 Other fret diagram properties must be adjusted using @code{\override} when using
705 the fret-diagram-terse markup.
707 @cindex fret-diagram-verbose markup
709 @funindex fret-diagram-verbose
710 @funindex \fret-diagram-verbose
712 The fret-diagram-verbose markup string is in the format of a Scheme list. Each
713 element of the list indicates an item to be placed on the fret diagram.
715 @lilypond[quote, verbatim]
716 << \context ChordNames {
723 < c e g c' e' > 1 ^\markup
724 \fret-diagram-verbose #'(
732 < d a d' f'> ^\markup
733 \fret-diagram-verbose #'(
745 Fingering indications and barres can be included in a
746 fret-diagram-verbose markup string. Unique to the
747 fret-diagram-verbose interface is a capo indication that
748 can be placed on the fret diagram. The capo indication is
749 a thick bar that covers all strings. The fret with the
750 capo will be the lowest fret in the fret diagram.
752 @c \override is necessary to make fingering visible
753 @lilypond[quote, verbatim]
755 \context ChordNames {
762 \override Voice.TextScript
763 #'(fret-diagram-details finger-code) = #'below-string
765 < f, c f a c' f'>1 ^\markup
766 \fret-diagram-verbose #'(
775 < g, b, d g b g'> ^\markup
776 \fret-diagram-verbose #'(
784 < c e g c' e'> ^\markup
785 \fret-diagram-verbose #'(
796 All other fret diagram properties must be adjusted using @code{\override}
797 when using the fret-diagram-verbose markup.
800 The following example shows the three fret-diagram markup
801 interfaces, along with examples of common tweaks. For example,
802 the size of the verbose fret diagram is reduced to 0.75, and the
803 finger indications are specified to appear below the diagram. The
804 terse diagram includes tweaks to specify placement of finger code
807 @lilypond[verbatim,ragged-right,quote]
810 d^\markup \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
812 fis^\markup \override #'(size . 0.75) {
813 \override #'(finger-code . below-string) {
814 \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
823 c^\markup \override #'(dot-radius . 0.35) {
824 \override #'(finger-code . in-dot) {
825 \override #'(dot-color . white) {
826 \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
835 @cindex customized fret diagram
836 @cindex fret diagram, customized
837 @cindex diagram, fret, customized
839 @funindex fret-diagram-interface
841 The graphical layout of a fret diagram can be customized according to
842 user preference through the properties of the @code{fret-diagram-interface}.
843 Details are found at @rinternals{fret-diagram-interface}. For a fret diagram
844 markup, the interface properties belong to @code{Voice.TextScript}.
848 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
849 {customizing-markup-fret-diagrams.ly}
854 @ref{Text markup commands}.
857 @rlsr{Fretted strings}.
860 @rinternals{fret-diagram-interface}.
863 @node Predefined fret diagrams
864 @unnumberedsubsubsec Predefined fret diagrams
867 @cindex fret diagrams
868 @cindex chord diagrams
871 @funindex stringTunings
873 Fret diagrams can be displayed using the @code{FretBoards} context. By
874 default, the @code{FretBoards} context will display fret diagrams that
875 are stored in a lookup table:
877 @lilypond[verbatim, ragged-right, quote]
878 \include "predefined-guitar-fretboards.ly"
879 \context FretBoards {
886 The default predefined fret diagrams are contained in the file
887 @code{predefined-guitar-fretboards.ly}. Fret diagrams are
888 stored based on the pitches of a chord and the value of
889 @code{stringTunings} that is currently in use.
890 @code{predefined-guitar-fretboards.ly} contains predefined
891 fret diagrams only for @code{guitar-tuning}. Predefined fret
892 diagrams can be added for other instruments or other tunings
893 by following the examples found in
894 @code{predefined-guitar-fretboards.ly}.
896 Fret diagrams for the ukulele are contained in the file
897 @code{predefined-ukulele-fretboards.ly}.
899 @lilypond[verbatim, ragget-right, quote]
900 \include "predefined-ukulele-fretboards.ly"
902 myChords = \chordmode { a1 a:m a:aug }
909 \set stringTunings = #ukulele-tuning
914 Chord pitches can be entered
915 either as simultaneous music or using chord mode (see
916 @ref{Chord mode overview}).
918 @lilypond[verbatim, ragged-right,quote]
919 \include "predefined-guitar-fretboards.ly"
920 \context FretBoards {
926 @cindex chord names with fret diagrams
927 @cindex fret diagrams with chord names
933 It is common that both chord names and fret diagrams are displayed together.
934 This is achieved by putting a @code{ChordNames} context in parallel with
935 a @code{FretBoards} context and giving both contexts the same music.
937 @lilypond[verbatim, ragged-right, quote]
938 \include "predefined-guitar-fretboards.ly"
939 mychords = \chordmode{
944 \context ChordNames {
947 \context FretBoards {
953 @cindex transposing fret diagrams
954 @cindex fret diagrams, transposing
955 @cindex diagrams, fret, transposing
957 Predefined fret diagrams are transposable, as long as a diagram for the
958 transposed chord is stored in the fret diagram table.
960 @lilypond[verbatim, ragged-right, quote]
961 \include "predefined-guitar-fretboards.ly"
962 mychords = \chordmode{
968 \transpose c e { \mychords}
971 \context ChordNames {
974 \context FretBoards {
981 The predefined fret diagram table for guitar contains eight chords (major, minor,
982 augmented, diminished, dominant seventh, major seventh, minor seventh, dominant ninth)
984 The predefined fret diagram table for ukulele contains these chords
985 plus an additional three chords (major sixth, suspended second, and
987 A complete list of the predefined fret diagrams is
988 shown in @ref{Predefined fretboard diagrams}. If there is no entry in
989 the table for a chord, the FretBoards engraver will calculate a
990 fret-diagram using the automatic fret diagram functionality described in
991 @ref{Automatic fret diagrams}.
993 @lilypond[verbatim, ragged-right, quote]
994 \include "predefined-guitar-fretboards.ly"
995 mychords = \chordmode{
1000 \context ChordNames {
1003 \context FretBoards {
1009 @cindex fret diagrams, adding custom
1010 @cindex custom fret diagrams, adding
1011 @cindex adding custom fret diagrams
1013 Fret diagrams can be added to the fret diagram table. To add a diagram,
1014 you must specify the chord for the diagram, the tuning to be used, and
1015 a definition for the diagram. The diagram definition can be either a
1016 fret-diagram-terse definition string or a fret-diagram-verbose
1019 @lilypond[verbatim, ragged-right, quote]
1020 \include "predefined-guitar-fretboards.ly"
1022 \storePredefinedDiagram \chordmode {c:maj9}
1026 mychords = \chordmode{
1031 \context ChordNames {
1034 \context FretBoards {
1040 Different fret diagrams for the same chord name can be stored using different
1041 octaves of pitches. The different octave should be at least two octaves
1042 above or below the default octave, because the octaves above and below the
1043 default octave are used for transposing fretboards.
1045 @lilypond[verbatim, ragged-right, quote]
1046 \include "predefined-guitar-fretboards.ly"
1048 \storePredefinedDiagram \chordmode {c''}
1050 #(offset-fret 2 (chord-shape 'bes guitar-tuning))
1052 mychords = \chordmode{
1057 \context ChordNames {
1060 \context FretBoards {
1066 @cindex fretted instruments, chord shapes
1067 @cindex chord shapes for fretted instruments
1069 @funindex \addChordShape
1070 @funindex add ChordShape
1071 @funindex storePredefinedDiagram
1072 @funindex \storePredefinedDiagram
1074 In addition to fret diagrams, LilyPond stores an internal list of chord
1075 shapes. The chord shapes are fret diagrams that can be shifted along
1076 the neck to different posistions to provide different chords. Chord
1077 shapes can be added to the internal list and then used to define
1078 predefined fret diagrams. Because they can be moved to various
1079 positions on the neck, chord shapes will normally not contain
1080 any open strings. Like fret diagrams, chord shapes can be
1081 entered as either fret-diagram-terse strings or fret-diagram-verbose
1084 @lilypond[verbatim, ragged-right, quote]
1085 \include "predefined-guitar-fretboards.ly"
1087 % add a new chord shape
1089 \addChordShape #'powerf #guitar-tuning #"1-1;3-3;3-4;x;x;x;"
1091 % add some new chords based on the power chord shape
1093 \storePredefinedDiagram \chordmode {f''}
1095 #(chord-shape 'powerf guitar-tuning)
1096 \storePredefinedDiagram \chordmode {g''}
1098 #(offset-fret 2 (chord-shape 'powerf guitar-tuning))
1100 mychords = \chordmode{
1105 \context ChordNames {
1108 \context FretBoards {
1114 The graphical layout of a fret diagram can be customized according to
1115 user preference through the properties of the @code{fret-diagram-interface}.
1116 Details are found at @rinternals{fret-diagram-interface}. For a
1117 predefined fret diagram, the interface properties belong to
1118 @code{FretBoards.FretBoard}.
1122 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1123 {customizing-fretboard-fret-diagrams.ly}
1125 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1126 {defining-predefined-fretboards-for-other-instruments.ly}
1128 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1129 {chordchanges-for-fretboards.ly}
1134 @ref{Custom tablatures},
1135 @ref{Automatic fret diagrams},
1136 @ref{Chord mode overview},
1137 @ref{Predefined fretboard diagrams}.
1140 @file{ly/@/predefined@/-guitar@/-fretboards@/.ly},
1141 @file{ly/@/predefined@/-guitar@/-ninth@/-fretboards@/.ly}.
1144 @rlsr{Fretted strings}.
1146 Internals Reference:
1147 @rinternals {fret-diagram-interface}.
1150 @node Automatic fret diagrams
1151 @unnumberedsubsubsec Automatic fret diagrams
1153 @cindex fret diagrams, automatic
1154 @cindex chord diagrams, automatic
1155 @cindex automatic fret diagrams
1156 @cindex automatic chord diagrams
1158 Fret diagrams can be automatically created from entered notes using the
1159 @code{FretBoards} context. If no predefined diagram is available for
1160 the entered notes in the active @code{stringTunings}, this context
1161 calculates strings and frets that can be used to play the notes.
1163 @lilypond[quote,ragged-right,verbatim]
1165 \context ChordNames {
1170 \context FretBoards {
1182 @funindex predefinedFretboardsOff
1183 @funindex \predefinedFretboardsOff
1184 @funindex predefinedFretboardsOn
1185 @funindex \predefinedFretboardsOn
1187 As no predefined diagrams are loaded by default, automatic calculation
1188 of fret diagrams is the default behavior. Once default diagrams are
1189 loaded, automatic calculation can be enabled and disabled with predefined
1192 @lilypond[quote,ragged-right,verbatim]
1194 \storePredefinedDiagram <c e g c' e'>
1196 #"x;3-1-(;5-2;5-3;5-4;3-1-1);"
1198 \context ChordNames {
1203 \context FretBoards {
1205 \predefinedFretboardsOff
1207 \predefinedFretboardsOn
1221 Sometimes the fretboard calculator will be unable to find
1222 an acceptable diagram. This can often be remedied by
1223 manually assigning a note to a string. In many cases, only one
1224 note need be manually placed on a string; the rest of
1225 the notes will then be placed appropriately by the @code{FretBoards}
1228 @cindex fret diagrams, adding fingerings
1229 @cindex fingerings, adding to fret diagrams
1231 Fingerings can be added to FretBoard fret diagrams.
1233 @lilypond[quote, verbatim]
1235 \context ChordNames {
1240 \context FretBoards {
1241 < c-3 e-2 g c'-1 e' > 1
1252 The minimum fret to be used in calculating strings and frets for
1253 the FretBoard context can be set with the @code{minimumFret}
1256 @lilypond[quote, verbatim]
1258 \context ChordNames {
1263 \context FretBoards {
1265 \set FretBoards.minimumFret = #5
1276 The strings and frets for the @code{FretBoards} context depend
1277 on the @code{stringTunings} property, which has the same meaning
1278 as in the TabStaff context. See @ref{Custom tablatures} for
1279 information on the @code{stringTunings} property.
1281 The graphical layout of a fret diagram can be customized according to
1282 user preference through the properties of the @code{fret-diagram-interface}.
1283 Details are found at @rinternals{fret-diagram-interface}. For a
1284 @code{FretBoards} fret diagram, the interface properties belong to
1285 @code{FretBoards.FretBoard}.
1289 @code{\predefinedFretboardsOff},
1290 @code{\predefinedFretboardsOn}.
1296 @ref{Custom tablatures}.
1299 @rlsr{Fretted strings}.
1301 Internals Reference:
1302 @rinternals {fret-diagram-interface}.
1305 Automatic fretboard calculations do not work properly for instruments
1306 with non-monotonic tunings.
1309 @node Right-hand fingerings
1310 @unnumberedsubsubsec Right-hand fingerings
1312 @cindex fretted instruments, right hand fingerings
1313 @cindex fingerings, right hand for fretted instruments
1314 @cindex right hand fingerings for fretted instruments
1316 @funindex rightHandFinger
1317 @funindex \rightHandFinger
1319 Right-hand fingerings @var{p-i-m-a} must be entered within a
1320 chord construct @code{<>} for them to be printed in the score,
1321 even when applied to a single note.
1323 @warning{There @strong{must} be a hyphen after the note and a space
1324 before the closing @code{>}.}
1326 @lilypond[quote,verbatim,relative=0]
1328 <c-\rightHandFinger #1 >4
1329 <e-\rightHandFinger #2 >
1330 <g-\rightHandFinger #3 >
1331 <c-\rightHandFinger #4 >
1332 <c,-\rightHandFinger #1 e-\rightHandFinger #2
1333 g-\rightHandFinger #3 c-\rightHandFinger #4 >1
1336 For convenience, you can abbreviate @code{\rightHandFinger} to something
1337 short, for example @code{RH},
1340 #(define RH rightHandFinger)
1346 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1347 {placement-of-right-hand-fingerings.ly}
1349 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1350 {fingerings,-string-indications,-and-right-hand-fingerings.ly}
1355 @rlsr{Fretted strings}.
1357 Internals Reference:
1358 @rinternals{StrokeFinger}.
1364 Most of the notational issues associated with guitar music are
1365 covered sufficiently in the general fretted strings section, but there
1366 are a few more worth covering here. Occasionally users want to
1367 create songbook-type documents having only lyrics with chord
1368 indications above them. Since LilyPond is a music typesetter,
1369 it is not recommended for documents that have no music notation
1370 in them. A better alternative is a word processor, text editor,
1371 or, for experienced users, a typesetter like GuitarTeX.
1374 * Indicating position and barring::
1375 * Indicating harmonics and dampened notes::
1378 @node Indicating position and barring
1379 @unnumberedsubsubsec Indicating position and barring
1381 @cindex indicating position and barring for fretted instruments
1382 @cindex fretted instruments, indicating position and barring
1384 This example demonstrates how to include guitar position and
1385 barring indications.
1387 @lilypond[quote,ragged-right,fragment,verbatim,relative=0]
1391 \override TextSpanner #'(bound-details left text) = #"XII "
1393 b16 e g e b g\stopTextSpan
1400 @ref{Text spanners}.
1403 @rlsr{Fretted strings},
1404 @rlsr{Expressive marks}.
1407 @node Indicating harmonics and dampened notes
1408 @unnumberedsubsubsec Indicating harmonics and dampened notes
1410 @cindex fretted instruments, dampened notes
1411 @cindex fretted instruments, harmonics
1412 @cindex dampened notes on fretted instruments
1413 @cindex harmonics on fretted instruments
1415 Special note heads can be used to indicate dampened notes or
1416 harmonics. Harmonics are normally further explained with a
1419 @lilypond[quote,ragged-right,verbatim]
1422 \override Staff.NoteHead #'style = #'cross
1424 \override Staff.NoteHead #'style = #'harmonic-mixed
1425 d^\markup { \italic { \fontsize #-2 { "harm. 12" }}} <g b>1
1432 @rlsr{Fretted strings}.
1435 @ref{Special note heads},
1436 @ref{Note head styles}.
1443 * Banjo tablatures::
1446 @node Banjo tablatures
1447 @unnumberedsubsubsec Banjo tablatures
1449 @cindex banjo tablatures
1450 @cindex tablature, banjo
1452 LilyPond has basic support for the five-string banjo. When making tablatures
1453 for five-string banjo, use the banjo tablature format function to get
1454 correct fret numbers for the fifth string:
1456 @c due to crazy intervals of banjo music, absolute pitch is recommended
1458 @lilypond[quote,ragged-right,fragment,verbatim]
1460 \set TabStaff.tablatureFormat = #fret-number-tablature-format-banjo
1461 \set TabStaff.stringTunings = #banjo-open-g-tuning
1464 g8 d' g'\5 a b g e d' |
1465 g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
1471 @cindex banjo tunings
1472 @cindex tunings, banjo
1474 @funindex banjo-c-tuning
1475 @funindex banjo-modal-tuning
1476 @funindex banjo-open-d-tuning
1477 @funindex banjo-open-dm-tuning
1478 @funindex four-string-banjo
1480 A number of common tunings for banjo are predefined in LilyPond:
1481 @code{banjo-c-tuning} (gCGBD), @code{banjo-modal-tuning} (gDGCD),
1482 @code{banjo-open-d-tuning} (aDF#AD) and @code{banjo-open-dm-tuning}
1485 These tunings may be converted to four-string banjo tunings using the
1486 @code{four-string-banjo} function:
1489 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
1495 @rlsr{Fretted strings}.
1498 @file{scm/@/output@/-lib@/.scm} contains predefined banjo tunings.