lilypond-devel
[Top][All Lists]
Advanced

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

Inconsistent beam-slope?


From: Thomas Morley
Subject: Inconsistent beam-slope?
Date: Wed, 5 Jun 2019 22:01:36 +0200

Hi,

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]
}

Attachment: beam-slope-blot.png
Description: PNG image


reply via email to

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