lilypond-user
[Top][All Lists]
Advanced

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

Re: conditional markup


From: David Kastrup
Subject: Re: conditional markup
Date: Sun, 15 Jun 2014 16:07:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Orm Finnendahl <address@hidden> writes:

> Am Sonntag, den 15. Juni 2014 um 14:26:36 Uhr (+0200) schrieb David Kastrup:
>> Orm Finnendahl <address@hidden> writes:
>> Would you have preferred
>> 
>> orm.ly:11:20: error: music function cannot return \markup \line { "Test"}
>
>  that doesn't really matter, the problem for me was, whether the error
> message meant "music function can't return (at all)" or whether it
> meant "can't return a procedure (or whatever)", but that is clear now.
>
> However it is not yet clear to me, what actually is expected in which
> context. IIUC, the respective part in the manual is 2.3.2 and it says:
>
> "Music functions may currently be used in several places. Depending on
> where they are used, restrictions apply in order to be able to parse
> them unambiguously. The result a music function returns must be
> compatible with the context in which it is called."

A music function has to return music, period.  Different music may be
used in different contexts, but a music function cannot return anything
but music.

If you want to return something else, use a scheme function.

> - What is "compatible with the context in which it is called"?
>
> - How can I find out what defines a certain context and what return
>   values lilypond expects or finds acceptable in that situation?
>
> - Is "\markup" in its most general form even representable by a music
>   function?

No.  Markup is not music.

-- 
David Kastrup



reply via email to

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