]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/fretted-strings.itely
Docs: NR 6.7 Fix visible TODO
[lilypond.git] / Documentation / user / fretted-strings.itely
index 8b6beef4f59431cae504a6a377258a7faddb0768..e2ad4c4dc485bec4b478ef09fba73b551de7610c 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.11.61"
 
 @node Fretted string instruments
 @section Fretted string instruments
@@ -43,7 +43,7 @@ to fretted string instruments.
 @end menu
 
 @node References for fretted strings
-@subsubsection References for fretted strings
+@unnumberedsubsubsec References for fretted strings
 
 Music for fretted string instruments is normally notated on
 a single staff, either in traditional music notation or in
@@ -70,16 +70,17 @@ in @ref{Collision resolution}.
 @seealso
 
 Notation Reference:
-@ref{Instrument names},
-@ref{Writing music in parallel},
 @ref{Fingering instructions},
 @ref{Ties},
+@ref{Collision resolution},
+@ref{Instrument names},
+@ref{Writing music in parallel},
 @ref{Arpeggio},
 @ref{List of articulations},
 @ref{Clef}.
 
 @node String number indications
-@subsubsection String number indications
+@unnumberedsubsubsec String number indications
 
 @cindex String numbers
 
@@ -128,7 +129,7 @@ Internals Reference:
 
 
 @node Default tablatures
-@subsubsection Default tablatures
+@unnumberedsubsubsec Default tablatures
 @cindex Tablatures, basic
 @cindex Tablatures, default
 
@@ -175,6 +176,18 @@ The default value for @code{minimumFret} is 0.
 >>
 @end lilypond
 
+Harmonic indications and slides can be added to tablature
+notation.
+
+@lilypond[fragment, verbatim, quote, relative=1]
+\new TabStaff {
+  \new TabVoice {
+    <c g'\harmonic> d\2\glissando e\2
+  }
+}
+@end lilypond
+
+
 @snippets
 
 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
@@ -219,31 +232,17 @@ melodia = \partcombine { e4 g g g }{ e4 e e e }
 >>
 @end lilypond
 
+Guitar special effects are limited to harmonics and slides.
 
 @node Custom tablatures
-@subsubsection Custom tablatures
+@unnumberedsubsubsec Custom tablatures
 @cindex Tablatures, custom
 
-You can change the tuning of the strings.  A string tuning is
-given as a Scheme list with one integer number for each string,
-the number being the pitch (measured in semitones relative to
-middle C) of an open string.  The numbers specified for
-@code{stringTunings} are the numbers of semitones to subtract or
-add, starting the specified pitch by default middle C, in string
-order.  LilyPond automatically calculates the number of strings by
-looking at @code{stringTunings}.
-
-In the next example, @code{stringTunings} is set for the pitches
-e, a, d, and g.
-
-@lilypond[quote,ragged-right,fragment,verbatim]
-\new TabStaff <<
-  \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
-  {
-    a,4 c' a e' e c' a e'
-  }
->>
-@end lilypond
+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 
@@ -252,43 +251,80 @@ for bass guitar, which sounds an octave lower than written.
 
 @lilypond[quote,ragged-right,verbatim]
 <<
-  \new Staff <<
+  \new Staff {
     \clef "bass_8"
     \relative c, {
-    c4 d e f
+      c4 d e f
     }
-  >>
-  \new TabStaff <<
+  }
+  \new TabStaff {
     \set TabStaff.stringTunings = #bass-tuning
     \relative c, {
-    c4 d e f
+      c4 d e f
     }
-  >>
+  }
 >>
 @end lilypond
 
