lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re:Tangled up in Lilypond syntax


From: Flaming Hakama by Elaine
Subject: Re:Tangled up in Lilypond syntax
Date: Wed, 27 Mar 2019 15:35:54 -0700

---------- Forwarded message ----------
From: Kieren MacMillan <address@hidden>
To: Guy Stalnaker <address@hidden>
Cc: Tim Slattery <address@hidden>, Lilypond-User Mailing List <address@hidden>
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.  =)

> \new Staff \relative a' {
>    a a a << { \voiceOne a a a } \new Voice { \voiceTwo e b b } >>
> \oneVoice a a a
> }
> \addlyrics { \repeat unfold 10 test }
>
> What I engrave this with LP 2.19.82 the a pitches after the temporary polyphonic context concludes following the \oneVoice are not engraved in the same octave as the a pitches before the temporary polyphonic context. Is that supposed to happen?

Yes: the e in voice two descends (because e is a fourth down from a), and the b descends again (because b is a fourth down from e); at this point, Lilypond is looking for the a closest to the most recent note (the b) and so it descends.

Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: address@hidden



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.

All you need to do to prevent mishaps is to start each distinct segment with a new \relative.
At the minimum, just wrap the new voice in its own \relative.  
Which takes that segment out of the scope of the rest of the enclosed \relative and does not disturb the first voice.

\new Staff \relative a' {
    a a a
    << 
    { \voiceOne a a a } 
    \new Voice \voiceTwo \relative a' { e b b } 
    >> 
\oneVoice a a a
}
\addlyrics { \repeat unfold 10 test }


For maximal protection, especially if you ever cut & paste things and move them to new contexts, or are composing and change things around, it helps to be explicit about each segment:

\new Staff {
    \relative a' { a a a } 
    << 
    \relative a' { \voiceOne a a a } 
    \new Voice \voiceTwo \relative a' { e b b } 
    >> 
\oneVoice \relative a' { a a a }
}
\addlyrics { \repeat unfold 10 test }


HTH,

Elaine Alt
415 . 341 .4954                                           "Confusion is highly underrated"
address@hidden
Producer ~ Composer ~ Instrumentalist ~ Educator
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]