On 2019-03-27 3:35 pm, Flaming Hakama by Elaine wrote:
---------- Forwarded message ----------
From: Kieren MacMillan <kieren_macmil...@sympatico.ca>
To: Guy Stalnaker <jimmyg...@gmail.com>
Cc: Tim Slattery <t...@risingdove.com>, Lilypond-User Mailing List <
lilypond-user@gnu.org>
Date: Tue, 26 Mar 2019 15:16:03 -0400
Subject: Re: Tangled up in Lilypond syntax
Hi Guy,
> While I don't use \relative
Good choice. =)
The issue is not \relative, per se. I wish people would stop maligning
it. Although I'm sure this commentary is all in good fun.
The issue is not using it correctly.
I tend to think of something like \relative to be a lower-level
construct, intended to be used as close as possible to the pitches in
question. Since I try to keep things organized in variables where
content and structure are not intermixed, \relative never appears at a
higher-level scope in my work.
The only time I have to be careful with \relative is when using \tagged
expressions:
%%%%
melody = \relative c' {
| c4 d \tag #'varIA { e2 }
\tag #'varIB { e8 f g4 }
| c4 d c2
}
%%%%
I employ this pattern as often melody lines will vary from stanza to
stanza, but I wish to avoid unnecessary duplication. The intention is
that only one of the variations will be active. However, I have to
remember that \relative will apply before tagged music is removed. (The
corresponding \keepWithTag occurs at the Score level in my usage.) That
means the g4 ending the second variation will force the following c4 up
an octave compared to the initial c4. Of course, this behavior is
actually a good thing, as it ensures the music is always interpreted
consistently, regardless of the presence or absence of tagged
expressions.
But it has on occasion surprised me when I forgot to compensate for the
shifting octave. And more often than not, it is just plain user error
where I intended to type a comma and typed an apostrophe. Always fun
watching your melody lines run off the edge of the paper. ;-)
-- Aaron Hill
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user