\version "2.18.2" % maybe for string portamento % 'jib' as on a tower crane % draw a single sloping straight line pointing through ensuing notehead % SLOPE is degrees above/below horizontal; +/- = rising/sinking % the line lies between FAR and NEAR, distances from the notehead centre % distance units are half staff-spaces #(define ((jibSt slope far near) grob) (ly:stencil-add (ly:note-head::print grob) (grob-interpret-markup grob (markup #:translate (cons (- 0.5 0) 0) ; approx notehead centre #:rotate (- slope 180) #:with-dimensions '(0 . 0) '(0 . 0) #:translate (cons (/ near 2) 0) #:draw-line (cons (/ (- far near) 2) 0) )))) jib = #(define-music-function (parser location slope far near mus) (number? (number? 7) (number? 2) ly:music?) #{ \tweak #'stencil #(jibSt slope far near) $mus #} ) % usage: \jib 30 or \jib 30 5 or \jib 60 5 1.5 { c'4 \jib 40 5 g'4 c'4 \jib 50 c''4 c'4 \jib 65 10 4 g''4 \jib -60 10 c'4 }