I am reviving this old message because I stumbled over the problem, too. Does anyone know how to make \shapeTieColumn (from openLilyLib) work in the top staff of a system after a line break?
2014-10-17 16:23 GMT+02:00 Neil Thornock <neilthorn...@gmail.com>: > See the exchange below between myself and David. Hoping for an elegant > solution to this problem. > > ---------- Forwarded message ---------- > From: David Nalesnik <david.nales...@gmail.com> > Date: Thu, Oct 16, 2014 at 11:18 AM > Subject: Re: shapeTieColumn > To: Neil Thornock <neilthorn...@gmail.com> > > > Hi Neil, > > On Thu, Oct 16, 2014 at 11:05 AM, Neil Thornock <neilthorn...@gmail.com> > wrote: > >> Hi David, >> Not sure this is worth an email to the Lily list... >> >> I'm using your shapeTieColumn function. After a line break, the function >> works only if it is not the top staff of a system. So this breaks: >> >> { s1 \break <c' d' e'>8.~ \shapeTieColumn #'((()) (()) (((0 . -4) (0 . >> 1) (0 . 0) (0 . 0))) (()) (())) <c' d' e'> } >> >> Any ideas? >> >> I've been poking around with this, and I really have no idea. It > _should_ work. > > I added two print lines to the function to check if the offsets are > happening. They are. Run the following on your snippet: > %%%%%%%% function for offsetting control-points of a TieColumn > %%%%%%%%%%%%%%%%% > shapeTieColumn = > #(define-music-function (parser location all-offsets) (list?) > #{ > \once \override TieColumn #'after-line-breaking = > #(lambda (grob) > (let ((ties (ly:grob-array->list (ly:grob-object grob 'ties)))) > ;(display ties) (newline) > > (for-each > (lambda (tie offsets-for-broken-pair) > (let* ((orig (ly:grob-original tie)) > (siblings (ly:spanner-broken-into orig))) > > (format #t "before: ~a~%" (ly:grob-property orig > 'control-points)) > > (for-each > (lambda (piece offsets-for-piece) > (if (pair? offsets-for-piece) > > > (set! (ly:grob-property piece 'control-points) > (map > (lambda (x y) (coord-translate x y)) > (ly:tie::calc-control-points piece) > offsets-for-piece)))) > (if (null? siblings) > (list orig) > siblings) > offsets-for-broken-pair) > > (format #t "after: ~a~%" (ly:grob-property orig > 'control-points)) > > )) > > ties all-offsets))) > #}) > > %%%%%%%%%%%%% > > The problem also happens when the \break isn't manual. Try: > > { > \repeat unfold 8 { R1 } > <c' d' e'>8.~ > \shapeTieColumn #'( (()) (()) ( ((0 . 4) (0 . 1) (0 . 0) (0 . 0)))) > <c' d' e'> r8 r2 \repeat unfold 8 { R1 } > } > %%%%%%%%%%%%%%%% > > My only guess is that the tweaking is happening at the wrong time--too > late? Even though 'control-points is showing a change, the item has already > been finished? > > Honestly, I'm at a loss here. You might want to forward this to the lists > to see if someone else has an idea. > > Best, > David > -- Peter Crighton | Musician & Music Engraver based in Mainz, Germany http://www.petercrighton.de
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user