[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
glissando stems
From: |
Thomas Morley |
Subject: |
glissando stems |
Date: |
Thu, 8 Dec 2011 01:30:14 +0100 |
Hi,
there was a discussion on lily-devel to implement glissando stems:
http://lists.gnu.org/archive/html/lilypond-devel/2011-06/msg00810.html
but finally it was rejected.
Han-Wen's suggestion from
http://codereview.appspot.com/4661061/#ps1 (reply #16)
is beyond my knowledge.
My own work-around is very, very fragile:
\version "2.14.2"
\pointAndClickOff
gliss = #(define-music-function (parser location control)(pair?)
(let((y-off (car control))
(slope (cdr control)))
#{
\once\override TextSpanner #'style = #'line
\once\override TextSpanner #'extra-offset = #(cons 0 $y-off)
\once\override TextSpanner #'thickness = #1.5
\override TextSpanner #'bound-details =
#`((left . ((Y . 0)
(padding . 1.5)
))
(right . ((Y . ,$slope)
(padding . 2.5)
(attach-dir . ,RIGHT)
)))
#}))
#(define startGliss startTextSpan)
#(define stopGliss stopTextSpan)
stemGliss = #(define-music-function (parser location control)(number?)
#{
\once \override NoteHead #'Y-extent = #(cons 0 $control)
\once \override NoteHead #'transparent = ##t
\once \override Stem #'Y-extent = #'(0 . 0)
#})
\relative c' {
\gliss #'(-3.8 . -1)
\partial 4*1 b'\startGliss
\stemGliss #0.3
\once \override NoteHead #'X-extent = #'(-0.8 . 0.1)
g
g\stopGliss r2
}
Is there another, better way to do the job?
Cheers,
Harm
- glissando stems,
Thomas Morley <=