\magnifyStaff, slurs, ties

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

\magnifyStaff, slurs, ties

Werner LEMBERG

The attached example demonstrates a bug in handling the extent of a
slur within a scaled staff.  [Looking into the lilypond issues I
wasn't able to find something related; I will report the problem if no
one comes up with an issue number.]

Attached is also what I have so far to circumvent the issue, namely to
raise the slur's left position.  However, I was unable to move the
slur's starting point to the left.  Any ideas?  Perhaps rotation and
scaling?  Or something completely different?


    Werner

<<
  \new Staff \with {
    \magnifyStaff #(magstep -5)
  } {
    \clef "bass" c'2..( as8 ~ | \break
    as8) a2.. |
  }

  \new Staff {
    \clef "bass" c'2..( as8 ~ |
    as8) a2.. |
  }
>>

#(define (broken-slur-callback grob)
   (let* ((orig (ly:grob-original grob))
          ;; if slur has been split, get the split pieces
          (siblings (if (ly:grob? orig)
                        (ly:spanner-broken-into orig)
                      '())))
     (if (and (>= (length siblings) 2)
              (eq? (car (last-pair siblings)) grob))
         (let* ((pos (ly:grob-property grob 'positions '(1.5 . 0)))
                (new-start-pos (+ (car pos) 1.5))
                (end-pos (cdr pos)))
           (ly:grob-set-property! grob
            'positions (cons new-start-pos end-pos))))))

\layout {
  \context {
    \Voice
    \override Slur.after-line-breaking = #broken-slur-callback
  }
}

<<
  \new Staff \with {
    \magnifyStaff #(magstep -5)
  } {
    \clef "bass" c'2..( as8 ~ | \break
    as8) a2.. |
  }

  \new Staff {
    \clef "bass" c'2..( as8 ~ |
    as8) a2.. |
  }
>>

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

slur-problem.png (13K) Download Attachment
slur-solution.png (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: \magnifyStaff, slurs, ties

Thomas Morley-2
Am So., 31. März 2019 um 20:33 Uhr schrieb Werner LEMBERG <[hidden email]>:
>
>
> The attached example demonstrates a bug in handling the extent of a
> slur within a scaled staff.  [Looking into the lilypond issues I
> wasn't able to find something related; I will report the problem if no
> one comes up with an issue number.]

I think the changed fontSize together with changed
StaffSymbol.staff-space, causes different behaviour of the Slur.

> Attached is also what I have so far to circumvent the issue, namely to
> raise the slur's left position.  However, I was unable to move the
> slur's starting point to the left.  Any ideas?  Perhaps rotation and
> scaling?  Or something completely different?

Why not \shape?
You can use it as tweak and for broken Slurs as well, pseudo-code:

<note> -\shape #'(
  () ;; do nothing for first part
  my-number-pair-list ;; tackle second part
)
( ;; start Slur
\break
<other-note> ) ;; end Slur

Cheers,
  Harm

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user