]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/fretted-strings.itely
lilypond-book robustness: ensure EOL at the end of @verbatim
[lilypond.git] / Documentation / user / fretted-strings.itely
index e5c0697d7b938315eb2210ad87b3c8c858a3ba93..1f153e3d9b18916d01406620b705602ea93dca1d 100644 (file)
@@ -6,7 +6,7 @@
     version that you are working on.  See TRANSLATION for details.
 @end ignore
 
-@c \version "2.11.53"
+@c \version "2.12.0"
 
 @node Fretted string instruments
 @section Fretted string instruments
@@ -17,12 +17,15 @@ This section discusses several aspects of music notation that are unique
 to fretted string instruments.
 
 @cindex tablature
+@cindex tablature, guitar
+@cindex tablature, banjo
 @cindex guitar tablature
+@cindex banjo tablature
 
 @menu
-* Common notation for fretted strings::  
-* Guitar::                      
-* Banjo::                       
+* Common notation for fretted strings::
+* Guitar::
+* Banjo::
 @end menu
 
 @node Common notation for fretted strings
@@ -32,14 +35,14 @@ This section discusses common notation that is unique
 to fretted string instruments.
 
 @menu
-* References for fretted strings::  
-* String number indications::   
-* Default tablatures::          
-* Custom tablatures::           
+* References for fretted strings::
+* String number indications::
+* Default tablatures::
+* Custom tablatures::
 * Fret diagram markups::
 * Predefined fret diagrams::
-* Automatic fret diagrams::               
-* Right-hand fingerings::       
+* Automatic fret diagrams::
+* Right-hand fingerings::
 @end menu
 
 @node References for fretted strings
@@ -50,25 +53,28 @@ a single staff, either in traditional music notation or in
 tablature.  Sometimes the two types are combined, and it is
 especially common in popular music to use chord diagrams above
 a staff of traditional notation.  The guitar and the banjo are
-transposing instruments, sounding an octave lower than written. 
-Scores for these instruments should use the @code{"treble_8"} clef. 
-Some other elements pertinent to fretted string instruments 
+transposing instruments, sounding an octave lower than written.
+Scores for these instruments should use the @code{"treble_8"} clef.
+Some other elements pertinent to fretted string instruments
 are covered elsewhere:
 
 @itemize
-@item Fingerings are indicated with @ref{Fingering instructions}.
+@item Fingerings are indicated as shown in @ref{Fingering instructions}.
 
 @item Instructions for @notation{Laissez vibrer} ties
-as well as ties on arpeggios and tremolos is described in
+as well as ties on arpeggios and tremolos can be found in
 @ref{Ties}.
 
-@item Instructions on handling multiple voices is described 
-in @ref{Collision resolution}. 
+@item Instructions for handling multiple voices can be found
+in @ref{Collision resolution}.
+
+@item Instructions for indicating harmonics can be found in
+@ref{Harmonics}.
 
 @end itemize
 
-@seealso
 
+@seealso
 Notation Reference:
 @ref{Fingering instructions},
 @ref{Ties},
@@ -79,10 +85,13 @@ Notation Reference:
 @ref{List of articulations},
 @ref{Clef}.
 
+
 @node String number indications
 @unnumberedsubsubsec String number indications
 
-@cindex String numbers
+@cindex string numbers
+@cindex string vs. fingering numbers
+@cindex fingering vs. string numbers
 
 The string on which a note should be played may be indicated by
 appending @code{\@var{number}} to a note inside a chord construct
@@ -115,8 +124,8 @@ in the code:
 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
 {allowing-fingerings-to-be-printed-inside-the-staff.ly}
 
-@seealso
 
+@seealso
 Notation Reference:
 @ref{Fingering instructions}.
 
@@ -130,17 +139,21 @@ Internals Reference:
 
 @node Default tablatures
 @unnumberedsubsubsec Default tablatures
-@cindex Tablatures, basic
-@cindex Tablatures, default
+
+@cindex tablatures, basic
+@cindex tablatures, default
+
+@funindex TabStaff
+@funindex TabVoice
 
 Tablature notation is used for notating music for plucked string
 instruments.  Pitches are not denoted with note heads, but by
-numbers indicating on which string and fret a note must be played.  
+numbers indicating on which string and fret a note must be played.
 LilyPond offers limited support for tablature.
 
 The string number associated with a note is given as a backslash
