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