lilypond-user
[Top][All Lists]
Advanced

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

Re: Understanding how \tag works in \relative pitched music


From: Guy Stalnaker
Subject: Re: Understanding how \tag works in \relative pitched music
Date: Fri, 4 Aug 2017 23:51:49 -0500

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" <address@hidden> 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.

reply via email to

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