On Mar 26, 2011, at 8:58 AM, Damian leGassick wrote:

> hi all
> 
> as you can see below I've got some very repetitive note entry
> 
> my attempt at a scheme substitution is not working
> 
> can anyone help me out here?
> 
> cheers
> 
> Damian
> 
> 
> \version "2.13.54"
> 
> xenAccGliss = #(define-music-function (parser location nOne nTwo) (ly:music? 
> ly:music?) #{ 
>                                        \afterGrace $nOne\glissando {\stemDown 
> \once \override Stem #'stroke-style = #"grace" $nTwo} #})
> 
> cello = {
> 
>  \override Glissando #'springs-and-rods = #ly:spanner::set-spacing-rods
>  \override Glissando #'minimum-length = #5
>  \override Glissando #'thickness = #2
>  \clef treble
>  #(define afterGraceFraction (cons 15 16))
>  \override Beam #'positions = #'(-8 . -8)
>  \afterGrace d'''16\glissando {\stemDown \once \override Stem #'stroke-style 
> = #"grace" c''16} 
>  \afterGrace b''16\glissando {\stemDown \once \override Stem #'stroke-style = 
> #"grace" e''16} 
>  \afterGrace f'''8\glissando {\stemDown \once \override Stem #'stroke-style = 
> #"grace" d'16} 
>  \afterGrace c''8\glissando {\stemDown \once \override Stem #'stroke-style = 
> #"grace" b''16} 
>  \afterGrace gis''16\glissando {\stemDown \once \override Stem #'stroke-style 
> = #"grace" f'16} 
>  \afterGrace c''16~\glissando {\stemDown \once \override Stem #'stroke-style 
> = #"grace" d'16} 
>  \afterGrace c''16\glissando {\stemDown \once \override Stem #'stroke-style = 
> #"grace" d'16} 
>  \xenAccGliss f'4 g''2
> }
> 
> \score {
>  \new Staff \with {
>    instrumentName = "Cello"
>  } {\cello }
>  \layout { }
> }
> 

The problem is (I think) in the way glissando is parsed.

You can either remove glissando from the definition and add it in manually like 
so:

xenAccGliss = #(define-music-function (parser location nOne nTwo)
(ly:music? ly:music?)
#{
\afterGrace $nOne { \stemDown \once \override Stem #'stroke-style = #"grace" 
$nTwo }
#})

\xenAccGliss a' \glissando b'

OR write a function that'll tack the glissando on

#(define (bar m)
  (ly:music-set-property! m 'elements (reverse (cons (make-music (quote 
GlissandoEvent)) (ly:music-property m 'elements))))
m)

foo = #(define-music-function (parser location mus) (ly:music?) (bar mus))

xenAccGliss = #(define-music-function (parser location nOne nTwo)
(ly:music? ly:music?)
#{
\afterGrace \foo $nOne { \stemDown \once \override Stem #'stroke-style = 
#"grace" $nTwo }
#})

\xenAccGliss a' b'

Cheers,
MS

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

Reply via email to