-followed by a number.  By default, string 1 is the highest, 
-and the tuning defaults to the standard guitar tuning (with 6 strings).  
+followed by a number.  By default, string 1 is the highest,
+and the tuning defaults to the standard guitar tuning (with 6 strings).
 The notes are printed as tablature, by using @code{TabStaff} and
 @code{TabVoice} contexts
 
@@ -152,11 +165,12 @@ The notes are printed as tablature, by using @code{TabStaff} and
 @end lilypond
 
 @funindex minimumFret
+
 @cindex fret
 
 
 When no string is specified for a note, the note is assigned to
-the lowest string that can generate the note with a fret number
+the highest string that can generate the note with a fret number
 greater than or equal to the value of @code{minimumFret}.
 The default value for @code{minimumFret} is 0.
 
@@ -176,6 +190,11 @@ The default value for @code{minimumFret} is 0.
 >>
 @end lilypond
 
+@cindex harmonic indications in tablature notation
+@cindex tablature and harmonic indications
+@cindex slides in tablature notation
+@cindex tablature and slides
+
 Harmonic indications and slides can be added to tablature
 notation.
 
@@ -196,20 +215,21 @@ notation.
 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
 {polyphony-in-tablature.ly}
 
-@seealso
 
+@seealso
 Notation Reference:
 @ref{Stems}.
 
 Snippets:
 @rlsr{Fretted strings}.
 
-Internals Reference: 
+Internals Reference:
 @rinternals{TabNoteHead},
 @rinternals{TabStaff},
 @rinternals{TabVoice},
 @rinternals{Beam}.
 
+
 @knownissues
 
 Chords are not handled in a special way, and hence the automatic
@@ -236,16 +256,25 @@ Guitar special effects are limited to harmonics and slides.
 
 @node Custom tablatures
 @unnumberedsubsubsec Custom tablatures
-@cindex Tablatures, custom
 
-LilyPond tabulature automatically calculates the fret for 
+@cindex tablatures, custom
+@cindex tablature, banjo
+@cindex tablature, mandolin
+@cindex tablature, bass guitar
+@cindex tablature, predefined string tunings
+@cindex fretted instruments, predefined string tunings
+@cindex predefined string tunings for fretted instruments
+
+@funindex StringTunings
+
+LilyPond tabulature automatically calculates the fret for
 a note based on the string to which the note is assigned.
 In order to do this, the tuning of the strings must be
 specified.  The tuning of the strings is given in the
 @code{StringTunings} property.
 
 LilyPond comes with predefined string tunings for banjo, mandolin,
-guitar and bass guitar.  Lilypond automatically sets the correct 
+guitar and bass guitar.  LilyPond automatically sets the correct
 transposition for predefined tunings.  The following example is
 for bass guitar, which sounds an octave lower than written.
 
@@ -269,20 +298,20 @@ for bass guitar, which sounds an octave lower than written.
 The default string tuning is @code{guitar-tuning}, which
 is the standard EADGBE tuning.  Some other predefined tunings are
 @code{guitar-open-g-tuning}, @code{mandolin-tuning} and
-@code{banjo-open-g-tuning}.  The predefined string tunings 
+@code{banjo-open-g-tuning}.  The predefined string tunings
 are found in @code{scm/output-lib.scm}.
 
-A string tuning is a Scheme list of string pitches, 
+A string tuning is a Scheme list of string pitches,
 one for each string, ordered by string number from 1 to N,
 where string 1 is at the top of the tablature staff and
-string N is at the bottom.  This ordinarily results in ordering 
-from highest pitch to lowest pitch, but some instruments 
+string N is at the bottom.  This ordinarily results in ordering
+from highest pitch to lowest pitch, but some instruments
 (e.g. ukulele) do not have strings ordered by pitch.
 
-A string pitch in a string tuning list is the pitch difference  
-of the open string from middle C measured in semitones.  The 
-string pitch must be an integer.  Lilypond calculates the actual 
-pitch of the string by adding the string tuning pitch to the 
+A string pitch in a string tuning list is the pitch difference
+of the open string from middle C measured in semitones.  The
+string pitch must be an integer.  LilyPond calculates the actual
+pitch of the string by adding the string tuning pitch to the
 actual pitch for middle C.
 
 LilyPond automatically calculates the number of strings in the
