Hi Harm, On Tue, Oct 25, 2011 at 12:05 PM, harm6 <[email protected]>wrote:
> > Hi David, > > David Nalesnik-2 wrote: > > > > Hi Harm, > > > > On Mon, Oct 24, 2011 at 4:09 PM, Thomas Morley < > > [email protected]> wrote: > > I'm looking for a method to integrate something like: > > (if (= number 0) > use: \override Beam #'grow-direction = #LEFT > (if (>= number stem-count) > use: \override Beam #'grow-direction = #RIGHT > otherwise use: \override Beam #'stencil = (grow-beam-var arg) > > into the Beam-stencil-override. > > I'm aware of the possibility to create a function to do that, but this is > not intended. > > So, is it possible to program (grob-property-set! grob 'grow-direction > LEFT) > somewhere in a stencil-override? > > I'm not sure I understand what you want here. Would you like to duplicate the effect of these overrides in the function (say by adding in null stencils), or actually call them when certain conditions are met? The attached file does the latter. > > Thanks a lot for improving my function several times and answering all my > questions about beams! > > Glad I could help! > There are two problems left. > First tiny problem: > The output with kneed-beams is ugly in some cases: > This example gives a overlooking stem at beam-end (test-code only) > > xy = \once\override Stem #'french-beaming = ##t > > \relative c { > \once\override Beam #'stencil = #(grow-beam-var 5) > f32 [ \xy f''' f,,, \xy f''' f,,, \xy f''' f,,, \xy f''' f,,, \xy > f'''] > } > > I'm not sure how to fix. 'french-beaming only works with the inner stems. > Is there a default-command I can't find? Should I integrate something into > the definition of grow-beam-var? Or create a separate override for this > stem? > > I don't know if there's a setting to allow 'french-beaming to work with outer stems of a beam group. (I checked some Durand scores of Messiaen, and sure enough, the outer stems span the entire beam.) I tried various overrides to adjust the length of the final stem only, and the solution I got to work is this: xy = \once\override Stem #'french-beaming = ##t \relative c { \once \override Beam #'stencil = #(grow-beam-var 5) f32 [ \xy f''' f,,, \xy f''' f,,, \xy f''' f,,, \xy f''' f,,, \xy \once \override Stem #'stencil = #(lambda (grob) (ly:grob-set-property! grob 'length 11) (ly:stem::print grob)) f'''] } > Regarding the following example I'm not sure: should the peak point up or > down? What do you think? > > \relative c' { > \override Beam #'auto-knee-gap = #4 > \override Beam #'stencil = #(grow-beam-var 16) > c''32 [b a g > f g a b > c b a g > f g a b > e,,, c''' b a > g a b c > d c b a > g a b c] > c1 > } > Well, with the current position of the beam, what you have is the only option. Otherwise the beam will cover the ledger lines. > Second problem. > I tried to use \featherDuration with my Definition, but it doesn't work as > expected (seems it works only once a beam): > > \relative c'' { > \override Beam #'stencil = #(grow-beam-var 7) > > a64 [ > \featherDurations #(ly:make-moment 1 2) > {a a a > a a a a} > > a > \featherDurations #(ly:make-moment 2 1) > {a a a > a a a a > > a a a a > a a a a > > a a a a > a a a} a] > a2 > } > > Any idea? > There's a "known warning" about \featherDurations which applies here, I think. You have too many notes in the group. Your beams work with this short example: \relative c'' { \override Beam #'stencil = #(grow-beam-var 4) \featherDurations #(ly:make-moment 1 2) {c32[ c c c} \featherDurations #(ly:make-moment 2 1) {c c c c]} c2. } Maybe you could think of some artful way to modify the function in music-functions-init.ly to incorporate the increase/decrease. That way you could handle the peak smoothly. I hope this helps! > -David
harm-feathered-beams-align-to-stems.ly
Description: Binary data
_______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
