Here's a patch incorporating your suggestions, Carl.  Thanks for the help.

Jon

On Mon, May 18, 2009 at 8:50 PM, Carl D. Sorensen <c_soren...@byu.edu>wrote:

>
>
>
> On 5/18/09 6:04 PM, "Jonathan Kulp" <jonlancek...@gmail.com> wrote:
>
> > Carl,
> >
> > I'm working on your suggestions and have come across a problem.
> >
> >> \relative c' { \chordmode { c \relative c'' { c }}
> >>
> >
> > This last example won't compile.  (It was missing the last curly brace
> > but I added it.) Here's the terminal output:
> >
> > chordmode.ly:1:40: error: syntax error, unexpected TONICNAME_PITCH
> > \relative c' { \chordmode { c \relative
> >                                          c'' { c }}}
>
> Apparently, you can't use \relative c'' inside of chordmode.  \relative
> needs a note (I think, but am not sure, it's called a NOTENAME_PITCH, not a
> chord, and in chordmode c is read as a tonic for a chord, not as a note
> (hence, a TONICNAME_PITCH).
>
> Interestingly enough, you can get the following to compile:
>
> \relative c' { \chordmode { c \relative  {c}}}
>
> but the result is not at all what I expected, although I can explain it.
>
> I think the knownissue was wrong, and what should be said is
>
> Items inside a \chordmode block are always in absolute mode, even if the
> \chordmode block is in a \relative block.
>
> with an example of
>
> {
>  \relative c'' {\chordmode {c1}}
>  \chordmode {c1}
> }
>
> And the \chordmode section should say
>
> \relative cannot be used inside a \chordmode block.
>
> HTH,
>
> Carl
>
>
>


-- 
Jonathan Kulp
http://www.jonathankulp.com
From 2bc8a54769f112eef85fbbebbfea51a3ecb3f297 Mon Sep 17 00:00:00 2001
From: Jonathan Kulp <j...@bashtop.(none)>
Date: Mon, 18 May 2009 23:05:14 -0500
Subject: [PATCH] DOCS: clarify the effect of \relative on \transpose and \chordmode

---
 Documentation/user/chords.itely  |    7 +++-
 Documentation/user/pitches.itely |   53 ++++++++++++++++++++++++++++++++-----
 2 files changed, 50 insertions(+), 10 deletions(-)

diff --git a/Documentation/user/chords.itely b/Documentation/user/chords.itely
index 9e548ef..c1b6c03 100644
--- a/Documentation/user/chords.itely
+++ b/Documentation/user/chords.itely
@@ -61,6 +61,9 @@ found at @ref{Input modes}.
 
 Chords entered using chord mode are music elements, and can be
 transposed just like chords entered using simultaneous music.
+...@code{\chordmode} is absolute, as @code{\relative} has no effect
+on @code{chordmode} blocks. However, in @code{\chordmode} the
+absolute pitches are one octave higher than in note mode.
 
 Chord mode and note mode can be mixed in sequential music:
 
@@ -141,7 +144,7 @@ Seventh chords can be created:
 The table belows shows the actions of the quality modifiers on
 triads and seventh chords.  The default seventh step added to
 chords is a minor or flatted seventh, which makes the dominant
-seventh the basic seventh chord.  All alterations are relative to 
+seventh the basic seventh chord.  All alterations are relative to
 the dominant seventh.  A more complete table of modifier usage
 is found at @ref{Common chord modifiers}.
 
@@ -231,7 +234,7 @@ Snippets:
 @rlsr{Chords}.
 
 @knownissues
-Only one quality modifier should be used per chord, typically on the 
+Only one quality modifier should be used per chord, typically on the
 highest step present in the chord.  Chords with more than quality
 modifier will be parsed without an error or warning, but the results
 are unpredictable.  Chords that cannot be achieved with a single
diff --git a/Documentation/user/pitches.itely b/Documentation/user/pitches.itely
index 1b7c2c8..d2c9829 100644
--- a/Documentation/user/pitches.itely
+++ b/Documentation/user/pitches.itely
@@ -175,6 +175,47 @@ large intervals:
 }
 @end lilypond
 
+When @code{\relative} blocks are nested, the innermost
+...@code{\relative} block applies.
+
+...@lilypond[verbatim,quote]
+\relative c' {
+  c d e f
+  \relative c'' {
+    c d e f
+  }
+}
+...@end lilypond
+
+...@code{\relative} has no effect on @code{\chordmode} blocks.
+
+...@lilypond[verbatim,quote]
+\new Staff {
+  \relative c''' {
+    \chordmode { c1 }
+  }
+  \chordmode { c1 }
+}
+...@end lilypond
+
+...@code{\relative} is not allowed inside of @code{\chordmode} blocks.
+
+Music inside a @code{\transpose} block is absolute unless a
+...@code{\relative} is included.
+
+...@lilypond[verbatim,quote]
+\relative c' {
+  d e
+  \transpose f g {
+    d e
+    \relative c' {
+      d e
+    }
+  }
+}
+...@end lilypond
+
+
 @cindex chords and relative octave entry
 @cindex relative octave entry and chords
 
@@ -238,13 +279,6 @@ Internals Reference:
 @funindex relative
 
 
-...@knownissues
-
-The relative conversion will not affect @code{\transpose},
-...@code{\chordmode} or @code{\relative} sections in its argument.
-To use relative mode within transposed music, an additional
-...@code{\relative} must be placed inside @code{\transpose}.
-
 @c DEPRECATED
 If no @var{startpitch} is specified for @code{\relative},
 t...@tie{}@code{c'} is assumed.  However, this is a deprecated
@@ -648,6 +682,9 @@ with pitch @var{frompitch} is changed to @var{topitch} and any
 other note is transposed by the same interval.  Both pitches are
 entered in absolute mode.
 
+...@warning{music inside a @co...@bs{}transpose} block is absolute
+unless a @co...@bs{}relative} is included in the block.}
+
 Consider a piece written in the key of D-major.  It can be
 transposed up to E-major; note that the key signature is
 automatically transposed as well.
@@ -734,6 +771,7 @@ see @ref{Instrument transpositions}.
 
 @seealso
 Notation Reference:
+...@ref{relative octave entry},
 @ref{Instrument transpositions}.
 
 Snippets:
@@ -757,7 +795,6 @@ The relative conversion will not affect @code{\transpose},
 To use relative mode within transposed music, an additional
 @code{\relative} must be placed inside @code{\transpose}.
 
-
 @node Displaying pitches
 @subsection Displaying pitches
 
-- 
1.6.0.4

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to