lilypond-user
[Top][All Lists]
Advanced

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

How to remove tags from music returned by \keepWithTag ?


From: Jim Long
Subject: How to remove tags from music returned by \keepWithTag ?
Date: Mon, 9 Mar 2015 22:55:47 -0700
User-agent: Mutt/1.5.23 (2014-03-12)

If I:

music = \relative c'' {
  \tag #'a { a a a a }
  \tag #'b { b b b b }
}

and then:

musicA = \keepWithTag #'a \music

\keepWithTag gives me the equivalent of:

musicA = \relative c'' { \tag #'a { a a a a } }

What I want is:

musicA = \relative c'' { a a a a }

In other words, I'd like to find a function similar to
\keepWithTag, except that the returned music expression would be
entirely free of all tags.  Perhaps even better would be a
general function which simply strips \tag attributes from a music
expression, but leaves the tagged music itself.

Is this possible?

Jim



music = \relative c'' {
  \tag #'a { a a a a }
  \tag #'b { b b b b }
}

musicA = \keepWithTag #'a \music
% Using \keepWithTag gives me:
% musicA = \relative c'' { \tag #'a { a a a a } }
% what I want is:
% musicA = \relative c'' { a a a a }

musicB = \keepWithTag #'b \music

\markup "Music I:"
\score { \music }

\markup "Music II:"
\score { \musicA }

\markup "Music III:"
\score { \keepWithTag #'aardvark \musicA }

\markup "Music IV:"
\score { \musicB }

\markup "Music V:"
\score { \keepWithTag #'beeblebrox \musicB }




reply via email to

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