Re: [frogs] Changing subproperties with grob-set-property (working on bug #40) |
[ Thread Index |
Date Index
| More lilynet.net/frogs Archives
]
- To: Neil Puttock <n.puttock@xxxxxxxxx>, frogs@xxxxxxxxxxx
- Subject: Re: [frogs] Changing subproperties with grob-set-property (working on bug #40)
- From: Marc Hohl <marc@xxxxxxxxxx>
- Date: Fri, 20 Nov 2009 08:21:26 +0100
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1258701687; l=2055; s=domk; d=hohlart.de; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References: Subject:To:MIME-Version:From:Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=h8hzU6jMi8hIrT3gGmDsf3K9g0Q=; b=oex+ofYb4EQ10n/elYZIUmmCmpSqUr4kiQmBLJ0IvK2zBdtwePr2Fex74d+mSwYUNV8 /BimZpzHmrekC9T9dOsgxeKZKC96NxnMA4EPHgMt8C10032GUWhD/DXkqXnBfN2Oxs6J1 jth1KGUJ2rN9QhnAcRhrR+T3uxcF4iSRD98=
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!