]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/notation/fretted-strings.itely
Doc: fix incorrect chording for fret diagram (2963)
[lilypond.git] / Documentation / notation / fretted-strings.itely
index 4574e9bda1b802841e1fa318d75c3723dbc7bd37..b6afe1b5814ffff7b2377cfc5f12711a4c064ccd 100644 (file)
@@ -7,7 +7,7 @@
     Guide, node Updating translation committishes..
 @end ignore
 
     Guide, node Updating translation committishes..
 @end ignore
 
-@c \version "2.15.16"
+@c \version "2.17.6"
 
 @node Fretted string instruments
 @section Fretted string instruments
 
 @node Fretted string instruments
 @section Fretted string instruments
@@ -76,7 +76,6 @@ in @ref{Collision resolution}.
 
 @end itemize
 
 
 @end itemize
 
-
 @seealso
 Notation Reference:
 @ref{Fingering instructions},
 @seealso
 Notation Reference:
 @ref{Fingering instructions},
@@ -98,25 +97,25 @@ Notation Reference:
 @cindex fingering vs. string numbers
 
 The string on which a note should be played may be indicated by
 @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
-@code{<>}.
-
-@warning{String numbers @strong{must} be defined inside a chord
-construct even if there is only a single note.}
+appending @code{\@var{number}} to a note.
 
 @lilypond[verbatim,quote,relative=0]
 \clef "treble_8"
 
 @lilypond[verbatim,quote,relative=0]
 \clef "treble_8"
-<c\5>4 <e\4> <g\3>2
+c4\5 e\4 g2\3
 <c,\5 e\4 g\3>1
 @end lilypond
 
 When fingerings and string indications are used together, their
 <c,\5 e\4 g\3>1
 @end lilypond
 
 When fingerings and string indications are used together, their
-placement is controlled by the order in which the two items appear
-in the code:
+placement can be controlled by the order in which the two items appear
+in the code @emph{only} if they appear inside of an explicit chord:
+applied to whole chords or single notes @emph{outside} of chords,
+fingerings are placed using a different mechanism.
 
 @lilypond[verbatim,quote,relative=1]
 \clef "treble_8"
 
 @lilypond[verbatim,quote,relative=1]
 \clef "treble_8"
-<g\3-0>2
+g4\3-0
+g-0\3
+<g\3-0>
 <g-0\3>
 @end lilypond
 
 <g-0\3>
 @end lilypond
 
@@ -128,7 +127,6 @@ in the code:
 @lilypondfile[verbatim,quote,texidoc,doctitle]
 {allowing-fingerings-to-be-printed-inside-the-staff.ly}
 
 @lilypondfile[verbatim,quote,texidoc,doctitle]
 {allowing-fingerings-to-be-printed-inside-the-staff.ly}
 
-
 @seealso
 Notation Reference:
 @ref{Fingering instructions}.
 @seealso
 Notation Reference:
 @ref{Fingering instructions}.
