So it's an Order of Operations issue. Pitches entered using \relative are
first converted to absolute then the selection using \tag conditional.

Which suggests that \tag used with \relative will never work.

Thanks.

On Aug 4, 2017 10:45 PM, "David Wright" <lily...@lionunicorn.co.uk> wrote:

> On Fri 04 Aug 2017 at 15:41:34 (-0500), Guy Stalnaker wrote:
> > All,
> >
> > Why is this output being created? I would expect to get exactly the same
> > pitches on all three staffs, but since not, my expectations are obviously
> > wrong.
> >
> > %% SNIPPET %%
> > ​straightMusic = \relative c' {
> >   a2 _\markup { no tag, relative pitch } cis4 e |
> >   fis1 |
> > }
> >
> > clarinetOneMusic = \relative c' {
> >   \set Score.markFormatter = #format-mark-box-numbers
> >   \tag #'mark { \mark \default a2 _\markup { tag mark, relative pitch }
> > cis4 e | }
> >   \tag #'no-mark { a2 _\markup { tag no-mark, relative pitch } cis4 e | }
> >   fis1 |
> > }
>
> Here are the pitches you have entered:
>
> straightMusic = \relative c' { a2 cis4 e fis1 }
>
> clarinetOneMusic = \relative c' { a2 cis4 e a2 cis4 e fis1 }
>
> These pitches are interpreted during _input_ of the source and
> become absolute pitches as they are read. They are now absolute
> and stay that way.
>
> You have then selected a different set of notes (each with an absolute
> pitch) for each staff by using tags, and then transposed them.
>
> In other words, \relative { … } is a one-shot, immediate input process
> for making melodic input more convenient (for those of us who like it).
>
> Bear in mind that if \relative { … } contains notes that are already
> absolute, eg,
> \relative { … \absolute { A } … \transpose { T } … \relative { R } … }
> the outer \relative does not reprocess A, T and R because they're
> already absolute. (R is processed by the inner \relative first.)
> Only the "…" notes are processed by the outer \relative.
>
> Cheers,
> David.
>
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to