Don Blaheta <[EMAIL PROTECTED]> 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 _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user