@@ -223,19 +221,23 @@ symbols = {
 @cindex fret
 
 @funindex minimumFret
 @cindex fret
 
 @funindex minimumFret
+@funindex restrainOpenStrings
 
 By default pitches are assigned to the lowest playing position on the
 fret-board (first position).  Open strings are automatically preferred.
 
 By default pitches are assigned to the lowest playing position on the
 fret-board (first position).  Open strings are automatically preferred.
-If you would like a certain pitch to be played on a specific string
-you can add a string number indication to the pitch name.  If you
-define pitch names and string numbers without a chord construct
-(@code{<>}) the string number indications do not appear in traditional
-notation.  It is much more comfortable to define the playing position
-by using the value of @code{minimumFret}.  The default value for
-minimumFret is 0.
+If you would like a certain pitch to be played on a specific string you
+can add a string number indication to the pitch name.  If you don't want
+to have string number indications appear in traditional notation, you
+can override the respective stencil.  Usually it will be more
+comfortable to define the playing position by using the value of
+@code{minimumFret}.  The default value for minimumFret is 0.
 
 
+Even when @code{minimumFret} is set, open strings are used whenever
+possible.  This behaviour can be changed by setting @code{restrainOpenStrings}
+to @code{#t}.
 
 @lilypond[quote,ragged-right,verbatim]
 
 @lilypond[quote,ragged-right,verbatim]
+\layout { \override Voice.StringNumber.stencil = ##f }
 \new StaffGroup <<
    \new Staff \relative c {
      \clef "treble_8"
 \new StaffGroup <<
    \new Staff \relative c {
      \clef "treble_8"
@@ -248,39 +250,44 @@ minimumFret is 0.
      c16 d e f g4
      c,16\5 d\5 e\4 f\4 g4\4
      \set TabStaff.minimumFret = #5
      c16 d e f g4
      c,16\5 d\5 e\4 f\4 g4\4
      \set TabStaff.minimumFret = #5
+     \set TabStaff.restrainOpenStrings = ##t
      c,16 d e f g4
    }
 >>
 @end lilypond
 
      c,16 d e f g4
    }
 >>
 @end lilypond
 
-@funindex \tabChordRepetition
+@funindex \tabChordRepeats
+@funindex \chordRepeats
+@cindex Chord, repetition
+@cindex repetition, using @code{q}
 
 Chord constructs can be repeated by the chord repetition symbol
 
 Chord constructs can be repeated by the chord repetition symbol
-@code{q}. To use this feature in combination with tablature,
-@code{\tabChordRepetition} is provided.  It preserves the string
-information explicitly given within chord constructs so repeated chords
-get identical tablature representations.
+@code{q}.  In combination with tabulatures, its behavior of removing
+string and finger numbers alongside with other events is cumbersome, so
+you'll want to run
+@example
+\chordRepeats #'(string-number-event fingering-event)
+@end example
+explicitly on music expressions in tabulature using @ref{Chord
+repetition}.  This particular command is so common that it is available
+as @code{\tabChordRepeats}.
 
 @lilypond[quote,verbatim]
 
 @lilypond[quote,verbatim]
-\tabChordRepetition
-
 guitar = \relative c' {
 guitar = \relative c' {
-  r8 <gis\4 cis\3 b\2>~ q4 q8~ q q4
+  r8 <gis-2 cis-3 b-0>~ q4 q8~ q q4
 }
 
 \new StaffGroup <<
   \new Staff {
     \clef "treble_8"
 }
 
 \new StaffGroup <<
   \new Staff {
     \clef "treble_8"
-    \override Voice.StringNumber #'transparent = ##t
     \guitar
   }
   \new TabStaff {
     \guitar
   }
   \new TabStaff {
-    \guitar
+    \tabChordRepeats \guitar
   }
 >>
 @end lilypond
 
   }
 >>
 @end lilypond
 
-
 Ties over a line break are parenthesized by default.  The same holds for
 the second alternative of a repeat.
 
 Ties over a line break are parenthesized by default.  The same holds for
 the second alternative of a repeat.
 
@@ -361,9 +368,6 @@ ties = \relative c' {
 
 @cindex harmonic indications in tablature notation
 @cindex tablature and harmonic indications
 
 @cindex harmonic indications in tablature notation
 @cindex tablature and harmonic indications
-@cindex slides in tablature notation
-@cindex tablature and slides
-@cindex chord glissandi
 @funindex \harmonic
 @funindex \harmonicByFret
 @funindex \harmonicByRatio
 @funindex \harmonic
 @funindex \harmonicByFret
 @funindex \harmonicByRatio
@@ -372,21 +376,26 @@ Harmonic indications can be added to tablature notation as sounding
 pitches:
 
 @lilypond[verbatim,quote]
 pitches:
 
 @lilypond[verbatim,quote]
+\layout { \override Voice.StringNumber.stencil = ##f }
 firstHarmonic = {
 firstHarmonic = {
-  <d'\4\harmonic>4
-  <g'\3\harmonic>4
-  <b'\2\harmonic>2
+  d'4\4\harmonic
+  g'4\3\harmonic
+  b'2\2\harmonic
 }
 \score {
   <<
 }
 \score {
   <<
-    \new Staff { \firstHarmonic }
+    \new Staff {
+      \clef "treble_8"
+      \firstHarmonic
+    }
     \new TabStaff { \firstHarmonic }
   >>
 }
 @end lilypond
 
     \new TabStaff { \firstHarmonic }
   >>
 }
 @end lilypond
 
-Note that the command @code{\harmonic} must always be defined
-inside a chord construct. It only makes sense for open-string harmonics
+Note that the command @code{\harmonic} must always be attached to single
+notes (possibly inside of a chord) instead of whole chords.
+It only makes sense for open-string harmonics
 in the 12th fret. All other harmonics should be calculated by LilyPond.
 This can be achieved by indicating the fret where a finger of the
 fretting hand should touch a string.
 in the 12th fret. All other harmonics should be calculated by LilyPond.
 This can be achieved by indicating the fret where a finger of the
 fretting hand should touch a string.
@@ -400,7 +409,10 @@ fretHarmonics = {
 }
 \score {
   <<
 }
 \score {
   <<
-    \new Staff { \fretHarmonics }
+    \new Staff {
+      \clef "treble_8"
+      \fretHarmonics
+    }
     \new TabStaff { \fretHarmonics }
   >>
 }
     \new TabStaff { \fretHarmonics }
   >>
 }
@@ -417,15 +429,16 @@ ratioHarmonics = {
 }
 \score {
   <<
 }
 \score {
   <<
-    \new Staff { \ratioHarmonics }
+    \new Staff {
+      \clef "treble_8"
+      \ratioHarmonics
+    }
     \new TabStaff { \ratioHarmonics }
   >>
 }
 @end lilypond
 
     \new TabStaff { \ratioHarmonics }
   >>
 }
 @end lilypond
 
