\version "2.19.30" #(define-event-class 'accordion-push-span-event 'span-event) #(define ly:accordion-push-spanner::print (lambda (grob) (let* ((bound-L (ly:spanner-bound grob LEFT)) (bound-R (ly:spanner-bound grob RIGHT)) ;; (common-X (ly:grob-system grob)) probably does the same ;; as the next three lines... (common-X (ly:grob-common-refpoint grob bound-L X)) (common-X (ly:grob-common-refpoint bound-L bound-R X)) (common-X (ly:grob-common-refpoint grob common-X X)) (extent-L (ly:grob-robust-relative-extent bound-L common-X X)) (left-X (if (= 1 (ly:item-break-dir bound-L)) (cdr extent-L) (car extent-L))) (right-X (cdr (ly:grob-robust-relative-extent bound-R common-X X))) (off (ly:grob-relative-coordinate grob common-X X)) (th (ly:grob-property grob 'thickness 1)) (stil (ly:round-filled-box (cons left-X right-X) (cons 0 th) 0.0))) (ly:stencil-translate-axis stil (- off) X)))) #(define (add-grob-definition grob-name grob-entry) (let* ((meta-entry (assoc-get 'meta grob-entry)) (class (assoc-get 'class meta-entry)) (ifaces-entry (assoc-get 'interfaces meta-entry))) (set-object-property! grob-name 'translation-type? ly:grob-properties?) (set-object-property! grob-name 'is-grob? #t) (set! ifaces-entry (append (case class ((Item) '(item-interface)) ((Spanner) '(spanner-interface)) ((Paper_column) '((item-interface paper-column-interface))) ((System) '((system-interface spanner-interface))) (else '(unknown-interface))) ifaces-entry)) (set! ifaces-entry (uniq-list (sort ifaces-entry symbol> \new Dynamics \with { \override VerticalAxisGroup.nonstaff-nonstaff-spacing.padding = 1 } { s4 s2*6 s4 s8 \startPush s8 s2*3 s4 s8 \startPull s8 s2*3 } \new Staff = "staff" << \new Voice = "bass" { \clef bass \global r4 R2*3 \repeat unfold 7 { d,8 } c,8 \repeat unfold 3 { bes,,8 f, } bes,8 f, \repeat unfold 2 { c,8 g, } c,8 c, d, } \new Lyrics \with { alignAboveContext = "staff" } \lyricmode { \skip 4 \skip 2*3 "9"8 "8" "9" "8" "9" "8" "9" "8" "9" "8" "9" "8" "9" "8" "4" "1" "6" "5" "4" "5" "6" "5" "4" "5" "6" "5" "4" "3" "4" "3" "2" "3" "4" "3" "2" "3" "4" "3" "4" "9" "7" "6" "7" "9" } >> >> \layout { ragged-last = ##t \context { \Global \grobdescriptions #all-grob-descriptions } \context { \Dynamics \consists \accordionPushSpannerEngraver } }