Hi,

On Sun, Mar 11, 2012 at 3:18 AM, m...@apollinemike.com <
m...@apollinemike.com> wrote:

>
> On Mar 11, 2012, at 8:53 AM, James Harkins wrote:
>
> > At Sun, 11 Mar 2012 08:12:35 +0100,
> > m...@apollinemike.com wrote:
> >> The best way to achieve that with current LilyPond is Scheme engravers.
> >>
> >> There have been a few examples of Scheme engravers posted on this list
> (if you search Scheme engraver you'll find one - there are also examples in
> the input/regression folder of the LilyPond source).  You'd want to create
> one that begins and ends a spanner when it hears a given event (you can
> invent a BoxNoteEvent, for example) and acknowledges note columns in the
> interim, putting them in a grob-array called "note-columns" or
> what-have-you.  Then, make a print method that extracts these note columns
> (or whatever grobs you're interested in) finds the min/max height and
> width, and draws a box at those dimensions.
> >>
> >> If you want to get fancy, you can add extra spacing width to the left
> of the first note column and the right of the last note column to make sure
> there are no collisions with the box and surrounding material.
> >
> > I see... would it be too much to ask you to send your engraver to me
> (off list if you prefer)? That's of course assuming you developed one for
> your own music. Normally I don't mind doing some research and
> experimentation on my own, but in this case --
> >
>
> Unfortunately, the way I created mine was way hackish and not at all
> extensible, intelligent, or suitable to your needs (I hijacked a beam grob).
> The best thing to do is go ahead w/ the score as if it were to have boxes
> and then put something like :
>
> c d
> %\startBoxedNotes
> e f g
> %\endBoxedNotes
>
> wherever you need it.  There are enough people on this list who know
> Scheme that someone is likely to pop up w/ a more fleshed-out solution in
> the next 6 weeks, and if not, in 6 weeks (if not less), I'll have some time
> to give it a go.
>

Awhile ago, I worked a little on an engraver which would add boxes to
groups of notes (and include articulations and dynamics as well).  I gave
up on it, but decided to revive it in response to this thread.  I hope what
I've come up with will prove useful for frame notation.

I've defined a grob, Frame, and given it several properties.  One of these,
'padding, adds space between the frame and its contents, as you would
expect.  The length of the continuation line is controlled by the property
'extender-length.  Then, there's 'extra-left-padding and
'extra-right-padding.  These last are there to correct a shortcoming: I
can't think of an artful way to accomodate an accidental before the first
note of a group so there isn't a collision.

Another problem is that the horizontal spacing doesn't adapt to the frame.
 I suppose this comes from the fact that I've hijacked a TextSpanner, so
that collisions are reckoned with outside staff objects.  Is there anything
I can do about this?

This is all very rough, but perhaps it can serve as a starting point.  Any
suggestions for improvement are welcome!

HTH,
David

Attachment: frameEngraver.ly
Description: Binary data

<<attachment: frameEngraver.png>>

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to