[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 i
From: |
Joe Neeman |
Subject: |
Re: Tied accidentals in chords still taking up space (was: Issue 415 in lilypond: Hidden accidental of tied note still takes space) |
Date: |
Sat, 28 Mar 2009 20:17:49 -0700 |
On Sat, 2009-03-28 at 22:51 -0400, Chris Snyder wrote:
> On Saturday, March 28, 2009, Joe Neeman wrote:
> > The problem is that the current support for conditional accidentals is
> > insufficient if there are multiple accidentals, not all of which are
> > tied (see bug 612). The reason is that the positions of all the
> > accidentals can change completely when an accidental is added or
> > removed. So I think we need to run the whole layout algorithm twice,
> > once with the conditional accidentals and once without, and I suggested
> > that copying all of the accidentals is the simplest way to do it. I
> > realize that this goes against the convention of only cloning items in
> > the breakable columns, but I don't see another way to do it; the
> > formatting of such accidentals seems to be completely tied to their
> > break status which justifies copying them for the same reason that we
> > copy items in the breakable columns.
>
> The only other way I see to do it would be to have each accidental
> actually store two sets of spacing properties, and reference the correct
> one depending on line-breaking. This approach doesn't seem any better to
> me than what you've proposed.
>
> >> I've glossed over the patch, and I am less than enthused: it seems to
> >> add a lot of special casing and duplicate code for the reminder and
> >> normal accidentals, and I have seen very dubious constructs like
> >> get_property("accidental-grob") rather than get_object.
> >
> > I'll review the code shortly; I agree that it should be get_object.
>
> I changed the get_object calls to get_property because the accidental-grob
> callback I added to notehead to return the correct accidental grob wasn't
> being called. What is the difference between objects and properties,
> anyways?
get_object retrieves things from the object_alist_, which contains
pointers to grobs and arrays of pointers to grobs. get_property
retrieves things from the mutable_ or immutable_property_alist_, which
contains everything else. There is some break-substitution magic that
has to happen to the grob pointers, hence the separation. When you set a
property in define-grobs.scm, it sets that property in the
immutable_property_alist_, and so you need to retrieve it with
get_property. Instead of using define-grobs.scm, you should use
set_object in the C++ code (in accidental-engraver, I would suggest).
Other comments are coming soon on the web interface...
Joe
- Re: Tied accidentals in chords still taking up space (was: Issue 415 in lilypond: Hidden accidental of tied note still takes space), Chris Snyder, 2009/03/26
- 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/26
- 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, 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), 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