lilypond-user
[Top][All Lists]
Advanced

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

Scheme expressions


From: Don Blaheta
Subject: Scheme expressions
Date: Sun, 12 Feb 2006 02:19:10 -0600
User-agent: Mutt/1.2.5.1i

I've given up trying to compile from CVS, at least from now, so I went
ahead and downloaded 2.7.33 for OS X.  My question is about writing
Scheme functions; what can go inside the #{ ... #} construct?  I thought
arbitrary Lilypond syntax could go in there, but

  #(def-music-function (parser location music) (ly:music?)
     #{ << \context Voice = "phrases" { c'' } >> #})

gives me the error 

  <string>:1:55: error: syntax error, unexpected STRING
  parseStringResult = {  << \context Voice = "phrases" { 
                                                         c'' } >>  }

whenever it gets called, although the part inside #{ #} is valid enough
and does what I expect if I put it in its own file.  If I try

  #(def-music-function (parser location music) (ly:music?)
     (let ((dummy-note (make-music
                  'NoteEvent
                  'duration
                  (ly:make-duration 2 0 1 1)
                  'pitch
                  (ly:make-pitch 1 0 0))))
     #{ << \context Voice = "phrases" { $dummy-note } >> #}))

I get a similar error, but this time complaining about an unexpected
EVENT_IDENTIFIER.

-- 
-=-Don address@hidden<http://www.blahedo.org/>-=-
A bird in the hand makes it awfully hard to blow your nose.




reply via email to

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