@@ -311,22 +340,27 @@ mynotes = {
 >>
 @end lilypond
 
-@seealso
 
+@seealso
 Installed Files:
 @file{scm/output-lib.scm}.
 
 Snippets:
 @rlsr{Fretted strings}.
 
-Internals Reference: 
+Internals Reference:
 @rinternals{Tab_note_heads_engraver}.
 
 
 @node Fret diagram markups
 @unnumberedsubsubsec Fret diagram markups
+
 @cindex fret diagrams
 @cindex chord diagrams
+@cindex diagrams, fret
+@cindex diagrams, chord for fretted instruments
+@cindex fret diagrams, custom
+@cindex custom fret diagrams
 
 Fret diagrams can be added to music as a markup to the desired
 note.  The markup contains information about the desired fret
@@ -343,20 +377,22 @@ In addition, open and unplayed (muted) strings can be indicated.
 @lilypond[quote, verbatim]
 <<
   \context ChordNames {
-     \chordmode { 
-       c1 d:m          
+     \chordmode {
+       c1 d:m
      }
   }
   \context Staff {
     \clef "treble_8"
-    < c e g c' e' > 1 ^\markup 
+    < c e g c' e' > 1 ^\markup
       \fret-diagram #"6-x;5-3;4-2;3-o;2-1;1-o;"
     < d a d' f'> ^\markup
       \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-1;"
-  }  
+  }
 >>
 @end lilypond
 
+@cindex barre indications
+
 Barre indications can be added to the diagram from
 the fret-diagram markup string.
 
@@ -377,6 +413,11 @@ the fret-diagram markup string.
 >>
 @end lilypond
 
+@cindex fret-diagram markup
+
+@funindex fret-diagram
+@funindex \fret-diagram
+
 The size of the fret diagram, and the number of frets in the diagram
 can be changed in the fret-diagram markup string.
 
@@ -421,17 +462,17 @@ can be controlled by the fret-diagram markup string.
 @lilypond[quote, verbatim]
 <<
   \context ChordNames {
-     \chordmode { 
-       c1 d:m          
+     \chordmode {
+       c1 d:m
      }
   }
   \context Staff {
     \clef "treble_8"
-    < c e g c' e' > 1 ^\markup 
+    < c e g c' e' > 1 ^\markup
       \fret-diagram #"f:1;6-x;5-3-3;4-2-2;3-o;2-1-1;1-o;"
     < d a d' f'> ^\markup
       \fret-diagram #"f:2;6-x;5-x;4-o;3-2-2;2-3-3;1-1-1;"
-  }  
+  }
 >>
 @end lilypond
 
@@ -441,22 +482,27 @@ markup string.
 @lilypond[quote, verbatim]
 <<
   \context ChordNames {
-     \chordmode { 
-       c1 d:m          
+     \chordmode {
+       c1 d:m
      }
   }
   \context Staff {
     \clef "treble_8"
-    < c e g c' e' > 1 ^\markup 
+    < c e g c' e' > 1 ^\markup
       \fret-diagram #"d:0.35;6-x;5-3;4-2;3-o;2-1;1-o;"
     < d a d' f'> ^\markup
       \fret-diagram #"p:0.2;6-x;5-x;4-o;3-2;2-3;1-1;"
-  }  
+  }
 >>
 @end lilypond
 
+@cindex fret-diagram-terse markup
+
+@funindex fret-diagram-terse
+@funindex \fret-diagram-terse
+
 The fret-diagram-terse markup string omits string numbers; the string
-number is implied by the presence of semicolons.  There is one semicolon 
+number is implied by the presence of semicolons.  There is one semicolon
 for each string in the diagram.  The first semicolon corresponds to the
 highest string number and the last semicolon corresponds to the first string.
 Mute strings, open strings, and fret numbers can be indicated.
@@ -495,21 +541,21 @@ Barre indicators can be included in the fret-diagram-terse markup string.
       \fret-diagram-terse #"3-(;5;5;4;3;3-);"
   }
 >>
-@end lilypond      
+@end lilypond
 
 Fingering indications can be included in the fret-diagram-terse markup string.
 
 @c Need to use override to enable fingerings to show this -- can we do so?
 @lilypond[quote, verbatim]
