Hi Niels
Unfortunately I don't know of a way of doing this without using Scheme. The
following will apply the shape you wanted to both ties:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.18.2"
example-offset-pairs = #'((0 . 0) (0 . 0.5) (-3 . 0.5) (-3 . 0))
music = \relative c' {
<c~ c'~>1
\once \override TieColumn.after-line-breaking =
#(lambda (nc)
(let ((ties (ly:grob-array->list (ly:grob-object nc 'ties))))
;(pretty-print (format "Ties: ~a" ties))
(for-each
(lambda (tie)
(let* ((cp (ly:tie::calc-control-points tie))
(cp-offset example-offset-pairs)
(new-cp
(map
(lambda (point-pair offset-pair)
(cons (+ (car point-pair) (car offset-pair)) (+ (cdr
point-pair) (cdr offset-pair))))
cp
cp-offset)))
;(pretty-print (format "Control points: ~a" cp))
;(pretty-print (format "Control point offsets: ~a" cp-offset))
;(pretty-print (format "Control points after applying offsets:
~a" new-cp))
(ly:grob-set-property! tie 'control-points new-cp)
))
ties)
))
<c c'>
}
\score {
\music
\layout{}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I hope this serves as a base for you to create a function or set of
functions that fits your needs.
Hope that helps,
Stéfano
El jue., 30 may. 2019 a las 4:56, Niels (<[email protected]>) escribió:
> Dear users,
>
> I want to shorten the ties between chords.
> I use the following code:
>
> \version "2.18.2"
> tiea = {\shape #'((0 . 0) (0 . 0.5) (-3 . 0.5) (-3 . 0)) Tie}
> music = \relative c' {
> \tiea <c~ c'~>1 <c c'>
> }
> \score { \music
> \layout{}
> }
>
> This code shortens only the lower one.
> How can I shorten both ties?
>
> Regards, Niels
> _______________________________________________
> lilypond-user mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user