lilypond-devel
[Top][All Lists]
Advanced

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

Re: [Pseudo-patch] Add support for HairpinText indications. (issue350904


From: v . villenave
Subject: Re: [Pseudo-patch] Add support for HairpinText indications. (issue3509041)
Date: Wed, 08 Dec 2010 08:09:15 +0000

[I should probably subscribe the codereview mail address to Frogs- and
move the discussion there.]

Thanks Neil! I've now tried to make a proper Spanner, which raises more
questions of course (namely, how to properly start and finish it): right
now there's no segfault anymore, but a "must have Item for spanner
bound" error.

I'll keep looking :-)

Thanks!


http://codereview.appspot.com/3509041/diff/3001/lily/new-dynamic-engraver.cc
File lily/new-dynamic-engraver.cc (right):

http://codereview.appspot.com/3509041/diff/3001/lily/new-dynamic-engraver.cc#newcode147
lily/new-dynamic-engraver.cc:147: hairpin_text_ = make_item
("HairpinText", hairpin_text_->self_scm ());
On 2010/12/08 01:09:38, Neil Puttock wrote:
I suspect this is part of where your segfault comes from: you can't
make the
cause of a grob the grob itself :)

Interesting.  I hadn't understood that the second argument was the grob
cause, but that makes sense. (I guess that's why many grobs are created
with make_item ("FooBar", SCM_EOL)?

make_item ("HairpinText", current_span_event_->self_scm ());

You need to decide what kind of grob you're creating; though you've
defined
HairpinText as an Item, some of the default settings in
define-grobs.scm are for
a Spanner (which will probably cause you more segfaulting issues).

Yes.  As you've noticed, it was an ugly mashup of various properties
found here and there :-)

Since you want to centre the text between the bounds of the Hairpin,
it probably
makes more sense to define HairpinText as a spanner.

Done. I also considered the possibility of using a Scheme procedure as a
translator, but it seemed somehow uncanonical.

http://codereview.appspot.com/3509041/



reply via email to

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