Hi Harm, This is cool!
The problem is in the definition of splayedStemChord: NoteHead is the X-parent of Script, so you're missing a step en route to NoteColumn. Also, it turns out you need to override 'after-line-breaking rather than 'before-line-breaking. > splayedStemChord = > #(define-music-function (parser location l1 l2 mus) > (list? list? ly:music?) > #{ > \once \override Flag #'stencil = #new-flag-stencil > \once \override Score.NoteColumn #'before-line-breaking = > #new-X-extent > \once \override Stem #'positioning-done = #(positioning-done l1 l2) > \once \override Stem #'stencil = #splayed-stem-stencil > > > \once \override Score.Script #'before-line-breaking = > #(lambda (grob) > (let* ((nc (ly:grob-parent grob X)) > (nh (ly:grob-array->list (ly:grob-object nc > 'note-heads)))) > (set! (ly:grob-parent grob X) > (car nh)))) > > $mus > #}) Try this: splayedStemChord = #(define-music-function (parser location l1 l2 mus) (list? list? ly:music?) #{ \once \override Flag #'stencil = #new-flag-stencil \once \override Score.NoteColumn #'before-line-breaking = #new-X-extent \once \override Stem #'positioning-done = #(positioning-done l1 l2) \once \override Stem #'stencil = #splayed-stem-stencil \once \override Score.Script #'after-line-breaking = #(lambda (grob) (let* ((note-head (ly:grob-parent grob X)) (nc (ly:grob-parent note-head X)) (nh (ly:grob-array->list (ly:grob-object nc 'note-heads)))) (set! (ly:grob-parent grob X) (car nh)))) $mus #}) HTH, David _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user