lilypond-user
[Top][All Lists]
Advanced

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

Re: Randomness in layout


From: David Nalesnik
Subject: Re: Randomness in layout
Date: Fri, 21 Aug 2015 17:14:02 -0500

Hi,

On Fri, Aug 21, 2015 at 2:37 PM, David Kastrup <address@hidden> wrote:
tisimst <address@hidden> writes:

> On 8/21/2015 5:40 AM, Andrew Bernard [via Lilypond] wrote:
There was one oddity I encountered in the process, though. When I
> irregularized the flags, I noticed that a flag is printed for EVERY note
> within the same chord! Crazy, I know. Sounds like an unnecessary thing
> if you ask me.

Sounds like an undiscovered bug if you ask me.

Yes, I think so.

It appears that there is no provision for redundant flags in Flag::print.

The attached is a diff for a quick test fix.  Only one of the flags is actually pointed to by Stem.flag, and we keep it, suiciding the others.  Don't know if that's adequate.

You can compare the results with and without using this:

 \version "2.19"
 
{
  \override Flag.after-line-breaking =
  #(lambda (grob)
     (let* ((refp (ly:grob-system grob))
            (elts (ly:grob-array->list (ly:grob-object refp 'all-elements)))
            (me-in-list (let loop ((elts elts) (x 0))
                          (if (or (not (pair? elts))
                                  (eq? (car elts) grob))
                              x
                              (loop (cdr elts) (1+ x))))))
       (set! (ly:grob-property grob 'stencil)
             (ly:stencil-translate-axis
        (ly:flag::print grob)
        (/ me-in-list -1.5)
        Y))))
  <c'' e''>8
  \noBeam
  <c'' e''>8
  <c'' e'' g'' bes''>32
}


It will separate flag copies.

David

Attachment: 0001-Suicide-extra-flags.patch
Description: Text Data


reply via email to

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