Recently I looked into trying to rewrite ly:ledger-line-spanner::print in Scheme, in order to do some customization of ledger lines. I didn’t get very far... I then tried to wrap it in my own function in order to post-process the stencil it produced. But I found it produces one stencil per musical system. (!) So it seems a Scheme rewrite might be needed after all.
I realize this is no small task (the function is over 150 lines of code), but I thought I’d post about it just in case anyone else has the time and inclination to have a go at it. Currently it’s a bit beyond my skill set. Cheers, -Paul \version "2.19.22" \layout { ragged-right = ##t } % there is ony one ledger line spanner/grob/stencil % produced for each musical system on the page (!) % see: ledger-line-spanner.cc for c++ code for ly:ledger-line-spanner::print #(define (MyLedgerLineSpannerPrint grob) (let* ((stil (ly:ledger-line-spanner::print grob)) ;; (ifaces (ly:grob-interfaces grob)) (noteheads (ly:grob-object grob 'note-heads)) (new-stil (box-stencil (stencil-with-color stil blue) 0.1 1)) ) (display "noteheads: ")(display noteheads)(newline)(newline) ;; (display (ly:grob-properties grob))(newline)(newline) ;; (display ifaces)(newline)(newline) new-stil)) \new Staff \with { \override LedgerLineSpanner.stencil = #MyLedgerLineSpannerPrint \override LedgerLineSpanner.after-line-breaking = #grob::display-objects } { c <d e> f''' g''' \break c2 e } _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user