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. For details, see the Contributors'
7 Guide, node Updating translation committishes..
12 @node Fretted string instruments
13 @section Fretted string instruments
15 @lilypondfile[quote]{fretted-headword.ly}
17 This section discusses several aspects of music notation that are unique
18 to fretted string instruments.
21 @cindex tablature, guitar
22 @cindex tablature, banjo
23 @cindex guitar tablature
24 @cindex banjo tablature
27 * Common notation for fretted strings::
32 @node Common notation for fretted strings
33 @subsection Common notation for fretted strings
35 This section discusses common notation that is unique
36 to fretted string instruments.
39 * References for fretted strings::
40 * String number indications::
41 * Default tablatures::
43 * Fret diagram markups::
44 * Predefined fret diagrams::
45 * Automatic fret diagrams::
46 * Right-hand fingerings::
49 @node References for fretted strings
50 @unnumberedsubsubsec References for fretted strings
52 Music for fretted string instruments is normally notated on
53 a single staff, either in traditional music notation or in
54 tablature. Sometimes the two types are combined, and it is
55 especially common in popular music to use chord diagrams above
56 a staff of traditional notation. The guitar and the banjo are
57 transposing instruments, sounding an octave lower than written.
58 Scores for these instruments should use the @code{"treble_8"} clef.
59 Some other elements pertinent to fretted string instruments
60 are covered elsewhere:
63 @item Fingerings are indicated as shown in @ref{Fingering instructions}.
65 @item Instructions for @notation{Laissez vibrer} ties
66 as well as ties on arpeggios and tremolos can be found in
69 @item Instructions for handling multiple voices can be found
70 in @ref{Collision resolution}.
72 @item Instructions for indicating harmonics can be found in
80 @ref{Fingering instructions},
82 @ref{Collision resolution},
83 @ref{Instrument names},
84 @ref{Writing music in parallel},
86 @ref{List of articulations},
90 @node String number indications
91 @unnumberedsubsubsec String number indications
93 @cindex string numbers
94 @cindex string vs. fingering numbers
95 @cindex fingering vs. string numbers
97 The string on which a note should be played may be indicated by
98 appending @code{\@var{number}} to a note inside a chord construct
101 @warning{String numbers @strong{must} be defined inside a chord
102 construct even if there is only a single note.}
104 @lilypond[verbatim,quote,relative=0]
110 When fingerings and string indications are used together, their
111 placement is controlled by the order in which the two items appear
114 @lilypond[verbatim,quote,relative=1]
122 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
123 {controlling-the-placement-of-chord-fingerings.ly}
125 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
126 {allowing-fingerings-to-be-printed-inside-the-staff.ly}
131 @ref{Fingering instructions}.
134 @rlsr{Fretted strings}.
137 @rinternals{StringNumber},
138 @rinternals{Fingering}.
141 @node Default tablatures
142 @unnumberedsubsubsec Default tablatures
144 @cindex tablatures, basic
145 @cindex tablatures, default
150 Music for plucked string instruments is frequently notated using a
151 finger/touch notation or tablature. In contrast to traditional
152 notation pitches are not denoted with note heads, but by numbers (or
153 letterlike symbols in historical intavolatura). The numbers
154 indicate on which string and fret a note must be played. The numbers
155 are printed on top of each other if they are to be played
159 By default, string 1 is the highest,
160 and the tuning defaults to the standard guitar tuning (with 6 strings).
161 The notes are printed as tablature, by using @code{TabStaff} and
162 @code{TabVoice} contexts
164 @lilypond[quote,ragged-right,fragment,verbatim]
165 \new TabStaff \relative c' {
171 Default tablatures do not contain any symbols for tone duration nor any
172 other musical symbols such as e.g. expressive marks.
174 @lilypond[quote,ragged-right,verbatim]
180 c8_.\<\( c16 c ~ c2\!
186 \new Staff { \clef "G_8" \symbols }
187 \new TabStaff { \symbols }
192 @funindex \tabFullNotation
194 If all musical symbols used in traditional notation should also show up
195 in tablature one has to apply the command @code{\tabFullNotation} in a
196 @code{TabStaff}-context. Please bear in mind that half notes are
197 double-stemmed in tablature in order to distinguish them from quarter
200 @lilypond[quote,ragged-right,verbatim]
206 c8_.\<\( c16 c ~ c2\!
218 @funindex minimumFret
222 By default pitches are assigned to the lowest playing position on the
223 fret-board (first position). Open strings are automatically preferred.
224 If you would like a certain pitch to be played on a specific string
225 you can add a string number indication to the pitch name. If you
226 define pitch names and string numbers without a chord construct
227 (@code{<>}) the string number indications do not appear in traditional
228 notation. It is much more comfortable to define the playing position
229 by using the value of @code{minimumFret}. The default value for
233 @lilypond[quote,ragged-right,verbatim]
235 \new Staff \relative c {
239 c,16\5 d\5 e\4 f\4 g4\4
242 \new TabStaff \relative c {
244 c,16\5 d\5 e\4 f\4 g4\4
245 \set TabStaff.minimumFret = #5
252 Ties over a line break are parenthesized by default. The same holds for
253 the second alternative of a repeat.
255 @lilypond[quote,ragged-right,verbatim]
256 ties = \relative c' {
262 { g4\repeatTie c,2. }
287 @funindex \hideSplitTiedTabNotes
289 The command @code{\hideSplitTiedTabNotes} cancels the behavior of
290 engraving fret numbers in parentheses:
292 @lilypond[quote,ragged-right,verbatim]
293 ties = \relative c' {
299 { g4\repeatTie c,2. }
313 \hideSplitTiedTabNotes
325 @cindex harmonic indications in tablature notation
326 @cindex tablature and harmonic indications
327 @cindex slides in tablature notation
328 @cindex tablature and slides
330 Harmonic indications and slides can be added to tablature
333 @lilypond[verbatim, quote, relative=1]
336 <c g'\harmonic> d\2\glissando e\2
344 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
345 {stem-and-beam-behavior-in-tablature.ly}
347 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
348 {polyphony-in-tablature.ly}
356 @rlsr{Fretted strings}.
359 @rinternals{TabNoteHead},
360 @rinternals{TabStaff},
361 @rinternals{TabVoice},
367 Chords are not handled in a special way, and hence the automatic
368 string selector may easily select the same string for two notes in
371 In order to handle @code{\partcombine}, a @code{TabStaff} must use
372 specially-created voices:
374 @lilypond[quote,ragged-right,verbatim]
375 melodia = \partcombine { e4 g g g }{ e4 e e e }
378 \new TabVoice = "one" s1
379 \new TabVoice = "two" s1
380 \new TabVoice = "shared" s1
381 \new TabVoice = "solo" s1
387 Guitar special effects are limited to harmonics and slides.
389 @node Custom tablatures
390 @unnumberedsubsubsec Custom tablatures
392 @cindex tablatures, custom
393 @cindex tablature, banjo
394 @cindex tablature, mandolin
395 @cindex tablature, bass guitar
396 @cindex tablature, predefined string tunings
397 @cindex fretted instruments, predefined string tunings
398 @cindex predefined string tunings for fretted instruments
400 @funindex StringTunings
402 LilyPond tabulature automatically calculates the fret for
403 a note based on the string to which the note is assigned.
404 In order to do this, the tuning of the strings must be
405 specified. The tuning of the strings is given in the
406 @code{stringTunings} property.
408 LilyPond comes with predefined string tunings for banjo, mandolin,
409 guitar, bass guitar and ukulele. LilyPond automatically sets
410 the correct transposition for predefined tunings. The following
411 example is for bass guitar, which sounds an octave lower than
414 @lilypond[quote,ragged-right,verbatim]
423 \set TabStaff.stringTunings = #bass-tuning
431 The default string tuning is @code{guitar-tuning}, which
432 is the standard EADGBE tuning. Some other predefined tunings are
433 @code{guitar-open-g-tuning}, @code{mandolin-tuning} and
434 @code{banjo-open-g-tuning}. The predefined string tunings
435 are found in @code{scm/tablature.scm}.
437 A string tuning is a Scheme list of string pitches,
438 one for each string, ordered by string number from 1 to N,
439 where string 1 is at the top of the tablature staff and
440 string N is at the bottom. This ordinarily results in ordering
441 from highest pitch to lowest pitch, but some instruments
442 (e.g. ukulele) do not have strings ordered by pitch.
444 A string pitch in a string tuning list is the pitch difference
445 of the open string from middle C measured in semitones. The
446 string pitch must be an integer. LilyPond calculates the actual
447 pitch of the string by adding the string tuning pitch to the
448 actual pitch for middle C.
450 LilyPond automatically calculates the number of strings in the
451 @code{TabStaff} as the number of elements in @code{stringTunings}.
453 Any desired string tuning can be created. For example, we can
454 define a string tuning for a four-string instrument with pitches
455 of @code{a''}, @code{d''}, @code{g'}, and @code{c'}:
458 @lilypond[quote,verbatim]
470 \set TabStaff.stringTunings = #'(21 14 7 0)
479 @file{scm/@/tablature@/.scm}.
482 @rlsr{Fretted strings}.
485 @rinternals{Tab_note_heads_engraver}.
488 Automatic tablature calculations do not work properly in most
489 cases for instruments where string pitches do not vary
490 monotonically with string number, such as ukuleles.
492 @node Fret diagram markups
493 @unnumberedsubsubsec Fret diagram markups
495 @cindex fret diagrams
496 @cindex chord diagrams
497 @cindex diagrams, fret
498 @cindex diagrams, chord for fretted instruments
499 @cindex fret diagrams, custom
500 @cindex custom fret diagrams
502 Fret diagrams can be added to music as a markup to the desired
503 note. The markup contains information about the desired fret
504 diagram. There are three different fret-diagram markup
505 interfaces: standard, terse, and verbose. The three interfaces
506 produce equivalent markups, but have varying amounts of
507 information in the markup string. Details about the markup
508 interfaces are found at @ref{Text markup commands}.
510 The standard fret diagram markup string indicates the string
511 number and the fret number for each dot to be placed on the string.
512 In addition, open and unplayed (muted) strings can be indicated.
514 @lilypond[quote, verbatim]
516 \context ChordNames {
523 < c e g c' e' > 1 ^\markup
524 \fret-diagram #"6-x;5-3;4-2;3-o;2-1;1-o;"
525 < d a d' f'> ^\markup
526 \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-1;"
531 @cindex barre indications
533 Barre indications can be added to the diagram from
534 the fret-diagram markup string.
536 @lilypond[quote, verbatim]
538 \context ChordNames {
545 < f, c f a c' f'>1 ^\markup
546 \fret-diagram #"c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
547 < g, d g b d' g'> ^\markup
548 \fret-diagram #"c:6-1-3;6-3;5-5;4-5;3-4;2-3;1-3;"
553 @cindex fret-diagram markup
555 @funindex fret-diagram
556 @funindex \fret-diagram
558 The size of the fret diagram, and the number of frets in the diagram
559 can be changed in the fret-diagram markup string.
561 @lilypond[quote, verbatim]
563 \context ChordNames {
570 < f, c f a c' f'>1 ^\markup
571 \fret-diagram #"s:1.5;c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
572 < g, b, d g b g'> ^\markup
573 \fret-diagram #"h:6;6-3;5-2;4-o;3-o;2-o;1-3;"
578 The number of strings in a fret diagram can be changed to accomodate
579 different instruments such as banjos and ukuleles with the fret-diagram
582 @lilypond[quote, verbatim]
584 \context ChordNames {
590 %% An A chord for ukulele
591 a'1 ^\markup \fret-diagram #"w:4;4-2-2;3-1-1;2-o;1-o;"
596 Fingering indications can be added, and the location of fingering labels
597 can be controlled by the fret-diagram markup string.
599 @lilypond[quote, verbatim]
601 \context ChordNames {
608 < c e g c' e' > 1 ^\markup
609 \fret-diagram #"f:1;6-x;5-3-3;4-2-2;3-o;2-1-1;1-o;"
610 < d a d' f'> ^\markup
611 \fret-diagram #"f:2;6-x;5-x;4-o;3-2-2;2-3-3;1-1-1;"
616 Dot radius and dot position can be controlled with the fret-diagram
619 @lilypond[quote, verbatim]
621 \context ChordNames {
628 < c e g c' e' > 1 ^\markup
629 \fret-diagram #"d:0.35;6-x;5-3;4-2;3-o;2-1;1-o;"
630 < d a d' f'> ^\markup
631 \fret-diagram #"p:0.2;6-x;5-x;4-o;3-2;2-3;1-1;"
636 @cindex fret-diagram-terse markup
638 @funindex fret-diagram-terse
639 @funindex \fret-diagram-terse
641 The fret-diagram-terse markup string omits string numbers; the string
642 number is implied by the presence of semicolons. There is one semicolon
643 for each string in the diagram. The first semicolon corresponds to the
644 highest string number and the last semicolon corresponds to the first string.
645 Mute strings, open strings, and fret numbers can be indicated.
647 @lilypond[quote, verbatim]
649 \context ChordNames {
656 < c e g c' e' > 1 ^\markup
657 \fret-diagram-terse #"x;3;2;o;1;o;"
658 < d a d' f'> ^\markup
659 \fret-diagram-terse #"x;x;o;2;3;1;"
664 Barre indicators can be included in the fret-diagram-terse markup string.
666 @lilypond[quote, verbatim]
668 \context ChordNames {
675 < f, c f a c' f'>1 ^\markup
676 \fret-diagram-terse #"1-(;3;3;2;1;1-);"
677 < g, d g b d' g'> ^\markup
678 \fret-diagram-terse #"3-(;5;5;4;3;3-);"
683 Fingering indications can be included in the fret-diagram-terse markup string.
685 @c Need to use override to enable fingerings to show this -- can we do so?
686 @lilypond[quote, verbatim]
688 \context ChordNames {
694 \override Voice.TextScript
695 #'(fret-diagram-details finger-code) = #'below-string
697 < c e g c' e' > 1 ^\markup
698 \fret-diagram-terse #"x;3-3;2-2;o;1-1;o;"
699 < d a d' f'> ^\markup
700 \fret-diagram-terse #"x;x;o;2-2;3-3;1-1;"
705 Other fret diagram properties must be adjusted using @code{\override} when using
706 the fret-diagram-terse markup.
708 @cindex fret-diagram-verbose markup
710 @funindex fret-diagram-verbose
711 @funindex \fret-diagram-verbose
713 The fret-diagram-verbose markup string is in the format of a Scheme list. Each
714 element of the list indicates an item to be placed on the fret diagram.
716 @lilypond[quote, verbatim]
717 << \context ChordNames {
724 < c e g c' e' > 1 ^\markup
725 \fret-diagram-verbose #'(
733 < d a d' f'> ^\markup
734 \fret-diagram-verbose #'(
746 Fingering indications and barres can be included in a
747 fret-diagram-verbose markup string. Unique to the
748 fret-diagram-verbose interface is a capo indication that
749 can be placed on the fret diagram. The capo indication is
750 a thick bar that covers all strings. The fret with the
751 capo will be the lowest fret in the fret diagram.
753 @c \override is necessary to make fingering visible
754 @lilypond[quote, verbatim]
756 \context ChordNames {
763 \override Voice.TextScript
764 #'(fret-diagram-details finger-code) = #'below-string
766 < f, c f a c' f'>1 ^\markup
767 \fret-diagram-verbose #'(
776 < g, b, d g b g'> ^\markup
777 \fret-diagram-verbose #'(
785 < c e g c' e'> ^\markup
786 \fret-diagram-verbose #'(
797 All other fret diagram properties must be adjusted using @code{\override}
798 when using the fret-diagram-verbose markup.
801 The following example shows the three fret-diagram markup
802 interfaces, along with examples of common tweaks. For example,
803 the size of the verbose fret diagram is reduced to 0.75, and the
804 finger indications are specified to appear below the diagram. The
805 terse diagram includes tweaks to specify placement of finger code
808 @lilypond[verbatim,ragged-right,quote]
811 d^\markup \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
813 fis^\markup \override #'(size . 0.75) {
814 \override #'(finger-code . below-string) {
815 \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
824 c^\markup \override #'(dot-radius . 0.35) {
825 \override #'(finger-code . in-dot) {
826 \override #'(dot-color . white) {
827 \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
836 @cindex customized fret diagram
837 @cindex fret diagram, customized
838 @cindex diagram, fret, customized
840 @funindex fret-diagram-interface
842 The graphical layout of a fret diagram can be customized according to
843 user preference through the properties of the @code{fret-diagram-interface}.
844 Details are found at @rinternals{fret-diagram-interface}. For a fret diagram
845 markup, the interface properties belong to @code{Voice.TextScript}.
849 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
850 {customizing-markup-fret-diagrams.ly}
855 @ref{Text markup commands}.
858 @rlsr{Fretted strings}.
861 @rinternals{fret-diagram-interface}.
864 @node Predefined fret diagrams
865 @unnumberedsubsubsec Predefined fret diagrams
868 @cindex fret diagrams
869 @cindex chord diagrams
872 @funindex stringTunings
874 Fret diagrams can be displayed using the @code{FretBoards} context. By
875 default, the @code{FretBoards} context will display fret diagrams that
876 are stored in a lookup table:
878 @lilypond[verbatim, ragged-right, quote]
879 \include "predefined-guitar-fretboards.ly"
880 \context FretBoards {
887 The default predefined fret diagrams are contained in the file
888 @code{predefined-guitar-fretboards.ly}. Fret diagrams are
889 stored based on the pitches of a chord and the value of
890 @code{stringTunings} that is currently in use.
891 @code{predefined-guitar-fretboards.ly} contains predefined
892 fret diagrams only for @code{guitar-tuning}. Predefined fret
893 diagrams can be added for other instruments or other tunings
894 by following the examples found in
895 @code{predefined-guitar-fretboards.ly}.
897 Fret diagrams for the ukulele are contained in the file
898 @code{predefined-ukulele-fretboards.ly}.
900 @lilypond[verbatim, ragged-right, quote]
901 \include "predefined-ukulele-fretboards.ly"
903 myChords = \chordmode { a1 a:m a:aug }
910 \set stringTunings = #ukulele-tuning
915 Chord pitches can be entered
916 either as simultaneous music or using chord mode (see
917 @ref{Chord mode overview}).
919 @lilypond[verbatim, ragged-right,quote]
920 \include "predefined-guitar-fretboards.ly"
921 \context FretBoards {
927 @cindex chord names with fret diagrams
928 @cindex fret diagrams with chord names
934 It is common that both chord names and fret diagrams are displayed together.
935 This is achieved by putting a @code{ChordNames} context in parallel with
936 a @code{FretBoards} context and giving both contexts the same music.
938 @lilypond[verbatim, ragged-right, quote]
939 \include "predefined-guitar-fretboards.ly"
940 mychords = \chordmode{
945 \context ChordNames {
948 \context FretBoards {
954 @cindex transposing fret diagrams
955 @cindex fret diagrams, transposing
956 @cindex diagrams, fret, transposing
958 Predefined fret diagrams are transposable, as long as a diagram for the
959 transposed chord is stored in the fret diagram table.
961 @lilypond[verbatim, ragged-right, quote]
962 \include "predefined-guitar-fretboards.ly"
963 mychords = \chordmode{
969 \transpose c e { \mychords}
972 \context ChordNames {
975 \context FretBoards {
982 The predefined fret diagram table for guitar contains eight chords (major, minor,
983 augmented, diminished, dominant seventh, major seventh, minor seventh, dominant ninth)
985 The predefined fret diagram table for ukulele contains these chords
986 plus an additional three chords (major sixth, suspended second, and
988 A complete list of the predefined fret diagrams is
989 shown in @ref{Predefined fretboard diagrams}. If there is no entry in
990 the table for a chord, the FretBoards engraver will calculate a
991 fret-diagram using the automatic fret diagram functionality described in
992 @ref{Automatic fret diagrams}.
994 @lilypond[verbatim, ragged-right, quote]
995 \include "predefined-guitar-fretboards.ly"
996 mychords = \chordmode{
1001 \context ChordNames {
1004 \context FretBoards {
1010 @cindex fret diagrams, adding custom
1011 @cindex custom fret diagrams, adding
1012 @cindex adding custom fret diagrams
1014 Fret diagrams can be added to the fret diagram table. To add a diagram,
1015 you must specify the chord for the diagram, the tuning to be used, and
1016 a definition for the diagram. The diagram definition can be either a
1017 fret-diagram-terse definition string or a fret-diagram-verbose
1020 @lilypond[verbatim, ragged-right, quote]
1021 \include "predefined-guitar-fretboards.ly"
1023 \storePredefinedDiagram \chordmode {c:maj9}
1027 mychords = \chordmode{
1032 \context ChordNames {
1035 \context FretBoards {
1041 Different fret diagrams for the same chord name can be stored using different
1042 octaves of pitches. The different octave should be at least two octaves
1043 above or below the default octave, because the octaves above and below the
1044 default octave are used for transposing fretboards.
1046 @lilypond[verbatim, ragged-right, quote]
1047 \include "predefined-guitar-fretboards.ly"
1049 \storePredefinedDiagram \chordmode {c''}
1051 #(offset-fret 2 (chord-shape 'bes guitar-tuning))
1053 mychords = \chordmode{
1058 \context ChordNames {
1061 \context FretBoards {
1067 @cindex fretted instruments, chord shapes
1068 @cindex chord shapes for fretted instruments
1070 @funindex \addChordShape
1071 @funindex add ChordShape
1072 @funindex storePredefinedDiagram
1073 @funindex \storePredefinedDiagram
1075 In addition to fret diagrams, LilyPond stores an internal list of chord
1076 shapes. The chord shapes are fret diagrams that can be shifted along
1077 the neck to different posistions to provide different chords. Chord
1078 shapes can be added to the internal list and then used to define
1079 predefined fret diagrams. Because they can be moved to various
1080 positions on the neck, chord shapes will normally not contain
1081 any open strings. Like fret diagrams, chord shapes can be
1082 entered as either fret-diagram-terse strings or fret-diagram-verbose
1085 @lilypond[verbatim, ragged-right, quote]
1086 \include "predefined-guitar-fretboards.ly"
1088 % add a new chord shape
1090 \addChordShape #'powerf #guitar-tuning #"1-1;3-3;3-4;x;x;x;"
1092 % add some new chords based on the power chord shape
1094 \storePredefinedDiagram \chordmode {f''}
1096 #(chord-shape 'powerf guitar-tuning)
1097 \storePredefinedDiagram \chordmode {g''}
1099 #(offset-fret 2 (chord-shape 'powerf guitar-tuning))
1101 mychords = \chordmode{
1106 \context ChordNames {
1109 \context FretBoards {
1115 The graphical layout of a fret diagram can be customized according to
1116 user preference through the properties of the @code{fret-diagram-interface}.
1117 Details are found at @rinternals{fret-diagram-interface}. For a
1118 predefined fret diagram, the interface properties belong to
1119 @code{FretBoards.FretBoard}.
1123 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1124 {customizing-fretboard-fret-diagrams.ly}
1126 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1127 {defining-predefined-fretboards-for-other-instruments.ly}
1129 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1130 {chordchanges-for-fretboards.ly}
1135 @ref{Custom tablatures},
1136 @ref{Automatic fret diagrams},
1137 @ref{Chord mode overview},
1138 @ref{Predefined fretboard diagrams}.
1141 @file{ly/@/predefined@/-guitar@/-fretboards@/.ly},
1142 @file{ly/@/predefined@/-guitar@/-ninth@/-fretboards@/.ly}.
1145 @rlsr{Fretted strings}.
1147 Internals Reference:
1148 @rinternals {fret-diagram-interface}.
1151 @node Automatic fret diagrams
1152 @unnumberedsubsubsec Automatic fret diagrams
1154 @cindex fret diagrams, automatic
1155 @cindex chord diagrams, automatic
1156 @cindex automatic fret diagrams
1157 @cindex automatic chord diagrams
1159 Fret diagrams can be automatically created from entered notes using the
1160 @code{FretBoards} context. If no predefined diagram is available for
1161 the entered notes in the active @code{stringTunings}, this context
1162 calculates strings and frets that can be used to play the notes.
1164 @lilypond[quote,ragged-right,verbatim]
1166 \context ChordNames {
1171 \context FretBoards {
1183 @funindex predefinedFretboardsOff
1184 @funindex \predefinedFretboardsOff
1185 @funindex predefinedFretboardsOn
1186 @funindex \predefinedFretboardsOn
1188 As no predefined diagrams are loaded by default, automatic calculation
1189 of fret diagrams is the default behavior. Once default diagrams are
1190 loaded, automatic calculation can be enabled and disabled with predefined
1193 @lilypond[quote,ragged-right,verbatim]
1195 \storePredefinedDiagram <c e g c' e'>
1197 #"x;3-1-(;5-2;5-3;5-4;3-1-1);"
1199 \context ChordNames {
1204 \context FretBoards {
1206 \predefinedFretboardsOff
1208 \predefinedFretboardsOn
1222 Sometimes the fretboard calculator will be unable to find
1223 an acceptable diagram. This can often be remedied by
1224 manually assigning a note to a string. In many cases, only one
1225 note need be manually placed on a string; the rest of
1226 the notes will then be placed appropriately by the @code{FretBoards}
1229 @cindex fret diagrams, adding fingerings
1230 @cindex fingerings, adding to fret diagrams
1232 Fingerings can be added to FretBoard fret diagrams.
1234 @lilypond[quote, verbatim]
1236 \context ChordNames {
1241 \context FretBoards {
1242 < c-3 e-2 g c'-1 e' > 1
1253 The minimum fret to be used in calculating strings and frets for
1254 the FretBoard context can be set with the @code{minimumFret}
1257 @lilypond[quote, verbatim]
1259 \context ChordNames {
1264 \context FretBoards {
1266 \set FretBoards.minimumFret = #5
1277 The strings and frets for the @code{FretBoards} context depend
1278 on the @code{stringTunings} property, which has the same meaning
1279 as in the TabStaff context. See @ref{Custom tablatures} for
1280 information on the @code{stringTunings} property.
1282 The graphical layout of a fret diagram can be customized according to
1283 user preference through the properties of the @code{fret-diagram-interface}.
1284 Details are found at @rinternals{fret-diagram-interface}. For a
1285 @code{FretBoards} fret diagram, the interface properties belong to
1286 @code{FretBoards.FretBoard}.
1290 @code{\predefinedFretboardsOff},
1291 @code{\predefinedFretboardsOn}.
1297 @ref{Custom tablatures}.
1300 @rlsr{Fretted strings}.
1302 Internals Reference:
1303 @rinternals {fret-diagram-interface}.
1306 Automatic fretboard calculations do not work properly for instruments
1307 with non-monotonic tunings.
1310 @node Right-hand fingerings
1311 @unnumberedsubsubsec Right-hand fingerings
1313 @cindex fretted instruments, right hand fingerings
1314 @cindex fingerings, right hand for fretted instruments
1315 @cindex right hand fingerings for fretted instruments
1317 @funindex rightHandFinger
1318 @funindex \rightHandFinger
1320 Right-hand fingerings @var{p-i-m-a} must be entered within a
1321 chord construct @code{<>} for them to be printed in the score,
1322 even when applied to a single note.
1324 @warning{There @strong{must} be a hyphen after the note and a space
1325 before the closing @code{>}.}
1327 @lilypond[quote,verbatim,relative=0]
1329 <c-\rightHandFinger #1 >4
1330 <e-\rightHandFinger #2 >
1331 <g-\rightHandFinger #3 >
1332 <c-\rightHandFinger #4 >
1333 <c,-\rightHandFinger #1 e-\rightHandFinger #2
1334 g-\rightHandFinger #3 c-\rightHandFinger #4 >1
1337 For convenience, you can abbreviate @code{\rightHandFinger} to something
1338 short, for example @code{RH},
1341 #(define RH rightHandFinger)
1347 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1348 {placement-of-right-hand-fingerings.ly}
1350 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1351 {fingerings,-string-indications,-and-right-hand-fingerings.ly}
1356 @rlsr{Fretted strings}.
1358 Internals Reference:
1359 @rinternals{StrokeFinger}.
1365 Most of the notational issues associated with guitar music are
1366 covered sufficiently in the general fretted strings section, but there
1367 are a few more worth covering here. Occasionally users want to
1368 create songbook-type documents having only lyrics with chord
1369 indications above them. Since LilyPond is a music typesetter,
1370 it is not recommended for documents that have no music notation
1371 in them. A better alternative is a word processor, text editor,
1372 or, for experienced users, a typesetter like GuitarTeX.
1375 * Indicating position and barring::
1376 * Indicating harmonics and dampened notes::
1379 @node Indicating position and barring
1380 @unnumberedsubsubsec Indicating position and barring
1382 @cindex indicating position and barring for fretted instruments
1383 @cindex fretted instruments, indicating position and barring
1385 This example demonstrates how to include guitar position and
1386 barring indications.
1388 @lilypond[quote,ragged-right,fragment,verbatim,relative=0]
1392 \override TextSpanner #'(bound-details left text) = #"XII "
1394 b16 e g e b g\stopTextSpan
1401 @ref{Text spanners}.
1404 @rlsr{Fretted strings},
1405 @rlsr{Expressive marks}.
1408 @node Indicating harmonics and dampened notes
1409 @unnumberedsubsubsec Indicating harmonics and dampened notes
1411 @cindex fretted instruments, dampened notes
1412 @cindex fretted instruments, harmonics
1413 @cindex dampened notes on fretted instruments
1414 @cindex harmonics on fretted instruments
1416 Special note heads can be used to indicate dampened notes or
1417 harmonics. Harmonics are normally further explained with a
1420 @lilypond[quote,ragged-right,verbatim]
1423 \override Staff.NoteHead #'style = #'cross
1425 \override Staff.NoteHead #'style = #'harmonic-mixed
1426 d^\markup { \italic { \fontsize #-2 { "harm. 12" }}} <g b>1
1433 @rlsr{Fretted strings}.
1436 @ref{Special note heads},
1437 @ref{Note head styles}.
1444 * Banjo tablatures::
1447 @node Banjo tablatures
1448 @unnumberedsubsubsec Banjo tablatures
1450 @cindex banjo tablatures
1451 @cindex tablature, banjo
1453 LilyPond has basic support for the five-string banjo. When making tablatures
1454 for five-string banjo, use the banjo tablature format function to get
1455 correct fret numbers for the fifth string:
1457 @c due to crazy intervals of banjo music, absolute pitch is recommended
1459 @lilypond[quote,ragged-right,fragment,verbatim]
1461 \set TabStaff.tablatureFormat = #fret-number-tablature-format-banjo
1462 \set TabStaff.stringTunings = #banjo-open-g-tuning
1465 g8 d' g'\5 a b g e d' |
1466 g4 d''8\5 b' a'\2 g'\5 e'\2 d' |
1472 @cindex banjo tunings
1473 @cindex tunings, banjo
1475 @funindex banjo-c-tuning
1476 @funindex banjo-modal-tuning
1477 @funindex banjo-open-d-tuning
1478 @funindex banjo-open-dm-tuning
1479 @funindex four-string-banjo
1481 A number of common tunings for banjo are predefined in LilyPond:
1482 @code{banjo-c-tuning} (gCGBD), @code{banjo-modal-tuning} (gDGCD),
1483 @code{banjo-open-d-tuning} (aDF#AD) and @code{banjo-open-dm-tuning}
1486 These tunings may be converted to four-string banjo tunings using the
1487 @code{four-string-banjo} function:
1490 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
1496 @rlsr{Fretted strings}.
1499 @file{scm/@/output@/-lib@/.scm} contains predefined banjo tunings.