Re: [frogs] Changing subproperties with grob-set-property (working on bug #40)

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


Neil Puttock schrieb:
2009/11/19 Marc Hohl <marc@xxxxxxxxxx>:

How can I get access to the fingering grob? I need its x-extent and the
orientation, but strangely, I cannot use the same mechanism as for
accidentals;
here (ly:grob-object right-bound 'accidental-grob) works, but it seems that
there
is no (ly:grob-object right-bound 'fingering).

Why is that strange?  Accidentals are a completely different kettle of
fish to fingerings: they influence all sorts of typesetting decisions,
so it's important for a NoteHead to cache them.

Fingerings are just boring scripts placed near a notehead.  :)
From the musical point of view, yes; from a more practical/technical
point of view however, accidentals are some signs sticked on a note head,
and so are fingerings...
In scm/translation-functions.scm are some routines concerning fingerings, so
I found out how to check whether there is a fingering or not, but I still
cannot
access its grob (I fear this is just an easy function call someplace, but I
just don't see
it now, and this will show my lack of deeper scheme knowledge as well :-( )

There's no easy way, I'm afraid.

Since you can't access children from a grob unless they're explicitly
added as a grob-array, I think the only method would be to use
'all-elements from the System grob, filtering out all the
undesirables.  This would be very expensive computationally.

Is it then possible to create a fingering grob with the
gained informations on the fly, get its dimensions, and
kill it thereafter?

Or can I get the information about the used font and can extract the width
of a digit somehow?

             (let* ((accidental-width (cdr (ly:grob-extent accidental
accidental X)))

Careful here: the car isn't always zero (see for example the extent of
a flat), though in practice, the spacing difference probably isn't
that noticeable.

Ah, thanks for pointing that out!

Marc
Regards,
Neil



---
----
Join the Frogs!


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