-The default string tuning is @code{guitar-tuning} (the standard
-EADGBE tuning).  Some other predefined tunings are
+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}.
+@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, 
+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 
+(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 
+actual pitch for middle C.
+
+LilyPond automatically calculates the number of strings in the
+@code{TabStaff} as the number of elements in @code{stringTunings}.
+
+Any desired string tuning can be created.  For example, we can
+define a string tuning for a four-string instrument with pitches
+of @code{a''},  @code{d''},  @code{g'}, and @code{c'}:
+
+
+@lilypond[quote,verbatim]
+mynotes = {
+    c'4 e' g' c'' |
+    e'' g'' b'' c'''
+}
+
+<<
+  \new Staff {
+    \clef treble
+    \mynotes
+  }
+  \new TabStaff {
+    \set TabStaff.stringTunings = #'(21 14 7 0)
+    \mynotes
+  }
+>>
+@end lilypond
 
 @seealso
 
+Installed Files:
+@file{scm/output-lib.scm}.
+
 Snippets:
 @rlsr{Fretted strings}.
 
-The file @file{scm/@/output@/-lib@/.scm} contains the predefined string
-tunings.
-
 Internals Reference: 
 @rinternals{Tab_note_heads_engraver}.
 
-@knownissues
-
-No guitar special effects have been implemented.
 
 @node Fret diagram markups
-@subsubsection Fret diagram markups
+@unnumberedsubsubsec Fret diagram markups
 @cindex fret diagrams
 @cindex chord diagrams
 
@@ -335,7 +371,7 @@ the fret-diagram markup string.
     \clef "treble_8"
     < f, c f a c' f'>1 ^\markup
       \fret-diagram #"c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
-    < g, b, d g b' g'> ^\markup
+    < g, d g b d' g'> ^\markup
       \fret-diagram #"c:6-1-3;6-3;5-5;4-5;3-4;2-3;1-3;"
   }
 >>
@@ -355,7 +391,7 @@ can be changed in the fret-diagram markup string.
     \clef "treble_8"
     < f, c f a c' f'>1 ^\markup
       \fret-diagram #"s:1.5;c:6-1-1;6-1;5-3;4-3;3-2;2-1;1-1;"
-    < g, b, d g b' g'> ^\markup
+    < g, b, d g b g'> ^\markup
       \fret-diagram #"h:6;6-3;5-2;4-o;3-o;2-o;1-3;"
   }
 >>
@@ -455,7 +491,7 @@ Barre indicators can be included in the fret-diagram-terse markup string.
     \clef "treble_8"
     < f, c f a c' f'>1 ^\markup
       \fret-diagram-terse #"1-(;3;3;2;1;1-);"
-    < g, b, d g b' g'> ^\markup
+    < g, d g b d' g'> ^\markup
       \fret-diagram-terse #"3-(;5;5;4;3;3-);"
   }
 >>
@@ -545,7 +581,7 @@ fret-diagram-verbose markup string.
         (place-fret 1 1)
         (barre 6 1 1)
       )
-    < g, b, d g b' g'> ^\markup
+    < g, b, d g b g'> ^\markup
       \fret-diagram-verbose #'(
         (place-fret 6 3 2)
         (place-fret 5 2 1)
@@ -620,7 +656,7 @@ Internals Reference:
 @rinternals{fret-diagram-interface}.
 
 @node Predefined fret diagrams
-@subsubsection Predefined fret diagrams
+@unnumberedsubsubsec Predefined fret diagrams
 @cindex fret diagrams
 @cindex chord diagrams
 
@@ -843,7 +879,7 @@ Internals Reference:
 
 
 @node Automatic fret diagrams
-@subsubsection Automatic fret diagrams
+@unnumberedsubsubsec Automatic fret diagrams
 @cindex fret diagrams
 @cindex chord diagrams
 
@@ -878,7 +914,7 @@ commands:
 
 @lilypond[quote,ragged-right,verbatim]
 
-\storePredefinedDiagram <c\5 e g c' e'>
+\storePredefinedDiagram <c e g c' e'>
                         #guitar-tuning
                         #"x;3-1-(;5-2;5-3;5-4;3-1-1);"
 <<
@@ -888,25 +924,27 @@ commands:
      }
   }
   \context FretBoards {
-    <c\5 e g c' e'>1
+    <c e g c' e'>1
     \predefinedFretboardsOff
-    <c\5 e g c' e'>
+    <c e g c' e'>
     \predefinedFretboardsOn
-    <c\5 e g c' e'>
+    <c e g c' e'>
   }
   \context Staff {
     \clef "treble_8"
-    <c\5 e g c' e'>1
-    <c\5 e g c' e'>
-    <c\5 e g c' e'>
+    <c e g c' e'>1
+    <c e g c' e'>
+    <c e g c' e'>
   }  
 >>
 @end lilypond
 
   
 
-Notes can be explicitly placed on a string.  It is often enough
-to place only the lowest note on an explicit string; the rest of 
+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 
 the notes will then be placed appropriately by the @code{FretBoards}
 context.
 
@@ -914,21 +952,17 @@ context.
 <<
   \context ChordNames {
      \chordmode { 
-       c1 c d:m d:m    
+       c1 c 
      }
   }
   \context FretBoards {
-    < c e g c' e' > 1
-    < c\5 e g c' e' > 1
-    < d a d' f'>
-    < d\4 a d' f'>
+    < c g c' e' g'> 1
+    < c g\4 c' e' g'> 1
   }
   \context Staff {
     \clef "treble_8"
-    < c e g c' e' > 1
-    < c e g c' e' > 1
-    < d a d' f'>
-    < d a d' f'>
+    < c g c' e' g'> 1
+    < c g c' e' g'> 1
   }  
 >>
 @end lilypond
@@ -943,8 +977,8 @@ Fingerings can be added to FretBoard fret diagrams.
      }
   }
   \context FretBoards {
-    < c\5-3 e-2 g c'-1 e' > 1
-    < d\4 a-2 d'-3 f'-1>
+    < c-3 e-2 g c'-1 e' > 1
+    < d a-2 d'-3 f'-1>
   }
   \context Staff {
     \clef "treble_8"
@@ -954,6 +988,30 @@ Fingerings can be added to FretBoard fret diagrams.
 >>
 @end lilypond
 
+The minimum fret to be used in calculating strings and frets for
+the FretBoard context can be set with the @code{minimumFret}
+property.
+
+@lilypond[quote, verbatim]
+<<
+  \context ChordNames {
+     \chordmode {
+       d1:m d:m
+     }
+  }
+  \context FretBoards {
+    < d a d' f'>
+    \set FretBoards.minimumFret = #5
+    < d a d' f'>
+  }
+  \context Staff {
+    \clef "treble_8"
+    < d a d' f'>
+    < d a d' f'>
+  }
+>>
+@end lilypond
+
 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 
@@ -965,18 +1023,9 @@ Details are found at @rinternals{fret-diagram-interface}.  For a
 @code{FretBoards} fret diagram, the interface properties belong to 
 @code{FretBoards.FretBoard}.
 
-@snippets
-The minimum fret to be used in calculating strings and frets for
-the FretBoard context can be set with the @code{minimumFret}
-property.
-
-@c TODO -- snippet showing minimum fret.
-
-@c TODO -- snippet for using StringTunings
-
 @predefined
-\predefinedFretboardsOff,
-\predefinedFretboardsOn.
+@code{\predefinedFretboardsOff},
+@code{\predefinedFretboardsOn}.
 
 @seealso
 
@@ -991,7 +1040,7 @@ Internals Reference:
 
 
 @node Right-hand fingerings
-@subsubsection 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, 
@@ -1054,7 +1103,7 @@ or, for experienced users, a typesetter like GuitarTeX.
 @end menu
 
 @node Indicating position and barring
-@subsubsection Indicating position and barring
+@unnumberedsubsubsec Indicating position and barring
 
 This example demonstrates how to include guitar position and
 barring indications.
@@ -1079,7 +1128,7 @@ Snippets:
 @rlsr{Expressive marks}.
 
 @node Indicating harmonics and dampened notes
-@subsubsection 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 
@@ -1112,7 +1161,7 @@ Notation Reference:
 @end menu
 
 @node Banjo tablatures
-@subsubsection Banjo tablatures
+@unnumberedsubsubsec Banjo tablatures
 @cindex Banjo tablatures
 
 LilyPond has basic support for the five-string banjo.  When making tablatures