lilypond-user
[Top][All Lists]
Advanced

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

Using Slurs in Scheme Music Functions


From: pounderd
Subject: Using Slurs in Scheme Music Functions
Date: Thu, 14 Sep 2006 11:20:24 -0700

Hello List,

Have been using LIlypond (v. 2.8.6) for a few weeks now and have managed
to find the answer to most of my problems in the manual so far, but I have
run into a problem probably stemming from my lack of experience with languages
such as Scheme/LISP etc. and was hoping someone here might be able to help.
- it's probably very simple if you know how...

I am trying to save typing by defining a music function to deal with situations
where the words require a slur in once verse, but separate syllables in another.
What I am trying to do is have a function taking two notes which keeps them
separate in the main Voice context, but applies a dotted slur in a separate
context with invisible note stems. That way I can simply skip the second
syllable in the verse which wants the notes to be slurred. The problem is
that the parser seems to be interpreting the slur parentheses as scheme syntax.

The code which generates the error - unexpected '(' - is as follows:

altSlur = #(define-music-function (parser location e1 e2) (ly:music? ly:music?)
        #{
                <<
                        { $e1 $e2 }
                        \new Voice = "1" {
                                \once \override Stem #'transparent = ##t {
                                        $e1 
                                        \slurDotted 
                                        ( $e2 )
                                        \slurSolid
                                }
                        }
                >>
        #}
)

Apologies if it's trivial, but how can I escape the parentheses?


___________________________________________________________

Tiscali Broadband from 14.99 with free setup!
http://www.tiscali.co.uk/products/broadband/





reply via email to

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