lilypond-user
[Top][All Lists]
Advanced

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

Re: always set beam outside of staff


From: Michael Winter
Subject: Re: always set beam outside of staff
Date: Thu, 8 Sep 2016 13:26:05 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

I think I found a good solution. This needs some more testing, but here
goes (see below). This with the overridden auto-knee-gap and damping
settings allows some dampening but will always clear one of the beam
sides out of the staff. So looks like all is accomplished: generally
getting the beams out of the staff, always keeping rests in the staff,
and some basic dampening!

Again... Many thanks... More soon if I run into snags.

#(define my-positions
   (lambda (grob)
     (let* ((default-pos (beam::place-broken-parts-individually grob))
            (left-pos (car default-pos))
            (right-pos (cdr default-pos))
            (stems (ly:grob-object grob 'stems))
            (first-stem (ly:grob-array-ref stems 0))
            (dir (ly:grob-property first-stem 'direction))
            (max-pos
             (if (eq? dir UP)
                 (max left-pos right-pos)
                 (min left-pos right-pos)))
            (pos-translate
             (if (> (abs max-pos) 3.5)
                 0
                 (- 3.5 (abs max-pos)))))
       (if (eq? dir UP)
           (cons (+ left-pos pos-translate) (+ right-pos pos-translate))
           (cons (- left-pos pos-translate) (- right-pos pos-translate))))))


\layout {
  \context {
    \Staff
    \override Beam.auto-knee-gap = #10
    \override Beam.damping = #3
    \override Beam.positions = #my-positions
  }
 }


On 09/08/2016 11:13 AM, David Nalesnik wrote:
> On Thu, Sep 8, 2016 at 1:08 PM, David Nalesnik <address@hidden> wrote:
>
>> So, to get the positions of the note-heads under a Beam, you could
>> write something like:
> Appended as a file because of awkward line-breaks when inlining....
>
> David




reply via email to

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