2016-07-03 14:56 GMT+02:00 Andrew Bernard <andrew.bern...@gmail.com>: > Recently I posted a query about putting a slash (as per grace notes) on the > right hand side of a beamed group, posting the code I have which does a very > fine job of this for the left hand side. > > Having received no response, does no-one have any thoughts on the matter? > > The attached image shows the sort of thing I need to do. > > Andrew
Hi Andrew, the code below has to be adjusted manually and it is not that robust against layout-changes. Maybe a starting-point, though. \version "2.19.44" #(ly:set-option 'debug-skylines #t) rightSlashBeam = #(define-music-function (from to y-off)(pair? pair? number?) #{ \once \override Beam.stencil = #(lambda (grob) (let* ((stil (ly:beam::print grob)) (beam-dir (ly:grob-property grob 'direction)) (thick 0.1) (slash (make-line-stencil thick (car from) (cdr from) (car to) (cdr to)))) (ly:stencil-combine-at-edge stil Y beam-dir (ly:stencil-translate-axis slash (interval-length (ly:stencil-extent stil X)) X) y-off))) #}) \new PianoStaff << \new Staff = "1" \with { \override VerticalAxisGroup.staff-staff-spacing.minimum-distance = 15 } { s4 \grace { \stemDown \rightSlashBeam #'(-3 . 0.5) #'(1.5 . 5) #-8 g'32[ s e8 \change Staff = "2" \stemUp cis32 dis8 \change Staff = "1" \stemDown c'! e' aes' g'! bes' f''] } \stemUp \rightSlashBeam #'(-3 . 0.5) #'(1.5 . -5) #-4 bes'32[ aes''' d'! aes'''! fis'' c'' fis''!] } \new Staff = "2" { \clef bass s4 s32*7 } >> Cheers, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user