Hello David,
Am 12.10.2014 um 16:34 schrieb David Nalesnik:
Hi Erik,
On Sun, Oct 12, 2014 at 2:35 AM, erik flister <erik.flis...@gmail.com
<mailto:erik.flis...@gmail.com>> wrote:
hi-
i'm writing some software that generates .ly files and want to offer
the option to automatically add (woodwind) fingering chart annotations
to the engraving. the project is in haskell and i'd rather not learn
scheme or lilypond internals. the problem is determining the octave
-- i want to support relative octave entry
(http://lilypond.org/doc/v2.18/Documentation/notation/writing-pitches#relative-octave-entry),
but i don't want to reimplement relative octave detection (not because
it's hard, but i in principle don't want to duplicate logic).
i would think automatic fingering annotation would be a desirable
feature in lilypond itself -- perhaps a markup flag where i request
the standard fingering for the note, maybe some way of selecting a
predefined alternate fingering (nice to have would be rules for
determining prefered fingerings from the previous note, a way to
define fingering libraries to choose from, etc).
i assume that wouldn't be anyone's priority to implement, so either i
could try to myself from within lilypond, or (my preference) i need
some way to ask lilypond for the octave -- either an API or
command-line program or something where i give an .ly snippet and
lilypond gives me back the absolute pitches.
I can't offer any suggestions about manipulating the text file, but I
hope the following will be useful to you.
It is possible to create markups in the score through a Scheme
engraver. The one I've attached looks for a NoteHead that has had its
'display-property property set to #t.
(Aside 1:This is an invented property, and there is currently no good
way to add a property except by adding it to the codebase. This
method will probably cause problems if you try to process a batch of
files--though removing the "symbol redefined" error will likely "fix"
that.)
(Aside 2: I've thought for a long time that adding a generic marker
property to grobs would be very useful: store whatever you want in it
to act as an ID.)
Perhaps the "id" property in
<http://lilypond.org/doc/v2.18/Documentation/internals/grob_002dinterface>?
That came to my mind.
Yours, Simon
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user