[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tied accidentals in chords still taking up space (was: Issue 415 in
From: |
Han-Wen Nienhuys |
Subject: |
Re: Tied accidentals in chords still taking up space (was: Issue 415 in lilypond: Hidden accidental of tied note still takes space) |
Date: |
Sun, 29 Mar 2009 12:17:25 -0300 |
On Sun, Mar 29, 2009 at 6:31 AM, Joe Neeman <address@hidden> wrote:
>> I am worried that this will lead to all kinds of other problems, when
>> other callbacks try to follow head -> accidental links, and screw up
>> because they end up at the wrong accidental object.
> Requesting note_head->accidental_grob before line-breaking is likely to
> be fragile anyway, because the accidental could always suicide...
Yes, with the copying approach, you have to run a substitution on
every grob that may link to the accidental. Or you have to keep the
indirection in the accidental itself, and every caller must remember
to do Accidental::active_accidental () (or similar) to get to the
accidental which is actually live.
>> Is it not possible
>> to have accidental place calculate two sets of offsets, and add some
>> logic to make sure that the actual stencil and placement calculation
>> does not get triggered during line breaking? Then after the
>> linebreaking, one set of placements is used for positioning the
>> accidentals. Of course there will be some ugly hacks needed (similar
>> to the conditional skyline support) to extract the correct outline of
>> the accidentals during spacing/linebreaking.
>
> I'm not sure it would be easier, but it's worth checking out anyway.
> Chris, could you try adding
>
> Skyline Accidental_placement::conditional_skyline(Grob* me, Grob* left)
>
> ?
> This function would run the accidental layout algorithm on the correct
> (with respect to "left") set of accidentals but without actually calling
> translate_axis on the accidentals. Instead, it would just return the
> left_skyline that results from the accidental placement (ie, the value
> of left_skyline_ at accidental-placement.cc:391). Then add
>
> Skyline Accidental_placement::conditional_skyline(vector<Grob*> const&
> elts, Grob* left)
>
> which merges the results of conditional_skyline(me, left) for each me in
> elts. Finally, modify Separation_item::conditional_skyline to return
> this skyline. This should prevent any of the accidentals from being
> translated until after line-breaking.
sounds good to me.
--
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen
- Re: Tied accidentals in chords still taking up space, (continued)
Re: Tied accidentals in chords still taking up space (was: Issue 415 in lilypond: Hidden accidental of tied note still takes space), Han-Wen Nienhuys, 2009/03/28
Re: Tied accidentals in chords still taking up space (was: Issue 415 in lilypond: Hidden accidental of tied note still takes space), Han-Wen Nienhuys, 2009/03/29
Re: Tied accidentals in chords still taking up space (was: Issue 415 in lilypond: Hidden accidental of tied note still takes space), Han-Wen Nienhuys, 2009/03/29
Re: Tied accidentals in chords still taking up space (was: Issue 415 in lilypond: Hidden accidental of tied note still takes space), Joe Neeman, 2009/03/29
Re: Tied accidentals in chords still taking up space (was: Issue 415 in lilypond: Hidden accidental of tied note still takes space),
Han-Wen Nienhuys <=
Re: Tied accidentals in chords still taking up space (was: Issue 415 in lilypond: Hidden accidental of tied note still takes space), Mark Polesky, 2009/03/29
Re: Tied accidentals in chords still taking up space (was: Issue 415 in lilypond: Hidden accidental of tied note still takes space), Han-Wen Nienhuys, 2009/03/29