On 19 juin 2012, at 14:45, [email protected] wrote: > Hey all, > > Does anyone have any idea why the custom-rolled VoiceFollower isn't printing > in the example below? I'm positive the grob is being created and that it is > linking successive notes (check out the print to the command line to see the > info). > > Cheers, > MS > > \version "2.14.2" > > #(define (define-grob-property symbol type? description) > (if (not (equal? (object-property symbol 'backend-doc) #f)) > (ly:error (_ "symbol ~S redefined") symbol)) > > (set-object-property! symbol 'backend-type? type?) > (set-object-property! symbol 'backend-doc description) > symbol) > > #(define-grob-property 'link-me boolean? "Link two grobs.") > > changeEngraver = > #(let ((note-head-list '())) > (list > (cons 'acknowledgers > (list > (cons 'note-head-interface > (lambda (engraver grob source-engraver) > (if (ly:grob-property grob 'link-me #f) > (set! note-head-list (cons grob > note-head-list))))))) > (cons 'process-acknowledged > (lambda (trans) > (if (= 2 (length note-head-list)) > (let ((grob (ly:engraver-make-grob trans > 'VoiceFollower > (cadr note-head-list)))) > (ly:spanner-set-bound! grob LEFT (car note-head-list)) > (ly:spanner-set-bound! grob RIGHT (cadr note-head-list)) > (set! note-head-list '()))))))) > > \layout { \context { \Score \consists \changeEngraver } } > > \new Staff \relative c' { > \override NoteHead #'link-me = ##t > \override Score.VoiceFollower #'stencil = > #(lambda (grob) > (format #t "INFO ~a ~a\n" > (ly:grob-property grob 'left-bound-info) > (ly:grob-property grob 'right-bound-info)) > (ly:line-spanner::print grob)) > a1 b \break c d \break e f \break g a > }
Own question answered, got left and right bounds backwards. Cheers, MS _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
