[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scheme expressions
From: |
Nicolas Sceaux |
Subject: |
Re: Scheme expressions |
Date: |
Sun, 12 Feb 2006 11:18:32 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) |
Don Blaheta <address@hidden> writes:
> 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'' } >> #})
#(def-music-function (parser location music) (ly:music?)
#{ << \context Voice = "phrases" \notemode { c'' } >> #})
will do it. I'll patch the #{ #} syntax implementation so that it should
work like you (and everybody) would expect it.
> 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.
Perhaps it's because a note like c'' is not a NoteEvent, but a
ChordEvent which elements contain a NoteEvent.
Try:
\displayMusic c''
nicolas