lilypond-user
[Top][All Lists]
Advanced

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

Re: Making feathered beams more variable


From: Thomas Morley
Subject: Re: Making feathered beams more variable
Date: Mon, 24 Oct 2011 23:09:12 +0200

Hi David,

2011/10/24 David Nalesnik <address@hidden>
Hi Harm,
(...)
I haven't tried to break your function :) but the attached file shows one way you could generalize it to remove the code duplication and work with more than four beams.  (In the example, I've changed the first group to use 128th notes.)

Many thanks, I knew it could be done.
 

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.
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).
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?

Thanks,
  Harm

Attachment: harm-feathered-beam02_rev.ly
Description: Text Data


reply via email to

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