-
 @snippets
 @snippets
-
 @lilypondfile[verbatim,quote,texidoc,doctitle]
 {stem-and-beam-behavior-in-tablature.ly}
 
 @lilypondfile[verbatim,quote,texidoc,doctitle]
 {stem-and-beam-behavior-in-tablature.ly}
 
@@ -438,18 +451,24 @@ ratioHarmonics = {
 @lilypondfile[verbatim,quote,texidoc,doctitle]
 {fretted-string-harmonics-in-tablature.ly}
 
 @lilypondfile[verbatim,quote,texidoc,doctitle]
 {fretted-string-harmonics-in-tablature.ly}
 
+@cindex slides in tablature notation
+@cindex tablature and slides
+
 @lilypondfile[verbatim,quote,texidoc,doctitle]
 {slides-in-tablature.ly}
 
 @lilypondfile[verbatim,quote,texidoc,doctitle]
 {slides-in-tablature.ly}
 
+@cindex chord glissandi
+
 @lilypondfile[verbatim,quote,texidoc,doctitle]
 {chord-glissando-in-tablature.ly}
 
 @lilypondfile[verbatim,quote,texidoc,doctitle]
 {chord-glissando-in-tablature.ly}
 
-
 @seealso
 Notation Reference:
 @seealso
 Notation Reference:
-@ref{Stems},
+@ref{Chord repetition},
+@ref{Glissando},
 @ref{Harmonics},
 @ref{Harmonics},
-@ref{Glissando}.
+@ref{Stems},
+@ref{Written-out repeats}.
 
 Snippets:
 @rlsr{Fretted strings}.
 
 Snippets:
 @rlsr{Fretted strings}.
@@ -460,9 +479,7 @@ Internals Reference:
 @rinternals{TabVoice},
 @rinternals{Beam}.
 
 @rinternals{TabVoice},
 @rinternals{Beam}.
 
-
 @knownissues
 @knownissues
-
 Chords are not handled in a special way, and hence the automatic
 string selector may easily select the same string for two notes in
 a chord.
 Chords are not handled in a special way, and hence the automatic
 string selector may easily select the same string for two notes in
 a chord.
@@ -485,6 +502,7 @@ melodia = \partcombine { e4 g g g } { e4 e e e }
 
 Guitar special effects are limited to harmonics and slides.
 
 
 Guitar special effects are limited to harmonics and slides.
 
+
 @node Custom tablatures
 @unnumberedsubsubsec Custom tablatures
 
 @node Custom tablatures
 @unnumberedsubsubsec Custom tablatures
 
@@ -520,14 +538,17 @@ written.
 
 @lilypond[quote,ragged-right,verbatim]
 <<
 
 @lilypond[quote,ragged-right,verbatim]
 <<
-  \new Staff {
+  \new Voice \with {
+    \override StringNumber.stencil = ##f
+  } {
     \clef "bass_8"
     \relative c, {
       c4 d e f
     }
   }
     \clef "bass_8"
     \relative c, {
       c4 d e f
     }
   }
-  \new TabStaff {
-    \set TabStaff.stringTunings = #bass-tuning
+  \new TabStaff \with {
+    stringTunings = #bass-tuning
+  } {
     \relative c, {
       c4 d e f
     }
     \relative c, {
       c4 d e f
     }
@@ -539,7 +560,7 @@ 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
 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
-are found in @file{ly/string-tuning-init.ly}.
+are found in @file{ly/string-tunings-init.ly}.
 
 @funindex stringTuning
 @funindex \stringTuning
 
 @funindex stringTuning
 @funindex \stringTuning
@@ -573,7 +594,7 @@ mynotes = {
     \mynotes
   }
   \new TabStaff {
     \mynotes
   }
   \new TabStaff {
-    \set stringTunings = \stringTuning <c' g' d'' a''>
+    \set Staff.stringTunings = \stringTuning <c' g' d'' a''>
     \mynotes
   }
 >>
     \mynotes
   }
 >>
@@ -589,7 +610,7 @@ for predefined fret diagrams
 The previous example could also be written as follows:
 
 @lilypond[quote,verbatim]
 The previous example could also be written as follows:
 
 @lilypond[quote,verbatim]
-"custom-tuning" = \stringTuning <c' g' d'' a''>
+custom-tuning = \stringTuning <c' g' d'' a''>
 
 mynotes = {
   c'4 e' g' c'' |
 
 mynotes = {
   c'4 e' g' c'' |
@@ -665,7 +686,7 @@ Notation Reference:
 @ref{Scheme functions}.
 
 Installed Files:
 @ref{Scheme functions}.
 
 Installed Files:
-@file{ly/string-tuning-init.ly}
+@file{ly/string-tunings-init.ly},
 @file{scm/tablature.scm}.
 
 Snippets:
 @file{scm/tablature.scm}.
 
 Snippets:
@@ -679,6 +700,7 @@ Automatic tablature calculations do not work properly in most
 cases for instruments where string pitches do not vary
 monotonically with string number, such as ukuleles.
 
 cases for instruments where string pitches do not vary
 monotonically with string number, such as ukuleles.
 
+
 @node Fret diagram markups
 @unnumberedsubsubsec Fret diagram markups
 
 @node Fret diagram markups
 @unnumberedsubsubsec Fret diagram markups
 
@@ -899,8 +921,7 @@ Fingering indications can be included in the fret-diagram-terse markup string.
     }
   }
   \context Staff {
     }
   }
   \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;"
     \clef "treble_8"
     <c e g c' e'>1^\markup {
       \fret-diagram-terse #"x;3-3;2-2;o;1-1;o;"
@@ -974,8 +995,7 @@ capo will be the lowest fret in the fret diagram.
     }
   \context Staff {
     \clef "treble_8"
     }
   \context Staff {
     \clef "treble_8"
-    \override Voice.TextScript
-      #'(fret-diagram-details finger-code) = #'below-string
+    \override Voice.TextScript.fret-diagram-details.finger-code = #'below-string
     <f, c f a c' f'>1^\markup {
       \fret-diagram-verbose #'(
         (place-fret 6 1)
     <f, c f a c' f'>1^\markup {
       \fret-diagram-verbose #'(
         (place-fret 6 1)
@@ -997,7 +1017,7 @@ capo will be the lowest fret in the fret diagram.
         (place-fret 1 3 3)
       )
     }
         (place-fret 1 3 3)
       )
     }
