lilypond-user
[Top][All Lists]
Advanced

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

Re: Getting started with music functions


From: David Kastrup
Subject: Re: Getting started with music functions
Date: Tue, 10 Mar 2020 14:37:36 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Aaron Hill <address@hidden> writes:

>>> => David K., do you know why the parser balks at such a top-level
>>> ly:book?
>
>> How can a book be distinguished from a bookpart?
>
> Are they both ly:book? behind the scenes?  If so, I can see the problem.
>
>
>> Without an answer to
>> that question, we cannot implement this.  But have you tried explicitly
>> using
>> \book { ... }
>> for getting a book?
>
> I suspect I am misunderstanding you.  Here is what else I have tried:
>
> %%%%
> \version "2.20"
>
> bookFunc = #(define-scheme-function () ()
>   #{ \book { \score { { b'4 } } } #})
>
> % \bookFunc % fails - bad expression type
> % \book { \bookFunc } % fails - bad expression type

Ok.  I think we probably should be able to make at least

\book \bookFunc

work.  But it is probably valid to write

\book { \bookpart { ... } }

so we have a problem there again.

> $#{ \bookFunc #} % works?!
> %%%%

Ugh.  $... will create a BOOK_IDENTIFIER (without being able to
distinguish a book from a bookpart, actually) and there is no such thing
as a BOOKPART_IDENTIFIER .

So this is really half-broken at the moment.

-- 
David Kastrup



reply via email to

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