Hi,
On Wed, Jan 22, 2014 at 4:55 PM, Thomas Morley <thomasmorle...@gmail.com>wrote:
> Below some coding just to show that it can be done.
> It's a very first sketch, several issues are present (p.e. linebreak)
> Might be a starting point, though.
>
>
There's also the attached file (which comes from
http://www.mail-archive.com/lilypond-devel@gnu.org/msg47432/shape-tie-columns.ly)
which will work with broken ties.
HTH,
David
\version "2.18.0"
%%%%%%%% 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))))
(for-each
(lambda (tie offsets-for-broken-pair)
(let* ((orig (ly:grob-original tie))
(siblings (ly:spanner-broken-into orig)))
(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)))
ties all-offsets)))
#})
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% EXAMPLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{
<e' bes' es''>1 ~
\break
q
\break
q ~
\shapeTieColumn #'(
( () ((0 . 1) (0 . 1) (0 . 1) (0 . 1)) )
( () ((0 . -0.1) (0.5 . -0.4) (1.5 . -0.4) (2 . -0.1)))
( () ((0 . -2) (0 . -1) (0 . -1) (0 . -1)) ) )
\break
q
}
\layout {
indent = 0
ragged-right = ##t
}
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel