lilypond-devel
[Top][All Lists]
Advanced

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

Re: More nuanced BarLine extra-spacing-height to allow tighter horizonta


From: David Kastrup
Subject: Re: More nuanced BarLine extra-spacing-height to allow tighter horizontal spacing (issue 5434104)
Date: Mon, 05 Dec 2011 09:17:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)

"address@hidden" <address@hidden> writes:

> Le Dec 5, 2011 à 8:52 AM, address@hidden a écrit :
>> 
>>> IF .NOT.has-span-bar(UP)
>>>   esh(UP) = min(esh(UP), 1.01)
>>> ENDIF
>>> IF .NOT.( has-span-bar(DOWN).AND.allow-span-bar )
>>>   esh(DOWN)= max(esh(DOWN), -1.01)
>>> ENDIF
>> 
>> No, this is just Mike's entry for the obfuscated programming contest.
>
> Winner for 2 straight years and running!
>
>> This actually is just
>> 
>> (define-public (pure-from-neighbor-interface::account-for-span-bar grob)
>>  (let* ((esh (pure-from-neighbor-interface::extra-spacing-height grob))
>>         (hsb (ly:grob-property grob 'has-span-bar))
>>       (ii (interval-intersection esh (cons -1.01 1.01)))
>>    (if (pair? hsb)
>>      (cons (car (if (and (cdr hsb)
>>                          (ly:grob-property grob 'allow-span-bar))
>>                     esh ii))
>>            (cdr (if (car hsb) esh ii)))
>>      ii))))
>> 
>> 
>
>
> I'll test this out after I push the hairpin patch, which does some
> finagling with has-span-bar.

It is likely that some of Keith's simplification would also apply in
addition.  I was only rewriting the function itself without considering
interval-intersection as anything but a black box.

-- 
David Kastrup




reply via email to

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