Re: [frogs] Re: Numeric note heads for singers

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


2010/1/7 Carl Sorensen <c_sorensen@xxxxxxx>:
> On 1/6/10 12:30 PM, "pounderd@xxxxxxxxxxx" <pounderd@xxxxxxxxxxx> wrote:
>>>
>> UNIX-mode on:
>>
>> After unsuccessfully trying to find a way to access the tonic
>> information from the stencil callback, I've finally realised that the
>> contexts don't exist when the stencils are called. It therefore seems
>> that I'm going to need to modify the engraver to set the scale-degree
>> as an internal grob property.
>>
>> To do this I'm going to have to set-up a dual boot, re-read all the
>> git stuff and practice building and testing, so please shriek if I'm
>> going down the wrong route :)
>
> Actually, I think you've got it exactly nailed.  I didn't foresee this
> difficulty when I said it would be an easy job...

I think this approach is wrong: since you need to specify the start
pitch (i.e., the note which will be labelled `1'), which could be in
any octave, knowing the tonic (from which a scale degree would be
computed) isn't very useful.

Depending on whether this feature is considered useful enough to be
part of LilyPond, I'd suggest one of the following alternatives:

-) Write a callback for 'note-names which would take a starting pitch,
comparing it with the current NoteHead's pitch to build the vector.
Since this would be evaluated each time a NoteHead needs printing, it
would be easy just to make a seven-element vector with the same
string.  This is a crude hack, but suitable for an LSR snippet.

-) Add the start-pitch as an optional argument to
note-head::brew-ez-stencil, which would be used as above for
comparison with the current pitch.  This is more elegant since it
doesn't abuse the 'note-names property.

In either case, a music function could be used to pass the pitch as
music (rather than having to use ly:make-pitch directly), then either
overriding 'note-names or adding the optarg to the stencil callback.

Regards,
Neil

---
----
Join the Frogs!


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