lilypond-user
[Top][All Lists]
Advanced

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

Re: How to remove tags from music returned by \keepWithTag ?


From: Thomas Morley
Subject: Re: How to remove tags from music returned by \keepWithTag ?
Date: Tue, 10 Mar 2015 10:49:05 +0100

2015-03-10 6:55 GMT+01:00 Jim Long <address@hidden>:
> 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 }
>
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user

Something in
http://lsr.di.unimi.it/LSR/Item?id=871
which matches your needs?
(didn't test myself)

Cheers,
  Harm



reply via email to

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