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 06:51:26 +0100

On 5 nov. 2012, at 00:42, Keith OHara <address@hidden> wrote:

> mike <at> mikesolomon.org <mike <at> mikesolomon.org> writes:
> 
>> If a Rest being managed by a RestCollision, a call to Grob::extent with any 
>> common refpoint other than the Rest itself will trigger at some point 
>> Rest_collision:calc_positioning_done ...
>> 
> 
> Not more than once.
> rest-collision.cc:calc_positioning_done() sets 'positioning-done' to true,
> presumably to indicate that it has taken responsibility for positioning all
> the rests within this RestCollision object.
> 

True.  This avoids circular dependencies for the positioning done property, and 
the translate_axis call in force_shift_callback_rest avoids circular dependency 
issues for Y-offset, but there is no protection against circular dependencies 
for the extents.

> Rests in outer voices do not often need to move to avoid rests in inner
> voices, but when they do, it seems to work correctly:
> 
> \new Staff \with {\override StaffSymbol #'staff-space = 0.7 } <<
> \new Voice {\voiceOne r2 g''2}
> \new Voice {\voiceThree r4 e''4 c''2}
> \new Voice {\voiceFour r4. e'8 g'2}
> \new Voice {\voiceTwo r2 c'2} >>
> 

I'm having trouble forcing this to come to the surface - I can only get it to 
trigger in some experimental work.  However, I'm positive that the circular 
dependency exists.  Here's a reduction of what's going on.

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)

Cheers,
MS


reply via email to

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