lilypond-user
[Top][All Lists]
Advanced

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

Re: box around notes


From: Klaus Blum
Subject: Re: box around notes
Date: Thu, 9 Apr 2015 08:58:29 -0700 (MST)

Hi David, 


David Nalesnik-2 wrote
> I hope that one day this will be trouble-free!

I didn't know that things can get that complicated when diving deep into a
lily pond... ;-)

David Nalesnik-2 wrote
> How did you arrive at 10000?

Well, I just took some insane value to get above anything else...

David Nalesnik-2 wrote
> Something somewhere has calculated vertical spacing too early, and this
> messes up the positioning of the Beam grob.
> 
> The problem is in the stencil callback for Box, which in your version is
> set to the same function as MusicBoxer.  When you request information
> about
> Y-extent, the function ly:relative-group-extent triggers vertical spacing
> routines before LilyPond is ready.  She must determine line breaks before
> the final stamp is put on the vertical aspect.
> 
> I believe what is needed is a "pure" callback for Y-extent, so that
> LilyPond can make a safe estimate (i.e., without side effects) to use for
> purposes of line-breaking.  

If there is a way to have a separate callback, just to return an estimate
for Y-extent, IMO it would be okay just to return '(0 . 0) because the boxes
don't need to avoid collision with anything. (Just making LilyPond believe
the boxes have no Y-extent maybe could also prevent them pushing away the
dynamics...) 
But if that means not to use ly:relative-group-extent at all, things really
start to get unpleasant... 
In that case, I'd just introduce a user-settable property for Y-extent
instead of hard-coding. At least, the X-extent would be "automatic". Maybe
I'll try that in the evening.

David Nalesnik-2 wrote
> You can read about purity here:
> http://lilypond.org/doc/v2.19/Documentation/contributor/understanding-pure-properties

Yeah, always open to new challenges, even if understanding this will be a
task for a lifetime... I'll be back in a few years. ;-)  
Seriously, I'll give it a try. 

David Nalesnik-2 wrote
> Hope this helps somewhat!

Definitely!

Cheers, 
Klaus




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/box-around-notes-tp35581p174286.html
Sent from the User mailing list archive at Nabble.com.



reply via email to

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