lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determining location of the staff lines


From: Eric Knapp
Subject: Re: Determining location of the staff lines
Date: Sun, 14 Feb 2010 10:38:57 -0600

On Wed, Feb 10, 2010 at 8:58 PM, Carl Sorensen <address@hidden> 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.

>
> The engraver contains two vectors: note_events_ and tabstring_events_.
>
> The listeners for notes and string-events do a push_back on =A0note_event=
s_
> and tabstring_events_, respectively. =A0That's all they do.
>
> The process_music function, which is called after all the events are
> listened to, then works with note_events_ and tabstring_events_. =A0All o=
f the
> information on the notes and strings are there.
>
> You can also see this same structure (but with a touch more complexity) i=
n
> lily/tab-note-heads-engraver.cc.
>
> So your staff-tab-string-marker-engraver (or whatever it's called) will
> listen to both note-events and string-number-events, and create these
> vectors. =A0Then, based on the contents of the vectors, it can create the
> appropriate stringMarker grobs, with the correct X-offset to put the stri=
ng
> markers in the right position.

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?

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.

How do I get the vectors to the spot where I'm making the grob?

What section of the Scheme engraver will I create the grobs? What
grobs do I make?

>
> Let me know if you have more questions on this.

I really appreciate this.

>
> Thanks,
>
> Carl
>

-Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]