lilypond-user
[Top][All Lists]

## Re: Making feathered beams more variable

 From: David Nalesnik Subject: Re: Making feathered beams more variable Date: Mon, 24 Oct 2011 21:07:48 -0500

Hi Harm,

On Mon, Oct 24, 2011 at 4:09 PM, Thomas Morley wrote:
Hi David,

2011/10/24 David Nalesnik

The examples that Gould shows (pg. 158) have the peak of the feathered beams aligned with a stem.  I think this would be a useful variation of the function.  It shouldn't be hard to automate:  (ly:grob-object grob 'stems) will get you an array of the stem grobs associated with the beam, and you could select a particular stem from the array with ly:grob-array-ref.

I did as you suggested (perhaps it could be shorter and more elegant, but it works :)). The argument of the function now aligns the peak with a stem. But you can also enter non-integer values:  (grow-beam-var 3.5) centers the peak between the third and the fourth stem.

Looks great!

Values like "0" or values greater than the stem-count are faking \override Beam #'grow-direction = #LEFT (RIGHT). (This is not very elegant: switch on the color in \layout).

I'm not sure what I'm supposed to see here -- looks fine to me.  (There must be a way to get around needing to give a non-existent "feather" a length of 0.001 to avoid division by zero, though, but my head gets a bit tangled up thinking about it!)

One little problem: With values between 0 and 1 (p.e. 0.5 or 0.8) I retrieve every time the same output. Well, no one would ever enter such strange values and perhaps I'm a little bit paranoic, but could it be, that there's a problem I can't see?

I think I solved this problem by changing the definition of the variable x-L.  So now you can create all sorts of questionable subtleties (see image) :)

--David

harm-feathered-beams-align-to-stems.ly
Description: Binary data

example.png
Description: PNG image