bug-lilypond
[Top][All Lists]
Advanced

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

Re: \omit dynamic occupies space


From: Thomas Morley
Subject: Re: \omit dynamic occupies space
Date: Wed, 27 Apr 2016 14:18:07 +0200

2016-04-27 12:58 GMT+02:00 David Kastrup <address@hidden>:
> Thomas Morley <address@hidden> writes:
>
>> 2016-04-27 11:25 GMT+02:00 Graham King <address@hidden>:
>>> thanks Harm,
>>>
>>> On Wed, 2016-04-27 at 01:18 +0200, Thomas Morley wrote:
>>>
>>> Hi Graham,
>>>
>>> I guess at the point of time \omit DynamicText is applied the bounds
>>> of the Hairpin (and so the extension of it) is already calculated.
>>>
>>> So \omit DynamicText works, but the Hairpin still keeps it's extension.
>>>
>>>
>>> You know the internals and I don't, but this doesn't seem quite right.
>>> \omit DynamicText seems to produce a hairpin that is slightly longer than
>>> the hairpin produced in the presence of dynamics:
>>
>> Well, obviously I was wrong or at least not entirely correct.
>> The Hairpin, bound by DynamicText, is calculated in a complex manner.
>> I ran against walls before ...
>>
>> Looks like the already established bounds are respected in some way
>> even if their stencil is set #f
>
> Maybe DynamicLineSpanner is also involved in some manner?  I never quite
> got how the dynamics are organized here.


Neither did I, from a more user-pov.

Even suiciding the grob, which is probably the most brute-force, will
not restore the Hairpin exactly:

%% for reference:
%% default Hairpin but without DynamicText
{
  c2\> d e f\!
}

%% applying ly:grob-suicide! without resetting bounds
{
  \override DynamicText.before-line-breaking = #ly:grob-suicide!
  \override DynamicLineSpanner.before-line-breaking =
  #(lambda (grob)
    (write-me "elts " (ly:grob-object grob 'elements))
    (for-each
      (lambda (g)
        (if (eq? (grob::name g) 'DynamicText)
            (ly:grob-suicide! g)))
      (ly:grob-array->list (ly:grob-object grob 'elements)))

    (write-me "elts " (ly:grob-object grob 'elements))
  )
  c2\f\> d e f\p
}

Cheers,
  Harm



reply via email to

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