lilypond-user
[Top][All Lists]
Advanced

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

Re: box around notes


From: David Nalesnik
Subject: Re: box around notes
Date: Thu, 8 Jan 2015 19:15:52 -0600

Hi,

On Thu, Jan 8, 2015 at 7:58 AM, David Nalesnik <address@hidden> wrote:
Hi Marc,

On Wed, Jan 7, 2015 at 7:43 PM, MarcM <address@hidden> wrote:
i tried examples in this old post but none of them compile in 2.19.15.

[Visible at Nabble link at bottom of message]

Yes, there have been a lot of changes to LilyPond internals since that was written. 

I've rewritten that old file so that it will work with 2.19.15.   (There's a note near the top explaining how to get it to work with current stable.)

I found that I needed to come up with separate grobs for the boxes in your example--which encompass a single chord, a single note--and boxes which encompass multiple chords, notes.  (This is because the first needs to be an Item, the second a Spanner--to my understanding.)

There's a lot of code in this file.  I'd suggest that you move the definitions to another file--say boxes.ily--and \include "boxes.ily" so you don't have to see the mess.

I think the example should make usage pretty clear.  Note that you can do overrides of the new grobs, just as you can with other grobs. I coopted 'padding to control the space about the box contexts.

Now, this really isn't infallible.  (For one thing, if you move the engraver to the Staff context, dynamics get messed up.  Wish I knew why...)

Also, the boxes aren't accounted for in horizontal spacing.  You can still fool with the bar line extent, though.

Hope you get some use out if this.

David

P.S. If anybody knows about the horizontal spacing and the issue with dynamics, please chime in.  I'm really at a loss.  These are things that prevent me from proposing actual LilyPond functionality :(





Attachment: boxer.ly
Description: Text Data

Attachment: boxer.png
Description: PNG image


reply via email to

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