-    <c e g c' e'>1^\markup {
+    <c g c' e' g'>1^\markup {
       \fret-diagram-verbose #'(
         (capo 3)
         (mute 6)
       \fret-diagram-verbose #'(
         (capo 3)
         (mute 6)
@@ -1089,7 +1109,6 @@ Internals Reference:
 @node Predefined fret diagrams
 @unnumberedsubsubsec Predefined fret diagrams
 
 @node Predefined fret diagrams
 @unnumberedsubsubsec Predefined fret diagrams
 
-
 @cindex fret diagrams
 @cindex fret diagrams, ukulele
 @cindex fret diagrams, mandolin
 @cindex fret diagrams
 @cindex fret diagrams, ukulele
 @cindex fret diagrams, mandolin
@@ -1121,7 +1140,7 @@ diagrams can be added for other instruments or other tunings
 by following the examples found in
 @file{predefined-guitar-fretboards.ly}.
 
 by following the examples found in
 @file{predefined-guitar-fretboards.ly}.
 
-Fret diagrams for the ukulele are contained in the file
+Fret diagrams for the ukulele are contained in the file @*
 @file{predefined-ukulele-fretboards.ly}.
 
 @lilypond[verbatim, ragged-right, quote]
 @file{predefined-ukulele-fretboards.ly}.
 
 @lilypond[verbatim, ragged-right, quote]
@@ -1134,12 +1153,12 @@ myChords = \chordmode { a1 a:m a:aug }
 }
 
 \new FretBoards {
 }
 
 \new FretBoards {
-  \set stringTunings = #ukulele-tuning
+  \set Staff.stringTunings = #ukulele-tuning
   \myChords
 }
 @end lilypond
 
   \myChords
 }
 @end lilypond
 
