lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: glissando stems


From: address@hidden
Subject: Re: glissando stems
Date: Thu, 8 Dec 2011 08:10:51 +0100

Le Dec 8, 2011 à 1:30 AM, Thomas Morley a écrit :

> 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

I worked on this for a long time.  It is near impossible to get stems to link 
up to glissandos and automate direction of stems @ the same time.  However, if 
you set NoteHead #'glissando-skip = ##t, that'll allow a glissando to span 
stems.  You can then override the Stem length to get it to link up to the 
glissando.

Cheers,
MS


reply via email to

[Prev in Thread] Current Thread [Next in Thread]