Re: [frogs] bend implementation

[ Thread Index | Date Index | More lilynet.net/frogs Archives ]




On 1/20/10 3:11 AM, "Marc Hohl" <marc@xxxxxxxxxx> wrote:

> Carl Sorensen schrieb:
>> [...]
>> 
>> If you can ask some more specific questions, maybe we can get answers.
>>  
> Ok, here is one:
> 
> I think I begin to understand how engravers work, but there are some issues
> that  aren't perfectly clear.
> 
> With IMPLEMENT_TRANSLATOR_LISTENER
> I tell the engraver which triggers it. The events are defined in
> scm/define-music-events.scm, so I'll put some new events for triggering
> bends there.

You should only need one new event, a string-bend event.  You would probably
also need to have a string-bend articulation, which would be used inside of
a chord.

string-bend should be a property of a note; you can have it be very similar
to a string definition.

> 
> The whole ACKNOWLEDGER story is still a bit foggy to me.
> What does that mean if I say
> 
> ADD_ACKNOWLEDGER (My_new_engraver, note_head); ?
> 
> Is this the key to get informations from the corresponding note heads
> which I need to calculate the coordinates for the pointed slur?

An acknowledger is a piece of code that will be passed the event, and then
can be used to turn the event into a grob.  It's in the grob callback code,
rather than the acknowledgement code, that the coordinates will be
calculated.

As I understand it, engravers determine what grobs will be printed, and what
the properties of those grobs will be.  Engravers have finished their work
before the layout engine actually figures out where on the page the grobs
will be.

> 
> The routines like ly:calc-pointed-slur-control-points don't belong
> to the engraver, they are put in another file, isn't it? And there is no
> master file which tells lilypond which *-engraver.cc files are
> included, so if if roll my own engraver and do 'make all', it will be
> present.

Yes, the .cc files are all compiled by their presence in the directory.

HTH,

Carl


---
----
Join the Frogs!


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/