Hi Werner,

On Tue, Feb 3, 2015 at 7:40 AM, Werner LEMBERG <w...@gnu.org> wrote:

>
> Folks,
>
>
> I'm trying to work around an old problem of broken ties in tightly
> setted music: They can degenerate to a dot, having no horizontal
> extensions anymore.  Following the example in section `Difficult
> tweaks' of the notation reference (with slight changes to change the
> property for all siblings but the first one), I tried this:
>
>   #(define (set-minimum-length grob)
>      (let* ((orig (ly:grob-original grob))
>             (siblings (if (ly:grob? orig)
>                           (ly:spanner-broken-into orig)
>                           '())))
>        (if (and (> (length siblings) 1)
>            (not (eq? (car siblings) grob)))
>          (ly:grob-set-property! grob 'minimum-length 20))))
>
>   \paper {
>     indent = 0
>     line-width = 50\mm
>     ragged-right = #f
>   }
>
>   {
>     \override Tie.after-line-breaking = #set-minimum-length
>     c''1 ~ \break
>     c''1
>   }
>
> However, this has no effect.  I guess this is because because the
> `after-line-breaking' callback is invoked too late in the formatting
> process.
>

Yes, it appears that 'minimum-length is consulted before line breaking
happens, in the callback  for ly:spanner::set-spacing-rods (in
lily/spanner.cc).  Spacing rods are created provisionally for broken pieces
which might occur later.


> Is there a possibility to make this work?
>

Don't know.  In any case, I think the goal should be to make this work with
an override of 'minimum-length, rather than setting 'minimum-length though
'after-line-breaking.  Then this would work with \alterBroken, which would
eliminate the need to write your own "difficult tweak."

I don't know if this is related, but here is a clear bug I discovered when
experimenting with your snippet:

 \paper {
  line-width = 50\mm
}

{
  \override Tie.minimum-length = #40
  c''2 ~ c'' ~ \break
  c''2 ~ c''
}

The music goes right off the side of the page.

Hope this is useful--

David
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to