lilypond-devel
[Top][All Lists]
Advanced

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

Re: Issue 3918: Add \alternatingTimeSignatures (issue 97110045)


From: Paul Morris
Subject: Re: Issue 3918: Add \alternatingTimeSignatures (issue 97110045)
Date: Sun, 18 May 2014 10:28:40 -0700 (PDT)

David Kastrup wrote
>> As a first step (just working with \override X.X.stencil =) could there
>> be
>> an easier way to just override a stencil with a markup (that gets
>> converted
>> into a stencil)?
> 
> That would end up a very invasive mess.  A stencil is really a stencil
> and referenced as such.  Stencils intended to be replaceable with
> markups tend to have ly:text-interface::print as their function which
> then references the markup in the "text" property.
> 
>> \override Score.TimeSignature.stencil = 
>>   \markup \fraction-list "-" #'((6 8)(5 4))
>>
>> Maybe LilyPond could automatically convert a markup into a stencil for
>> you
>> in this case?  (Maybe that's a bad idea since it would obscure the
>> difference between markups and stencils?)  Or if you could manually
>> convert
>> the markup to a stencil with something like:
>>
>> \override Score.TimeSignature.stencil = 
>>   \markupToStencil \markup \fraction-list "-" #'((6 8)(5 4))
> 
> Markups cannot be converted to stencils without knowledge of the
> respective layout/properties.  They can be derived from a grob, but
> something like \markupToStencil does not have an inherent relation to a
> grob: if \markupToStencil were to return a grob callback (like you can
> use in a stencil override), it would magically fail to work as a stencil
> anywhere but in a stencil override.  So it makes more sense to devise a
> command that _includes_ the stencil override (or tweak) since it will
> not work as a stencil anywhere else.

Good point, \markupToStencil wouldn't work outside of a stencil override.  I
hadn't thought about that.

Just to make sure I'm communicating my other idea (above)... you're saying
the following wouldn't work well either (but would end up an invasive mess)?  

The code that handles overriding stencils could accept either a stencil or a
markup, and when it received a markup it would convert it to a stencil using
grob-interpret-markup, since it always has access to the grob and thus the
layout/properties.  

You know the code and I trust your judgement.  I'm just curious.  In any
case, a command like \appearance would get the job done and be simpler for
the user.  I suppose it could accept either a markup or a stencil and just
pass the stencil through to the override (or tweak) if a stencil was
supplied.

-Paul



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Re-Issue-3918-Add-alternatingTimeSignatures-issue-97110045-tp162462p162562.html
Sent from the Dev mailing list archive at Nabble.com.



reply via email to

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