lilypond-user
[Top][All Lists]
Advanced

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

How to tweak glissandos with a scheme function?


From: Eric Dedieu
Subject: How to tweak glissandos with a scheme function?
Date: Sun, 23 Mar 2008 00:48:20 +0100
User-agent: Thunderbird 1.5.0.14 (Windows/20071210)

Hi, I would like to write a shortcut for short glissandos. Here is what I have managed to make work for now:

% make next glissando as I want
shortgliss = #(define-music-function (parser location) ()
#{ \once \override Glissando #'thickness = #2
   \once \override Glissando #'gap = #0.1
   \once \override Score.SeparationItem #'padding = #1
#} )

and I use it like:

\shortgliss a8\glissando b8

But I would like to be able to just write:

a8\myglissando b8

or (second best) just: \shortgliss a8 b8

I have no idea of how to write the first, as for the second I have tried:

shortgliss = #(define-music-function (parser location m1 m2) (ly:music? ly:music?)
#{ \once \override Glissando #'thickness = #2
   \once \override Glissando #'gap = #0.1
   \once \override Score.SeparationItem #'padding = #1
   #$m1 \glissando #$m2
#} )

but compilation fails:

<string>:4:16: Erreur : syntax error, unexpected EVENT_IDENTIFIER
   #lilyvartmpe
                \glissando #lilyvartmpf


Is it possible to achieve one of those solutions?

Thanks,
Eric




reply via email to

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