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: Martin Neubauer
Subject: Re: Understanding how \tag works in \relative pitched music
Date: Sat, 5 Aug 2017 05:37:31 +0200
User-agent: Mozilla/5.0 (X11; FreeBSD i386; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

Maybe someone more well-versed with the inner workings of lilypond might
correct me here, but as I understand it, the pitches depend on the
sequence of notes in the input, regardless of any tags that might be
attached to some of them. Conversely, when \keepWithTag (or any of the
related commands) get evaluated, the pitches are already fixed.

On 04/08/2017 22:41, 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 |
> }
Not tested, but this might achieve what you want, while being somewhat
more predictable:

clarinetOneMusic = \relative c' {
  \set Score.markFormatter = #format-mark-box-numbers
  \tag #'mark { \mark \default <> _\markup { tag mark, relative pitch }}
  \tag #'no-mark { <> _\markup { tag no-mark, relative pitch } }
  a2 cis4 e |
  fis1 |
}
> 
> \score {
>   <<
>     \new Staff {
>       \transpose bes c' \straightMusic
>     }
>     \new Staff {
>       \keepWithTag #'mark
>       \transpose bes c' \clarinetOneMusic
>     }
>     \new Staff {
>       \keepWithTag #'no-mark
>       \transpose bes c' \clarinetOneMusic
>     }
>   >>
>   \layout { }
> }
> %% SNIPPET %%​
> 
> ​Inline image 1​
> 
> 
> Guy Stalnaker
> address@hidden <mailto:address@hidden>
> 
> 
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
> 
-- 
Good People Wanted and Managers too!

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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