-Fret diagrams for the mandolin are contained in the file
+Fret diagrams for the mandolin are contained in the file @*
 @file{predefined-mandolin-fretboards.ly}.
 
 @lilypond[verbatim, ragged-right, quote]
 @file{predefined-mandolin-fretboards.ly}.
 
 @lilypond[verbatim, ragged-right, quote]
@@ -1152,7 +1171,7 @@ myChords = \chordmode { c1 c:m7.5- c:aug }
 }
 
 \new FretBoards {
 }
 
 \new FretBoards {
-  \set stringTunings = #mandolin-tuning
+  \set Staff.stringTunings = #mandolin-tuning
   \myChords
 }
 @end lilypond
   \myChords
 }
 @end lilypond
@@ -1383,7 +1402,6 @@ the interface properties belong to @code{FretBoards.FretBoard}.
 @lilypondfile[verbatim,quote,texidoc,doctitle]
 {fretboards-alternate-tables.ly}
 
 @lilypondfile[verbatim,quote,texidoc,doctitle]
 {fretboards-alternate-tables.ly}
 
-
 @seealso
 Notation Reference:
 @ref{Custom tablatures},
 @seealso
 Notation Reference:
 @ref{Custom tablatures},
@@ -1392,9 +1410,9 @@ Notation Reference:
 @ref{Predefined fretboard diagrams}.
 
 Installed Files:
 @ref{Predefined fretboard diagrams}.
 
 Installed Files:
-@file{ly/predefined-guitar-fretboards.ly},
-@file{ly/predefined-guitar-ninth-fretboards.ly},
-@file{ly/predefined-ukulele-fretboards.ly},
+@file{ly/predefined-guitar-fretboards.ly}, @*
+@file{ly/predefined-guitar-ninth-fretboards.ly}, @*
+@file{ly/predefined-ukulele-fretboards.ly}, @*
 @file{ly/predefined-mandolin-fretboards.ly}.
 
 Snippets:
 @file{ly/predefined-mandolin-fretboards.ly}.
 
 Snippets:
