lilypond-devel
[Top][All Lists]
Advanced

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

Re: Design flaw in Rest_collision


From: address@hidden
Subject: Re: Design flaw in Rest_collision
Date: Mon, 5 Nov 2012 09:38:10 +0100

On 5 nov. 2012, at 09:34, David Kastrup <address@hidden> wrote:

> "address@hidden" <address@hidden> writes:
> 
>> On 5 nov. 2012, at 09:26, David Kastrup <address@hidden> wrote:
>> 
>>> "address@hidden" <address@hidden> writes:
>>> 
>>>> On 5 nov. 2012, at 09:19, David Kastrup <address@hidden> wrote:
>>>> 
>>>>> "address@hidden" <address@hidden> writes:
>>>>> 
>>>>>> On 5 nov. 2012, at 06:51, address@hidden wrote:
>>>>>> 
>>>>>>> 1) rest->extent (common, Y_AXIS)
>>>>>>> 2) Rest::height
>>>>>>> 3) Rest::generic_extent_callback
>>>>>>> 4) Rest::brew_internal_stencil
>>>>>>> 5) Rest::glyph_name
>>>>>>> 6) Staff_symbol_referencer::get_position
>>>>>>> 7) rest->relative_coordinate (common, Y_AXIS);
>>>>>>> 8) Rest_collision::force_shift_callback_rest
>>>>>>> 9) Rest_collision::calc_positioning_done
>>>>>>> 10) rest->extent (common, Y_AXIS)
>>>>>> 
>>>>>> A better way to describe it just to wrap heads around it, with the
>>>>>> circular dependency underlined:
>>>>>> 
>>>>>> Rest extents depend on their stencil.  This stencil depends on
>>>>>> placement on/off the staff.  Placement may depend on the placement of
>>>>>> other rests.  To calculate the placement of other rests, we need to
>>>>>> shift all of them.  The amount of space one must shift depends on the
>>>>>> extent of the rest.
>>>>> 
>>>>> The co-dependent shifts should likely be done by Note_column.  About the
>>>>> rest dimensions used for that: I'd likely just pick the on-staff glyph,
>>>>> as the off-staff glyphs just differ by ledger lines IIRC.
>>>>> 
>>>>> Keep in mind that this advice is not based on any actual knowledge about
>>>>> the backend, so it is entirely possible that it is a bunch of nonsense.
>>>>> 
>>>> 
>>>> We're on the same wavelength - this is how rest pure height is
>>>> calculated.  That's what I've done for now in the code I'm working on
>>>> to be able to keep working.  It's ugly, tho, as it requires an
>>>> exception for rests (rest ? use pure height : use height).
>>> 
>>> Would the problem not be the same with notes? They depend on things like
>>> beam scoring, and also have the ledger line situation.
>> 
>> The placement of notes does not depend on beam scoring.  As for ledger
>> lines, ledger lines for notes are always a spanner and never built
>> into the glyph.  Their width is not taken into account in any
>> horizontal spacing equations unless approximations are done (see, for
>> example, Note_head::include_ledger_line_height).
> 
> Do the different rest glyphs actually have different height?  Would it
> be possible to stipulate that they are not supposed to, and just let the
> code for rest height in general return the height of the standard rest
> glyph without bothering to check the on-staffiness?

I wanna say that they do (it'd be a difference of half a ledger line) but I 
could be wrong.  I know nothing about metafont - someone more competent than I 
would have to check.

Cheers,
MS




reply via email to

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