[Top][All Lists]

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

Re: Pure properties

From: address@hidden
Subject: Re: Pure properties
Date: Wed, 25 May 2011 00:05:01 +0200

On May 24, 2011, at 11:08 AM, Joe Neeman wrote:

A pure callback is one that has no side-effects. In define-grobs.scm, you will find a list of pure callbacks, along with an associative list that allows you to substitute a non-pure callback for a pure one.

Pure callbacks are important for spacing and page-breaking, particularly pure Y-extent and Y-offset callbacks. For example, a slur cannot know its true Y-extent until after the page breaks, line breaks, and horizontal spacing have been completed. But we need to know its Y-extent while computing the page breaking, so we can see if things fit on a page without collisions; hence ly:slur::pure-height.


Thanks Joe!
So, if I understand you correctly, ly:slur::pure-height provides a side-effectless approximation that is useful for other functions, whereas the real height is what is calculated after all of the line breaking has been done?
Is there ever a case, then, where the approximated pure property differs so greatly from the actual property that the erroneous first-pass approximation leads to bad typsetting?


On Tue, May 24, 2011 at 10:31 AM, address@hidden <address@hidden> wrote:
Hey all,

I think I've asked this question before, but I can't find the response - sorry if I'm repeating myself!

Could someone please send me a paragraph-long response about what pure properties are and how/when/why they're used?  The more sequential, the better (i.e. pure properties are defined in X for the purpose of doing Y when lilypond hits function Z).  git grep shows the word `pure' all over the place, and I feel kinda stupid not knowing what pure means in the LilyPond lingo. I'm writing a patch right now that allows LilyPond to do multiple passes through a score to fix several spacing issues I've run into, and before taking it on seriously I'd like to fill this gap in my knowledge of the program.

lilypond-devel mailing list

lilypond-devel mailing list

reply via email to

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