Peter Bjuhr" wrote:
My starting point was that this could be achieved by using some kind of alternative arpeggio, but so far this has not been a successful approach.

Here is a rough sketch of such an approach, without considering collisions and other subtleties.

It has its own arrowdir parameter, bypassing arpeggio-direction.


Cheers, Robin
\version "2.16"

#(define ((strum arrowdir) grob) 
  (let* (
    (longer 0.5)
    (closer 0.5)
    (chord-lo-hi (ly:grob-property grob 'positions))
    (line-lo-hi (interval-widen chord-lo-hi longer))
    (len (interval-length line-lo-hi))
    )
    (if (not (= 1 (abs arrowdir))) #f ; only for UP or DOWN
      (grob-interpret-markup grob 
        (markup 
          #:translate (cons closer (interval-center line-lo-hi)) 
          #:scale (cons 1 (- arrowdir))
          #:translate (cons 0 (* -0.5 len)) 
          #:combine 
          #:draw-line (cons 0 len)
          #:tiny #:arrow-head Y DOWN #t)))))


strumUP = \once \override Arpeggio #'stencil = #(strum UP)
strumDOWN = \once \override Arpeggio #'stencil = #(strum DOWN)


{
  \strumUP    <e a d' b' d'' g''>4 \arpeggio 
  \strumDOWN  <e a d' b' d'' g''>4 \arpeggio 
}

<<attachment: strum.png>>

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to