partCombine confused by tags

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

partCombine confused by tags

David Sumbler
I have just spent half a day trying to work out why one staff in my
orchestral score extends beyond the final barline.

Eventually I found out that it is because \partCombine seems only
partially to understand tags.

The following example illustrates this:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.21.2"

instA = {
  b'4
  \tag #'versionI c''
  \tag #'versionII d''
  b'2 }
instB = {
  g'4 g' g'2 }

\score {
  \keepWithTag #'(versionI)
  \partCombine \instA \instB
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

PartCombine chooses the notes for the instA line in accordance with the
tags, but adds a crotchet's worth of staff after the end of the
passage.

It also does not correctly combine the parts after the tagged section.
However, this can be got around by adding a \partCombineChords
instruction before the 3rd beat of the bar.

Does anyone know of a way of correcting the extended staff?

David


Reply | Threaded
Open this post in threaded view
|

Re: partCombine confused by tags

David Kastrup
David Sumbler <[hidden email]> writes:

> I have just spent half a day trying to work out why one staff in my
> orchestral score extends beyond the final barline.
>
> Eventually I found out that it is because \partCombine seems only
> partially to understand tags.

That is a misstatement.  \partCombine does not use tags in any manner.
It plays the music it is given and records the results.  Then it
combines the played results.  I am surprised that \keepWithTag should
actually be doing anything here.

> The following example illustrates this:
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> \version "2.21.2"
>
> instA = {
>   b'4
>   \tag #'versionI c''
>   \tag #'versionII d''
>   b'2 }
> instB = {
>   g'4 g' g'2 }
>
> \score {
>   \keepWithTag #'(versionI)
>   \partCombine \instA \instB
> }

That won't work.  You need to use
\partCombine \keepWithTag versionI \instA \instB

instead.

> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> PartCombine chooses the notes for the instA line in accordance with the
> tags, but adds a crotchet's worth of staff after the end of the
> passage.
>
> It also does not correctly combine the parts after the tagged section.
> However, this can be got around by adding a \partCombineChords
> instruction before the 3rd beat of the bar.
>
> Does anyone know of a way of correcting the extended staff?
>
> David
>
>
>

--
David Kastrup

Reply | Threaded
Open this post in threaded view
|

Re: partCombine confused by tags

David Sumbler

On Thu, 2020-08-20 at 20:06 +0200, David Kastrup wrote:

> David Sumbler <[hidden email]> writes:
>
> > I have just spent half a day trying to work out why one staff in my
> > orchestral score extends beyond the final barline.
> >
> > Eventually I found out that it is because \partCombine seems only
> > partially to understand tags.
>
> That is a misstatement.  \partCombine does not use tags in any
> manner.
> It plays the music it is given and records the results.  Then it
> combines the played results.  I am surprised that \keepWithTag should
> actually be doing anything here.
>
> > The following example illustrates this:
> >
> > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> > \version "2.21.2"
> >
> > instA = {
> >   b'4
> >   \tag #'versionI c''
> >   \tag #'versionII d''
> >   b'2 }
> > instB = {
> >   g'4 g' g'2 }
> >
> > \score {
> >   \keepWithTag #'(versionI)
> >   \partCombine \instA \instB
> > }
>
> That won't work.  You need to use
> \partCombine \keepWithTag versionI \instA \instB
>
> instead.
>
> > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> >
> > PartCombine chooses the notes for the instA line in accordance with
> > the
> > tags, but adds a crotchet's worth of staff after the end of the
> > passage.
> >
> > It also does not correctly combine the parts after the tagged
> > section.
> > However, this can be got around by adding a \partCombineChords
> > instruction before the 3rd beat of the bar.
> >
> > Does anyone know of a way of correcting the extended staff?
> >
> > David

Thank you for that.  I have now corrected all the parts in my score to
include the \keepWithTag directive as directed.  Not only has it solved
the problem of the extended staff, but it appears that it may also have
solved the intermittent Segmentation Faults I was getting.

I have used \keepWithTag in a Score context before, and it does not
seem to have caused any problems - but then I wasn't using
\partCombine.

David