lilypond-user
[Top][All Lists]
Advanced

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

Re: conditional markup


From: Orm Finnendahl
Subject: Re: conditional markup
Date: Sun, 15 Jun 2014 15:58:58 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

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."

I get stuck here:

- 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?

I can use "\displayMusic" to find out, what is generated by lilypond
in a certain situation, and that gives me an example about a possible
return value I could mimic with a scheme function in that
situation. But it doesn't necessarily tell me in a general way, what
return values are acceptable. A markup for example is put into the
articulation slot if called after a note event, but where is it put if
used for specifying the name of an Instrument or used to specify a
system-separator-markup? What else can a markup apply to? Do I have to
know the context I'm called in in order to write a custom "\markup"
replacement scheme function which would work in all possible contexts?

In short, I assume, I'd need some overview about the different
categories of scheme forms used in lilypond (like events, musical
expressions or whatever), the context they're used in (and maybe the
different categories of lilypond forms and their parsing grammar). I
could imagine that's somewhere in the docs, but I haven't found it
yet.

--
Orm




reply via email to

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