2012/3/11 David Kastrup <d...@gnu.org>: > Thomas Morley <thomasmorle...@googlemail.com> writes: > >> Hi Nick, >> >> 2012/3/9 Nick Payne <nick.pa...@internode.on.net>: >> >>> Thanks. I gave it a try. The one shortcoming I've found is that the ends of >>> LV ties on a chord containing a second no longer align. >> >> That's because "factor" is used in a multiplication. An easy fix would >> be to change that to an addition. But now a new problem arises: If you >> use customised staff-sizes the length isn't scaled accurate. For >> smaller staffs the LaissezVibrerTie should be still smaller and for >> greater staffs still greater. >> Currently I don't know how to make it better. > > You can get the system grob (ly:grob-system) from the tie, and then base > your additional size on some dimension calculated from that in some > manner. > > -- > David Kastrup
Hi David, thanks for the hint, it let me rethink the definition. Now I've done it a little different and currently I see no drawback. Well, one could argue about the values, but that's another question ... \version "2.14.2" #(define adding 1.5) #(define (enlarged-extent-laissez-vibrer::print grob) (let* ((ssymb (ly:grob-object grob 'staff-symbol)) (staff-space (ly:grob-property ssymb 'staff-space)) (adding-factor (if (null? staff-space) 1 (expt staff-space 2))) (stil (laissez-vibrer::print grob)) (stil-ext (ly:stencil-extent stil X)) (stil-length (interval-length stil-ext)) (new-stil-length (+ stil-length (* adding-factor adding))) (scale-factor (/ new-stil-length stil-length)) (new-stil (ly:stencil-scale stil scale-factor 1)) (new-stil-ext (ly:stencil-extent new-stil X)) (x-corr (- (car stil-ext) (car new-stil-ext)))) (ly:stencil-translate-axis new-stil x-corr X))) #(assoc-set! (assoc-ref all-grob-descriptions 'LaissezVibrerTie) 'stencil enlarged-extent-laissez-vibrer::print) music = \relative c' { <c e g c>\laissezVibrer s s s <d c f,>\laissezVibrer s s s } \new StaffGroup << \new Staff \with { fontSize = #-3 \override StaffSymbol #'staff-space = #(magstep -3) \override StaffSymbol #'thickness = #(magstep -3) } \music \new Staff \music \new Staff \with { fontSize = #3 \override StaffSymbol #'staff-space = #(magstep 3) \override StaffSymbol #'thickness = #(magstep 3) } \music >> Thanks, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user