-<<    
+<<
   \context ChordNames {
      \chordmode {
        c1 d:m
      }
   }
   \context Staff {
-    \override Voice.TextScript 
-      #'fret-diagram-details #'finger-code = #'below-string
+    \override Voice.TextScript
+      #'(fret-diagram-details finger-code) = #'below-string
     \clef "treble_8"
     < c e g c' e' > 1 ^\markup
       \fret-diagram-terse #"x;3-3;2-2;o;1-1;o;"
@@ -522,6 +568,11 @@ Fingering indications can be included in the fret-diagram-terse markup string.
 Other fret diagram properties must be adjusted using @code{\override} when using
 the fret-diagram-terse markup.
 
+@cindex fret-diagram-verbose markup
+
+@funindex fret-diagram-verbose
+@funindex \fret-diagram-verbose
+
 The fret-diagram-verbose markup string is in the format of a Scheme list.  Each
 element of the list indicates an item to be placed on the fret diagram.
 
@@ -555,21 +606,25 @@ element of the list indicates an item to be placed on the fret diagram.
 >>
 @end lilypond
 
-Fingering indications and barres can be included in a 
-fret-diagram-verbose markup string.
+Fingering indications and barres can be included in a
+fret-diagram-verbose markup string.  Unique to the 
+fret-diagram-verbose interface is a capo indication that 
+can be placed on the fret diagram.  The capo indication is
+a thick bar that covers all strings.  The fret with the
+capo will be the lowest fret in the fret diagram.
 
 @c \override is necessary to make fingering visible
 @lilypond[quote, verbatim]
 <<
   \context ChordNames {
      \chordmode {
-       f1 g
+       f1 g c
      }
   }
   \context Staff {
     \clef "treble_8"
     \override Voice.TextScript
-      #'fret-diagram-details #'finger-code = #'below-string
+      #'(fret-diagram-details finger-code) = #'below-string
 
     < f, c f a c' f'>1 ^\markup
       \fret-diagram-verbose #'(
@@ -590,11 +645,19 @@ fret-diagram-verbose markup string.
         (open 2)
         (place-fret 1 3 3)
       )
-  }
+    < c e g c' e'> ^\markup
+      \fret-diagram-verbose #'(
+        (capo 3)
+        (mute 6)
+        (place-fret 4 5 1)
+        (place-fret 3 5 2)
+        (place-fret 2 5 3)
+      )
+   }
 >>
 @end lilypond
 
-All other fret diagram properties must be adjusted using @code{\override} 
+All other fret diagram properties must be adjusted using @code{\override}
 when using the fret-diagram-verbose markup.
 
 @ignore
@@ -613,9 +676,9 @@ and color of dots.
   fis^\markup \override #'(size . 0.75) {
     \override #'(finger-code . below-string) {
       \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
-                               (place-fret 5 4 3) 
+                               (place-fret 5 4 3)
                                (place-fret 4 4 4)
-                               (place-fret 3 3 2) 
+                               (place-fret 3 3 2)
                                (place-fret 2 2 1)
                                (place-fret 1 2 1))
     }
@@ -633,10 +696,16 @@ and color of dots.
 @end lilypond
 @end ignore
 
+@cindex customized fret diagram
+@cindex fret diagram, customized
+@cindex diagram, fret, customized
+
+@funindex fret-diagram-interface
+
 The graphical layout of a fret diagram can be customized according to
 user preference through the properties of the @code{fret-diagram-interface}.
 Details are found at @rinternals{fret-diagram-interface}.  For a fret diagram
-markup , the interface properties belong to @code{Voice.TextScript}.
+markup, the interface properties belong to @code{Voice.TextScript}.
 
 @snippets
 
@@ -645,7 +714,6 @@ markup , the interface properties belong to @code{Voice.TextScript}.
 
 
 @seealso
-
 Notation Reference:
 @ref{Text markup commands}.
 
@@ -655,11 +723,17 @@ Snippets:
 Internals Reference:
 @rinternals{fret-diagram-interface}.
 
+
 @node Predefined fret diagrams
 @unnumberedsubsubsec Predefined fret diagrams
+
+
 @cindex fret diagrams
 @cindex chord diagrams
 
+@funindex FretBoards
+@funindex stringTunings
+
 Fret diagrams can be displayed using the @code{FretBoards} context.  By
 default, the @code{FretBoards} context will display fret diagrams that
 are stored in a lookup table:
@@ -674,14 +748,14 @@ are stored in a lookup table:
 @end lilypond
 
 The default predefined fret diagrams are contained in the file
-@code{predefined-guitar-fretboards.ly}.  Fret diagrams are 
+@code{predefined-guitar-fretboards.ly}.  Fret diagrams are
 stored based on the pitches of a chord and the value of
