On Sat 20 May 2017 at 17:28:57 (+1000), Don Gingrich wrote:
> I had the idea that all that I needed to
> do to convert a score from, for example, F to G,
> was to wrap a \transpose f g {  } around the
> \relative block where I had entered the notes in
> F. And that is actually correct.

Most of my scores finish with something like:

\score {
  \transpose f g
  \new GrandStaff <<
    \new Staff <<
      \new Voice { \clef treble \global }
      \new Voice { \sopranoi }
      \addlyrics { \textsopranoi }
    >>
    [... other parts ...]
  >>
  \layout { }
}

so it's easy to produce in any suitable key at a moment's notice.

> But it seems that some really weird things happen
> if, as I did recently, one screws up the order and
> has:
> 
> theNotes =  \relative c'' \transpose c d''{ {
>  some notes
> }
> }
> 
> I'm noting this it the hope that it may save someone else
> the agro that I experienced with notes jumping
> all over the place.
> 
> The order is *critical* to having transpose work as
> expected.
> 
> This is sort-of a solution in search of a problem but
> it may save someone else some frustration.

You have to think about what \relative { … } means.
Given *raw* notes in its argument, it transforms them into
absolute pitches by a simple rule (up to a fourth, and
fifths or greater; you know this rule). There's no
"second chance"; it's an input method. The octavation
is baked in, so the expression
   \relative { … }
placed anywhere else is now absolute music.

The expression \transpose X Y { … } is already absolute
so \relative can't do anything to it. OTOH
 \transpose X Y { … \relative {   raw notes   } … }
is a useful, well-formed expression.

If you nest \relative expressions, the inner ones are baked
first, then the outer ones are evaluated, hopping over the
inner, now baked, expressions.

Cheers,
David.

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

Reply via email to