lilypond-user
[Top][All Lists]
Advanced

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

Re: Bug: restarting staff destroys DynamicLineSpanner.staff-padding afte


From: Thomas Morley
Subject: Re: Bug: restarting staff destroys DynamicLineSpanner.staff-padding after line break
Date: Tue, 12 Mar 2019 00:48:50 +0100

Am Mo., 11. März 2019 um 23:01 Uhr schrieb Trevor Bača <address@hidden>:
>
> On Thu, Mar 7, 2019 at 2:14 AM David Kastrup <address@hidden> wrote:

> > It's probably not the only spanner
> > unprepared to span pieces of interrupted staff symbols.
> >
>
> Isn't this still a bug?

In the sense David pointed out.

> Or, rather a gap in system functionality for which
> no workaround exists?

Here an attempt for a workaround.
It's not tested beyond the given example, up to you ;)

\new Staff {
  \override DynamicLineSpanner.after-line-breaking =
    #(lambda (grob)
       (let* ((staffs
                (filter
                  (lambda (e) (grob::has-interface e 'staff-symbol-interface))
                  (ly:grob-array->list
                    (ly:grob-object (ly:grob-parent grob Y) 'elements)))))

         (for-each
           (lambda (staff) (set! (ly:grob-object grob 'staff-symbol) staff))
           staffs)

         ;(format #t"\nstaff-padding: ~a\nY-offset: ~a\nstaff-symbol ~a\n"
         ;  (ly:grob-property grob 'staff-padding)
         ;  (ly:grob-property grob 'Y-offset)
         ;  (ly:grob-object grob 'staff-symbol))
           ))

    \override DynamicLineSpanner.staff-padding = 10
    c'1\p\< c'1 c'1
    \break

    c'1 \stopStaff \startStaff c'1 c'1
    \break

    c'1 c'1 c'1
    \break

    c'1 c'1 c'1\f
}

\paper {
    indent = 0
    ragged-right = ##t
}

Cheers,
  Harm



reply via email to

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