Jonathan Wilkes wrote Monday, August 24, 2009 6:20 PM

--- On Mon, 8/24/09, Trevor Daniels <t.dani...@treda.co.uk> wrote:


This was one of my questions as a newbie
three years ago next week! The answer came
from Nicolaus Sceaux, see
http://lists.gnu.org/archive/html/lilypond-user/2006-08/msg00560.html

Whoops, sorry for the misspelling, Nicolas.

A music function has to return some music,
so you need to pass the ossia music to the
music function too, and include the \new Staff
as well, like this:

[snip]

One thing I don't understand is why the
example in the scheme tutorial
(tempoPadded under "Tweaking with Scheme")
doesn't seem to return any music, but uses
define-music-function.

Clearly my generic statement is wrong, but if
you think about where the braces need to go
you will see why music is needed here.  I believe
the contents of a music function have to parse
correctly on their own, which means it cannot
terminate with just the \with clause - \new
Staff needs some music.  But if you add a {
that's equally invalid.  If you add { } the
music function is fine, but now the music in
main gives an error because it follows the
(empty) music clause in the function.  So the
only way is to suck in the music as a parameter.

If this is wrong, perhaps someone more expert
than I can explain it.

Trevor



_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to