On Sat 09 May 2026 at 22:43:56 (-0700), Walt North wrote:
> I have a case where at times I want the notes to go up one octave and
> other times not.  I was thinking I could use tags to accomplish this. 
> But the tag seems to be ignored. The result always jumps an octave.

AIUI \relative { … } is an /input/ method: its rules apply as the
pitches (the "…") are read.

> testNotes =  \relative c' {
>   \tag #'testTag1 {
>   c1
>   \tag #'testTag2 \resetRelativeOctave c''
>   c1
>   }
> }

At the end of reading them, testNotes is handed a load of
/absolute/ pitches.

> \score {
>   \keepWithTag  #'(testTag1) \testNotes
> }

By this time, the tags are impotent.

You could split the testNotes into two sections, testNotesPartA
and testNotesPartB, and then write scores like:

  \score {
    \testNotesPartA
    \testNotesPartB
  }

and

  \score {
    \testNotesPartA
    \transpose c c' { \testNotesPartB }
  }

to get the effects you want. Perhaps you can tag a construction
like the following to make partB into one of two alternatives:

  \score {
    \testNotesPartA
    «some sort of tag» \testNotesPartB
    «another sort of tag» \transpose c c' { \testNotesPartB }
  }

(IDK, I've never used tags.)

Cheers,
David.

Reply via email to