lilypond-user
[Top][All Lists]
Advanced

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

Re: Tie multiple voice music contained in variable


From: Aaron Hill
Subject: Re: Tie multiple voice music contained in variable
Date: Wed, 13 Nov 2019 04:47:05 -0800
User-agent: Roundcube Webmail/1.3.8

On 2019-11-13 3:37 am, Gianmaria Lari wrote:
Ciao Aaron,

[....]

And you can use tags if you need the tie to be conditional:

%%%%
\version "2.19.83"

multipleVoiceConditionalTie = \fixed c' {
   << { g4 \tag #'tie a~ \tag #'noTie a } \\ { e2 } >>
}


Yes, I didn't forget tags; but to me they are syntactically difficult to use. I always make million of mistakes before my code compiles correctly so
I keep them as a last resort.

Well, it turns out I forgot that \tag can be used as a post-event, which means my earlier snippet can be simplified:

%%%%
\version "2.19.83"

multipleVoiceConditionalTie = \fixed c' {
  << { g4 a-\tag #'tie ~ } \\ { e2 } >>
}
multipleVoiceFollowingPhraseI = \fixed c' {
  << { a2 } \\ { d4 f } >>
}
multipleVoiceFollowingPhraseII = \fixed c' {
  << { a4 b } \\ { f2 } >>
}
multipleVoiceFollowingPhraseIII = \fixed c' {
  << { b2 } \\ { g2 } >>
}

{ \multipleVoiceConditionalTie \multipleVoiceFollowingPhraseI
  \multipleVoiceConditionalTie \multipleVoiceFollowingPhraseII
  \removeWithTag #'tie \multipleVoiceConditionalTie
    \multipleVoiceFollowingPhraseIII }
%%%%

The advantage here is that you do not have to duplicate the final note/chord when defining the variable since only the tie itself is tagged. Also, it is not needed to use \keepWithTag since the tie would come along for the ride anyway. So then you only need to use \removeWithTag in the case when you want to omit the tie.


-- Aaron Hill



reply via email to

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