lilypond-devel
[Top][All Lists]
Advanced

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

Re: Using \lookup to extract glyphs


From: Mats Bengtsson
Subject: Re: Using \lookup to extract glyphs
Date: Fri, 28 Nov 2008 16:08:21 +0100
User-agent: Thunderbird 2.0.0.5 (X11/20070716)



Mats Bengtsson wrote:
It would be nice if the argument was the desired height measured in points (or perhaps in staff spaces) instead of the current numerical argument where you need a lot of trial and error. If it was in points, then you could easily relate it to the height of one staff, which is 20pt by default.

Unfortunately, it seems that the mapping from brace number to height is non-linear (possibly piecewise linear). I don't have the time right now to figure out the exact relationship.
Now that I've looked a bit more careful, I see that the total height of braceN is given by
10.5*(1+1/150)^N
so in other words, if the desired height is H, you can get the number of the corresponding
brace glyph by
(round (/ (log (/ H 10.5)) (log (+ 1 (/ 1 150)))))

   /Mats





reply via email to

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