lilypond-user
[Top][All Lists]
Advanced

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

Tag problem


From: Cynthia Karl
Subject: Tag problem
Date: Sun, 25 Jan 2015 12:56:50 -0600

I'm confused about the "Using tags" subsection of section "3.3.2 Different 
editions from one source":

> Known issues and warnings

> Calling \relative on a music expression obtained by filtering music through 
> \keepWithTag or
> \removeWithTag might cause the octave relations to change, as only the 
> pitches actually remaining
> in the filtered expression will be considered. Applying \relative first, 
> before \keepWithTag
> or \removeWithTag, avoids this danger as \relative then acts on all the 
> pitches as-input.

Consider the following snippet:

\version "2.19.15"
\header { tagline = ##f }

music = {
  \tag #'one {c d e f}
  \tag #'two {c' d e f}
  f e d c
}

\keepWithTag #'one {\relative c' \music}
\keepWithTag #'two {\relative c''\music}

\relative c' {\keepWithTag #'one \music}
\relative c' {\keepWithTag #'two \music}

which produces:

Attachment: tag_problem.pdf
Description: Adobe PDF document


It seems to me that the first output is wrong,and that the problem is fixed by 
disregarding the Known issues and warning section and applying \relative to the 
music after filtering it with \keepWithTag.  Or is the thinking of "{a}pplying 
\relative first" is not meant temporally, but in some other sense.

Is there a way to get correct output from music?  I consider the 3rd and 4th 
outputs to be correct.  (Maybe that's the problem?  If so, is there a way to 
get the last two outputs using tags? and not duplicating the line "f e d c"?)



reply via email to

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