Le 21/12/2022 à 01:26, Abraham Lee a écrit :
Is there a way to turn the stencil into a composite of the original with a big block of whiteout that follows the entire group's outer skyline so it hides the staff lines? Would be a nice feature, IMO. I know the stems can be "frenched", but would be cool if the staff lines could be instead.



This has become somewhat easier to do in 2.24 with the new skyline functions.

\version "2.24"

\layout {
  #(use-modules (ice-9 match)
                (srfi srfi-1))
  \context {
    \Score
    \override Beam.stencil =
      #(grob-transformer
        'stencil
        (lambda (grob orig)
          (define (sanitize lst)
            (filter (match-lambda ((x . y) (and (finite? x) (finite? y))))
                    lst))
          (match-let* (((down . up) (ly:skylines-for-stencil orig X))
                       (down-points (sanitize (ly:skyline->points down X)))
                       (up-points (sanitize (ly:skyline->points up X))))
            (ly:stencil-add
             (stencil-with-color
              (ly:round-polygon
               (append-reverse down-points up-points)
               0.0)
              "white")
             orig))))
    \override Stem.layer = 10
  }
}

\language "english"

\relative {
  \clef bass
  \time 4/4
  f8 g16 a b c df e f e df c b a g f |
  e8 f16 g a b c df e df c b a g f e |
}


Best,
Jean

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to