lilypond-devel
[Top][All Lists]
Advanced

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

Re: Tied accidentals in chords still taking up space


From: Chris Snyder
Subject: Re: Tied accidentals in chords still taking up space
Date: Sat, 28 Mar 2009 12:55:14 -0400
User-agent: Thunderbird 2.0.0.21 (X11/20090319)

I've uploaded my patch to Rietveld:
http://codereview.appspot.com/28134

(lilypond-devel is cc'd, but the main address on my Google account is
different than the one I use here, so I'm not sure if messages it's
sending to the list will go through)

Joe Neeman wrote:
> I think you should do it as soon as you clone() the accidental (in
> Accidental_placement::add_accidental perhaps?).

I couldn't do it there because the accidental_placement didn't have a
full family tree going back to a system. I changed accidental_engraver
to create both copies of the accidentals, and announced them there.

> That would be better, yes. You can determine which accidental is the
> right one using the same logic as Accidental::print. Note that this
> logic is only valid after the line-breaking has taken place, so you
> should note that in the documentation in scm/define-grob-properties.scm.

That approach worked well. I had to change all of the
get_object("accidental-grob") calls to get_property to have the callback
get called, though I'm not really sure what the difference between those
two functions is otherwise.

> In Accidental::print, are the correct accidentals committing suicide?
> You might need to change the logic there.

That was the problem.

> I can't think why the accidentals would be printed over the noteheads,
> though. You might get a clue if you check the value of
> ape->grobs_[j]->relative_coordinate(common[X_AXIS], X_AXIS) after
> accidental-placement.cc:397.

The reason that the accidentals were being printed over the noteheads is
that the wrong accidentals were being printed. Those incorrect
accidentals should never have the possibility of being printed, so they
had no spacing calculations done to them. Everything worked fine once I
told the correct accidentals to commit suicide and announced the copied
accidentals properly.

Thanks,

-Chris




reply via email to

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