I tried (again) with PushToTag with no success. And I don't understand why
it doesn't work. Here it is the code:

\version "2.21.00"
\tagGroup #'(screenOut midiOut)
nc = {\tag #'midiOut   <c c'> \tag #'tieTag {} \tag #'screenOut c' }
myScore = {\pushToTag #'tieTag ~ \nc \nc}
\keepWithTag #'screenOut \myScore
\keepWithTag #'midiOut   \myScore


I thought that the previous code would be equivalent to

\keepWithTag #'screenOut \pushToTag #'tieTag ~  {\tag #'midiOut   <c c'>
\tag #'tieTag {} \tag #'screenOut c' } {\tag #'midiOut   <c c'> \tag
#'tieTag {} \tag #'screenOut c' }
\keepWithTag #'midiOut \pushToTag #'tieTag ~  {\tag #'midiOut   <c c'> \tag
#'tieTag {} \tag #'screenOut c' } {\tag #'midiOut   <c c'> \tag #'tieTag {}
\tag #'screenOut c' }

and then to:

{c' c'}
{<c c'>~<c c'>}


Where is my mistake?
Thank you, g.


On Fri, 22 Nov 2019 at 14:01, Gianmaria Lari <gianmarial...@gmail.com>
wrote:

> Hello Aaron,
> made some tests and I discovered where are the issues.
>
> Here is our working code (just a bit simplified):
>
> \version "2.21.0"
> \tagGroup #'(screenOut midiOut)
> nc = {\tag #'midiOut   <c c'> \tag #'screenOut c' }
> myScore = {\nc << \nc <>~ >> \nc}
> \keepWithTag #'screenOut \myScore
> \keepWithTag #'midiOut   \myScore
>
> It works as desired (by me). It generates two scores. I attached to this
> email.
>
> Now two issues.
> 1) The code stop to works if I remove the highlighted element from myScore
> = {\nc << \nc <>~ >> \nc}. Here it is the new code
>
>
> \version "2.21.0"
> \tagGroup #'(screenOut midiOut)
> nc = {\tag #'midiOut   <c c'> \tag #'screenOut c' }
> myScore = {<< \nc <>~ >> \nc}
> \keepWithTag #'screenOut \myScore
> \keepWithTag #'midiOut   \myScore
>
>
> I think the issue is related to implicite voice creation but in this
> situation I have not a clear idea how to fix it. Any help?
>
> 2) The code doesn't work with articulate script, it generates a warning
> and the ties disappear (tried with version 2.21.0 and 2.19.83). Here it is
> the code that doesn't work:
>
> \version "2.21.0"
> \include "articulate.ly"
> \tagGroup #'(screenOut midiOut)
> nc = {\tag #'midiOut   <c c'> \tag #'screenOut c' }
> myScore = {\nc {<< \nc <>~ >> \nc}}
> *\articulate *\keepWithTag #'screenOut \myScore
> *\articulate *\keepWithTag #'midiOut   \myScore
>
>
> Is there anything we can do?
>
> Thank you, g.
>
>>

Reply via email to