@@ -1551,7 +1569,6 @@ diagram, the interface properties belong to
 @code{\predefinedFretboardsOn}.
 @endpredefined
 
 @code{\predefinedFretboardsOn}.
 @endpredefined
 
-
 @seealso
 Notation Reference:
 @ref{Custom tablatures}.
 @seealso
 Notation Reference:
 @ref{Custom tablatures}.
@@ -1577,28 +1594,27 @@ with non-monotonic tunings.
 @funindex rightHandFinger
 @funindex \rightHandFinger
 
 @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.
+Right-hand fingerings @var{p-i-m-a} must be entered using
+@code{\rightHandFinger} followed by a number.
 
 
-@warning{There @strong{must} be a hyphen before
-@code{@bs{}rightHandFinger} and a space before the closing @code{>}.}
+@warning{If the number is entered in Scheme notation, remember to append
+a space before following it with a closing @code{>} or similar.}
 
 @lilypond[quote,verbatim,relative=0]
 \clef "treble_8"
 
 @lilypond[quote,verbatim,relative=0]
 \clef "treble_8"
-<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
+c4\rightHandFinger #1
+e\rightHandFinger #2
+g\rightHandFinger #3
+c\rightHandFinger #4
+<c,\rightHandFinger #1 e\rightHandFinger #2
+ g\rightHandFinger #3 c\rightHandFinger #4 >1
 @end lilypond
 
 For convenience, you can abbreviate @code{\rightHandFinger} to something
 short, for example @code{RH},
 
 @example
 @end lilypond
 
 For convenience, you can abbreviate @code{\rightHandFinger} to something
 short, for example @code{RH},
 
 @example
-#(define RH rightHandFinger)
+RH=#rightHandFinger
 @end example
 
 
 @end example
 
 
@@ -1610,7 +1626,6 @@ short, for example @code{RH},
 @lilypondfile[verbatim,quote,texidoc,doctitle]
 {fingerings,-string-indications,-and-right-hand-fingerings.ly}
 
 @lilypondfile[verbatim,quote,texidoc,doctitle]
 {fingerings,-string-indications,-and-right-hand-fingerings.ly}
 
-
 @seealso
 Snippets:
 @rlsr{Fretted strings}.
 @seealso
 Snippets:
 @rlsr{Fretted strings}.
@@ -1650,13 +1665,12 @@ barring indications.
 \clef "treble_8"
 b16 d g b e
 \textSpannerDown
 \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
 
 g16\startTextSpan
 b16 e g e b g\stopTextSpan
 e16 b g d
 @end lilypond
 
-
 @seealso
 Notation Reference:
 @ref{Text spanners}.
 @seealso
 Notation Reference:
 @ref{Text spanners}.
@@ -1681,7 +1695,7 @@ text markup.
 @lilypond[quote,ragged-right,verbatim]
 \relative c' {
   \clef "treble_8"
 @lilypond[quote,ragged-right,verbatim]
 \relative c' {
   \clef "treble_8"
-  \override Staff.NoteHead #'style = #'harmonic-mixed
+  \override Staff.NoteHead.style = #'harmonic-mixed
   d^\markup { \italic { \fontsize #-2 { "harm. 12" }}} <g b>1
 }
 @end lilypond
   d^\markup { \italic { \fontsize #-2 { "harm. 12" }}} <g b>1
 }
 @end lilypond
@@ -1878,8 +1892,8 @@ These may be converted to four-string tunings using the
 @end example
 
 @seealso
 @end example
 
 @seealso
+Installed Files:
+@file{ly/string-tunings-init.ly}.
+
 Snippets:
 @rlsr{Fretted strings}.
 Snippets:
 @rlsr{Fretted strings}.
-
-Installed Files:
-@file{ly/string-tunings-init.ly}