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: Fri, 16 Jan 2015 13:30:45 -0600

Hi Klaus,

On Fri, Jan 16, 2015 at 11:35 AM, Klaus Blum <address@hidden> wrote:
Hi David,
thanks again. You're my hero: now it works.


I've added a few things so far:

- "thickness" property can be used to control frame thickness, can even be
set to zero ("color" property and "layer" property work by default)
- "filled" property (boolean) controls whether the box is to be filled with
a colored rectangle whose color can be set by "fill-color" property.

I've also added two global boolean variables "acknowledge-finger-interface"
and "acknowledge-script-interface" to control whether the boxes take care of
fingerings and dynamics. For example, if you want to mark themes and motifs,
you might only want to consider the notes and rests.
Unfortunately, these settings are valid for the whole score and therefore
cannot change during a piece. I'd prefer to use properties, because this
would allow \once \override etc. But I don't know how to access these
properties from within musicBoxerEngraver.

In the attached, I simply added new properties: acknowledge-finger-interface and acknowledge-script-interface.  In the engraver, I used ly:grob-property to read the setting.  You'll notice that if something is ignored it doesn't get pushed out of the way, though.

Adding properties like this would get cumbersome.  It would be nice to have a property which takes a flexible list of interfaces to include (over and above interfaces which need to be acknowledged, like note-column-interface).
 
If a box is split due to a line break, it would be cool to have those two
boxes open at the right/left side. For this, musicBoxerEngraver would need
to tell if a box is started/stopped by a line break instead of a manual
command.

This is not a problem.  I use the function ly:item-break-status on the spanner bounds to determine the state of "brokenness," then add in the left or right vertical only if that bound has a break-status of 0 (indicating an unbroken bound).

I tried to keep music-boxer-stencil and make-box separate.  In so doing, I had to add two more parameters to make-box.  (You may decide to merge the two functions in the end.)  

Hope this is helpful,

David

Attachment: boxer2.ly
Description: Text Data


reply via email to

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