On 2/14/10 9:38 AM, "Eric Knapp" <ekn...@gmail.com> wrote:
> On Wed, Feb 10, 2010 at 8:58 PM, Carl Sorensen <c_soren...@byu.edu> wrote:
>
>> You're making great sense. =A0This is *really* easy, once you understand =
> how
>> LilyPond engravers work.
>>
>
> I think I'm still missing a few pieces.
>
>> As an example, look at lily/fretboard-engraver.cc.
>
> My C++ is really rusty and while I see what going on, I can't see how
> to do this in a Scheme engraver.
I think it's not yet possible to do this in a Scheme engraver.
Han-Wen indicated that it could be done here:
http://lists.gnu.org/archive/html/lilypond-devel/2010-01/msg00594.html
But I don't think it's been implemented yet. Perhaps Han-Wen will do so,
now that we've identified a need.
> OK, the next questions are this.
>
> When you say, "will listen", do you mean that I'll have code in the
> "(cons 'listeners..." section of the Scheme engraver?
Exactly. You'll have a listener for note-events and for string-number
events.
>
> How do I create the vectors in Scheme so that they are persistent?
> Everything I've tried has resulted in only having the last item in the
> vector there once I'm done.
We need to have the capability to store private data in Scheme engravers.
Hopefully we can get that implemented.
>
> How do I get the vectors to the spot where I'm making the grob?
>
Once you have the private data stored, it will be available to all of the
Scheme functions in the engraver.
> What section of the Scheme engraver will I create the grobs? What
> grobs do I make?
The grob will be created in the process-music function, which occurs after
all of the notes at the current moment.
You should create StaffTabStringIndicator grobs (you'll need to create a
new grob type for that -- see scm/define-grobs.scm).
HTH,
Carl
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel