[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
box around notes
From: |
David Nalesnik |
Subject: |
box around notes |
Date: |
Thu, 15 Dec 2011 23:27:58 -0600 |
Hi all,
I'm trying to write a function to add a box around notes. I've come up with the following, and I'm wondering if anyone has any ideas how to improve it or perhaps a different approach.
Basically, the function creates a box as a TextSpanner. The height of the box is based on the highest and lowest stems.
I'd like to automate all aspects of the function, but I've had to add a correction factor for height. This compensates for my inability to determine the Y-position of the spanner. I can determine Y-values "after the fact," but all my attempts to determine them _within_ the function end up "killing" parts of the box. You can see this by uncommenting any of the display lines in the function--you'll get values in the log . . . at the price of losing the left and right "text" of the spanner--three sides of the box. (To add to the mystery for me, uncommenting single lines vs. more than one yields different results.)
The example uses a small correction, but even bigger numbers are needed when articulations are added.
Any suggestions?
Thanks,
David
boxNotes01.ly
Description: Binary data
- box around notes,
David Nalesnik <=