lilypond-devel
[Top][All Lists]
Advanced

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

Re: Inconsistent beam-slope?


From: Thomas Morley
Subject: Re: Inconsistent beam-slope?
Date: Thu, 6 Jun 2019 00:05:47 +0200

Am Mi., 5. Juni 2019 um 23:56 Uhr schrieb David Kastrup <address@hidden>:
>
> Thomas Morley <address@hidden> writes:
>
> > while working on automated slashed Beams, I noticed my
> > stencil-procedure was always inexact for non-horizontal Beams. I
> > looked at 'X-positions and 'positions of a Beam to get it's slope and
> > derived the slope from those values.
> >
> > But the visible gradient obviously relies on blot-diameter as well.
> > Look at the attached image (code for it below). There you can always
> > see three overlayed Beams with blot-diameters: 0, 0.5 and 1
> > For _identical_ 'positions the _visible_ slope is not the same. And
> > I've got the impression the difference increases with steeped
> > beam-slope.
> >
> > Is this intended or a bug?
> >
> > Thanks,
> >   Harm
> >
> > Here the used code:
> >
> > {
> >   \override Beam.stencil =
> >     #(lambda (grob)
> >        (let* ((layout  (ly:grob-layout grob)))
> >          (ly:stencil-add
> >            (begin
> >             (ly:output-def-set-variable! layout 'blot-diameter 1)
> >              (stencil-with-color (ly:beam::print grob) black))
> >            (begin
> >              (ly:output-def-set-variable! layout 'blot-diameter 0.5)
> >              (stencil-with-color (ly:beam::print grob) red))
> >            (begin
> >              (ly:output-def-set-variable! layout 'blot-diameter 0)
> >              (stencil-with-color (ly:beam::print grob) cyan)))))
> >
> >
> >   \override Beam.positions = #'(2 . 8)
> >   b8^[ b]
> >   \override Beam.positions = #'(2 . 7)
> >   b8^[ b]
> >   \override Beam.positions = #'(2 . 6)
> >   b8^[ b]
> >   \override Beam.positions = #'(2 . 5)
> >   b8^[ b]
> >   \override Beam.positions = #'(2 . 4)
> >   b8^[ b]
> >   \override Beam.positions = #'(2 . 3)
> >   b8^[ b]
> >   \override Beam.positions = #'(2 . 2)
> >   b8^[ b]
> > }
>
> You talk about beam slope a lot but instead specify beam positions.
> I get the impression that those positions are heeded pretty well, so
> I don't see fit to label this as a bug.  What would you think qualifies
> as problematic here?

I need to know the actual slope of a Beam.
Probably too naive, but I thought I could go for (pseudocode):
positions-delta / X-positions-delta
If this is wrong, I have no good idea how to do it different.

Any hints?

Thanks,
  Harm



reply via email to

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