-@code{stringTunings} that is currently in use.  
-@code{predefined-guitar-fretboards.ly} contains predefined 
+@code{stringTunings} that is currently in use.
+@code{predefined-guitar-fretboards.ly} contains predefined
 fret diagrams only for @code{guitar-tuning}.  Predefined fret
 diagrams can be added for other instruments or other tunings
-by following the examples found in 
-@code{predefined-guitar-fretboards.ly}.  
+by following the examples found in
+@code{predefined-guitar-fretboards.ly}.
 
 Chord pitches can be entered
 either as simultaneous music or using chord mode (see
@@ -695,6 +769,13 @@ either as simultaneous music or using chord mode (see
 }
 @end lilypond
 
+@cindex chord names with fret diagrams
+@cindex fret diagrams with chord names
+
+@funindex ChordNames
+@funindex chordmode
+@funindex \chordmode
+
 It is common that both chord names and fret diagrams are displayed together.
 This is achieved by putting a @code{ChordNames} context in parallel with
 a @code{FretBoards} context and giving both contexts the same music.
@@ -715,6 +796,10 @@ mychords = \chordmode{
 >>
 @end lilypond
 
+@cindex transposing fret diagrams
+@cindex fret diagrams, transposing
+@cindex diagrams, fret, transposing
+
 Predefined fret diagrams are transposable, as long as a diagram for the
 transposed chord is stored in the fret diagram table.
 
@@ -763,14 +848,20 @@ mychords = \chordmode{
 >>
 @end lilypond
 
+@cindex fret diagrams, adding custom
+@cindex custom fret diagrams, adding
+@cindex adding custom fret diagrams
+
 Fret diagrams can be added to the fret diagram table.  To add a diagram,
-you must specify the chord for the diagram, the tuning to be used, and the
-fret-diagram-terse definition string for the diagram.
+you must specify the chord for the diagram, the tuning to be used, and 
+a definition for the diagram.  The diagram definition can be either a
+fret-diagram-terse definition string or a fret-diagram-verbose
+marking list.
 
 @lilypond[verbatim, ragged-right, quote]
 \include "predefined-guitar-fretboards.ly"
 
-\storePredefinedDiagram \chordmode {c:9} 
+\storePredefinedDiagram \chordmode {c:9}
                         #guitar-tuning
                         #"x;3-2;2-1;3-3;3-4;x;"
 
@@ -789,17 +880,19 @@ mychords = \chordmode{
 @end lilypond
 
 Different fret diagrams for the same chord name can be stored using different
-octaves of pitches.
+octaves of pitches.  The different octave should be at least two octaves
+above or below the default octave, because the octaves above and  below the
+default octave are used for transposing fretboards.
 
 @lilypond[verbatim, ragged-right, quote]
 \include "predefined-guitar-fretboards.ly"
 
-\storePredefinedDiagram \chordmode {c'
+\storePredefinedDiagram \chordmode {c''}
                         #guitar-tuning
-                        #(offset-fret 2 (chord-shape 'bes))
+                        #(offset-fret 2 (chord-shape 'bes guitar-tuning))
 
 mychords = \chordmode{
-  c1 c'
+  c1 c''
 }
 
 <<
@@ -812,30 +905,42 @@ mychords = \chordmode{
 >>
 @end lilypond
 
+@cindex fretted instruments, chord shapes
+@cindex chord shapes for fretted instruments
+
+@funindex \addChordShape
+@funindex add ChordShape
+@funindex storePredefinedDiagram
+@funindex \storePredefinedDiagram
+
 In addition to fret diagrams, LilyPond stores an internal list of chord
 shapes.  The chord shapes are fret diagrams that can be shifted along
 the neck to different posistions to provide different chords.  Chord
 shapes can be added to the internal list and then used to define
-predefined fret diagrams.
+predefined fret diagrams.  Because they can be moved to various
+positions on the neck, chord shapes will normally not contain
+any open strings.  Like fret diagrams, chord shapes can be
+entered as either fret-diagram-terse strings or fret-diagram-verbose
+marking lists.
 
 @lilypond[verbatim, ragged-right, quote]
 \include "predefined-guitar-fretboards.ly"
 
 % add a new chord shape
 
-\addChordShape #'powerf #"1-1;3-3;3-4;x;x;x;"
+\addChordShape #'powerf #guitar-tuning #"1-1;3-3;3-4;x;x;x;"
 
 % add some new chords based on the power chord shape
 
-\storePredefinedDiagram \chordmode {f'
-                        #guitar-tuning 
-                        #(chord-shape 'powerf)
-\storePredefinedDiagram \chordmode {g'
+\storePredefinedDiagram \chordmode {f''}
+                        #guitar-tuning
+                        #(chord-shape 'powerf guitar-tuning) 
+\storePredefinedDiagram \chordmode {g''}
                         #guitar-tuning
-                        #(offset-fret 2 (chord-shape 'powerf))
+                        #(offset-fret 2 (chord-shape 'powerf guitar-tuning))
 
 mychords = \chordmode{
-  f1 f' g g' 
+  f1 f'' g g''
 }
 
 <<
@@ -850,8 +955,8 @@ mychords = \chordmode{
 
 The graphical layout of a fret diagram can be customized according to
 user preference through the properties of the @code{fret-diagram-interface}.
-Details are found at @rinternals{fret-diagram-interface}.  For a 
-predefined fret diagram, the interface properties belong to 
+Details are found at @rinternals{fret-diagram-interface}.  For a
+predefined fret diagram, the interface properties belong to
 @code{FretBoards.FretBoard}.
 
 @snippets
@@ -859,9 +964,13 @@ predefined fret diagram, the interface properties belong to
 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
 {customizing-fretboard-fret-diagrams.ly}
 
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
+{defining-predefined-fretboards-for-other-instruments.ly}
 
-@seealso
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
+{chordchanges-for-fretboards.ly}
 
+@seealso
 Notation Reference:
 @ref{Custom tablatures},
 @ref{Automatic fret diagrams},
@@ -869,7 +978,8 @@ Notation Reference:
 @ref{Predefined fretboard diagrams}.
 
 Installed Files:
-@file{ly/predefined-guitar-fretboards.ly}.
+@file{ly/predefined-guitar-fretboards.ly},
+@file{ly/predefined-guitar-ninth-fretboards.ly}.
 
 Snippets:
 @rlsr{Fretted strings}.
@@ -880,10 +990,13 @@ Internals Reference:
 
 @node Automatic fret diagrams
 @unnumberedsubsubsec Automatic fret diagrams
-@cindex fret diagrams
-@cindex chord diagrams
 
-Fret diagrams can be automatically created from entered notes using the 
+@cindex fret diagrams, automatic
+@cindex chord diagrams, automatic
+@cindex automatic fret diagrams
+@cindex automatic chord diagrams
+
+Fret diagrams can be automatically created from entered notes using the
 @code{FretBoards} context.  If no predefined diagram is available for
 the entered notes in the active @code{stringTunings}, this context
 calculates strings and frets that can be used to play the notes.
@@ -891,8 +1004,8 @@ calculates strings and frets that can be used to play the notes.
 @lilypond[quote,ragged-right,verbatim]
 <<
   \context ChordNames {
-     \chordmode { 
-       f1 g  
+     \chordmode {
+       f1 g
      }
   }
   \context FretBoards {
@@ -903,11 +1016,16 @@ calculates strings and frets that can be used to play the notes.
     \clef "treble_8"
     < f, c f a c' f'>1
     < g, b, d g b' g'>
-  }  
+  }
 >>
 @end lilypond
 
-As no predefined diagrams are loaded by default, automatic calculation 
+@funindex predefinedFretboardsOff
+@funindex \predefinedFretboardsOff
+@funindex predefinedFretboardsOn
+@funindex \predefinedFretboardsOn
+
+As no predefined diagrams are loaded by default, automatic calculation
 of fret diagrams is the default behavior.  Once default diagrams are
 loaded, automatic calculation can be enabled and disabled with predefined
 commands:
@@ -919,8 +1037,8 @@ commands:
                         #"x;3-1-(;5-2;5-3;5-4;3-1-1);"
 <<
   \context ChordNames {
-     \chordmode { 
-       c1 c c 
+     \chordmode {
+       c1 c c
      }
   }
   \context FretBoards {
@@ -935,45 +1053,29 @@ commands:
     <c e g c' e'>1
     <c e g c' e'>
     <c e g c' e'>
-  }  
+  }
 >>
 @end lilypond
 
-  
+
 
 Sometimes the fretboard calculator will be unable to find
 an accceptable diagram.  This can often be remedied by
 manually assigning a note to a string.  In many cases, only one
-note need be manually placed on a string; the rest of 
+note need be manually placed on a string; the rest of
 the notes will then be placed appropriately by the @code{FretBoards}
 context.
 
-@lilypond[quote,ragged-right,verbatim]
-<<
-  \context ChordNames {
-     \chordmode { 
-       c1 c 
-     }
-  }
-  \context FretBoards {
-    < c g c' e' g'> 1
-    < c g\4 c' e' g'> 1
-  }
-  \context Staff {
-    \clef "treble_8"
-    < c g c' e' g'> 1
-    < c g c' e' g'> 1
-  }  
->>
-@end lilypond
+@cindex fret diagrams, adding fingerings
+@cindex fingerings, adding to fret diagrams
 
 Fingerings can be added to FretBoard fret diagrams.
 
 @lilypond[quote, verbatim]
 <<
   \context ChordNames {
-     \chordmode { 
-       c1 d:m          
+     \chordmode {
+       c1 d:m
      }
   }
   \context FretBoards {
@@ -984,7 +1086,7 @@ Fingerings can be added to FretBoard fret diagrams.
     \clef "treble_8"
     < c e g c' e' > 1
     < d a d' f'>
-  }  
+  }
 >>
 @end lilypond
 
@@ -1014,21 +1116,23 @@ property.
 
 The strings and frets for the @code{FretBoards} context depend
 on the @code{stringTunings} property, which has the same meaning
-as in the TabStaff context.  See @ref{Custom tablatures} for 
-information on the @code{stringTunings} property. 
+as in the TabStaff context.  See @ref{Custom tablatures} for
+information on the @code{stringTunings} property.
 
 The graphical layout of a fret diagram can be customized according to
 user preference through the properties of the @code{fret-diagram-interface}.
-Details are found at @rinternals{fret-diagram-interface}.  For a 
-@code{FretBoards} fret diagram, the interface properties belong to 
+Details are found at @rinternals{fret-diagram-interface}.  For a
+@code{FretBoards} fret diagram, the interface properties belong to
 @code{FretBoards.FretBoard}.
 
+
 @predefined
 @code{\predefinedFretboardsOff},
 @code{\predefinedFretboardsOn}.
+@endpredefined
 
-@seealso
 
+@seealso
 Notation Reference:
 @ref{Custom tablatures}.
 
@@ -1042,20 +1146,28 @@ Internals Reference:
 @node Right-hand fingerings
 @unnumberedsubsubsec Right-hand fingerings
 
-Right-hand fingerings @var{p-i-m-a} must be entered within a  
-chord construct @code{<>} for them to be printed in the score, 
-even when applied to a single note. 
+@cindex fretted instruments, right hand fingerings
+@cindex fingerings, right hand for fretted instruments
+@cindex right hand fingerings for fretted instruments
+
+@funindex rightHandFinger
+@funindex \rightHandFinger
+
+Right-hand fingerings @var{p-i-m-a} must be entered within a
+chord construct @code{<>} for them to be printed in the score,
+even when applied to a single note.
 
-@warning{There @strong{must} be a hyphen after the note and a space 
+@warning{There @strong{must} be a hyphen after the note and a space
 before the closing @code{>}.}
 
 @lilypond[quote,verbatim,relative=0]
 \clef "treble_8"
-<c-\rightHandFinger #1 >4 
-<e-\rightHandFinger #2 > 
-<g-\rightHandFinger #3 > 
+<c-\rightHandFinger #1 >4
+<e-\rightHandFinger #2 >
+<g-\rightHandFinger #3 >
 <c-\rightHandFinger #4 >
-<c,-\rightHandFinger #1 e-\rightHandFinger #2 g-\rightHandFinger #3 c-\rightHandFinger #4 >1
+<c,-\rightHandFinger #1 e-\rightHandFinger #2
+  g-\rightHandFinger #3 c-\rightHandFinger #4 >1
 @end lilypond
 
 For convenience, you can abbreviate @code{\rightHandFinger} to something
@@ -1065,8 +1177,6 @@ short, for example @code{RH},
 #(define RH rightHandFinger)
 @end example
 
-@cindex fingerings, right hand, for guitar
-@cindex right hand fingerings for guitar
 
 @snippets
 
@@ -1076,12 +1186,12 @@ short, for example @code{RH},
 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
 {fingerings,-string-indications,-and-right-hand-fingerings.ly}
 
-@seealso
 
+@seealso
 Snippets:
 @rlsr{Fretted strings}.
 
-Internals Reference: 
+Internals Reference:
 @rinternals{StrokeFinger}.
 
 
@@ -1090,21 +1200,24 @@ Internals Reference:
 
 Most of the notational issues associated with guitar music are
 covered sufficiently in the general fretted strings section, but there
-are a few more worth covering here.  Occasionally users want to 
+are a few more worth covering here.  Occasionally users want to
 create songbook-type documents having only lyrics with chord
-indications above them.  Since Lilypond is a music typesetter,
+indications above them.  Since LilyPond is a music typesetter,
 it is not recommended for documents that have no music notation
-in them.  A better alternative is a word processor, text editor, 
+in them.  A better alternative is a word processor, text editor,
 or, for experienced users, a typesetter like GuitarTeX.
 
 @menu
-* Indicating position and barring::  
-* Indicating harmonics and dampened notes::  
+* Indicating position and barring::
+* Indicating harmonics and dampened notes::
 @end menu
 
 @node Indicating position and barring
 @unnumberedsubsubsec Indicating position and barring
 
+@cindex indicating position and barring for fretted instruments
+@cindex fretted instruments, indicating position and barring
+
 This example demonstrates how to include guitar position and
 barring indications.
 
@@ -1112,14 +1225,14 @@ barring indications.
 \clef "treble_8"
 b16 d g b e
 \textSpannerDown
-\override TextSpanner #'bound-details #'left #'text = #"XII "
+\override TextSpanner #'(bound-details left text) = #"XII "
   g16\startTextSpan
   b16 e g e b g\stopTextSpan
 e16 b g d
 @end lilypond
 
-@seealso
 
+@seealso
 Notation Reference:
 @ref{Text spanners}.
 
@@ -1127,11 +1240,17 @@ Snippets:
 @rlsr{Fretted strings},
 @rlsr{Expressive marks}.
 
+
 @node Indicating harmonics and dampened notes
 @unnumberedsubsubsec Indicating harmonics and dampened notes
 
-Special note heads can be used to indicate dampened notes or 
-harmonics.  Harmonics are normally further explained with a 
+@cindex fretted instruments, dampened notes
+@cindex fretted instruments, harmonics
+@cindex dampened notes on fretted instruments
+@cindex harmonics on fretted instruments
+
+Special note heads can be used to indicate dampened notes or
+harmonics.  Harmonics are normally further explained with a
 text markup.
 
 @lilypond[quote,ragged-right,fragment,verbatim]
@@ -1144,8 +1263,8 @@ text markup.
 }
 @end lilypond
 
-@seealso
 
+@seealso
 Snippets:
 @rlsr{Fretted strings}.
 
@@ -1153,16 +1272,19 @@ Notation Reference:
 @ref{Special note heads},
 @ref{Note head styles}.
 
+
 @node Banjo
 @subsection Banjo
 
 @menu
-* Banjo tablatures::            
+* Banjo tablatures::
 @end menu
 
 @node Banjo tablatures
 @unnumberedsubsubsec Banjo tablatures
-@cindex Banjo tablatures
+
+@cindex banjo tablatures
+@cindex tablature, banjo
 
 LilyPond has basic support for the five-string banjo.  When making tablatures
 for five-string banjo, use the banjo tablature format function to get
@@ -1183,6 +1305,15 @@ correct fret numbers for the fifth string:
 >>
 @end lilypond
 
+@cindex banjo tunings
+@cindex tunings, banjo
+
+@funindex banjo-c-tuning
+@funindex banjo-modal-tuning
+@funindex banjo-open-d-tuning
+@funindex banjo-open-dm-tuning
+@funindex four-string-banjo
+
 A number of common tunings for banjo are predefined in LilyPond:
 @code{banjo-c-tuning} (gCGBD), @code{banjo-modal-tuning} (gDGCD),
 @code{banjo-open-d-tuning} (aDF#AD) and @code{banjo-open-dm-tuning}
@@ -1195,14 +1326,9 @@ These tunings may be converted to four-string banjo tunings using the
 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
 @end example
 
-@seealso
 
+@seealso
 Snippets:
 @rlsr{Fretted strings}.
 
 The file @file{scm/@/output@/-lib@/.scm} contains predefined banjo tunings.
-
-
-
-
-