lilypond-user
[Top][All Lists]
Advanced

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

Re: Pull in external LilyPond files into a score of movements


From: David Kastrup
Subject: Re: Pull in external LilyPond files into a score of movements
Date: Mon, 28 Apr 2014 18:57:56 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Paul Morris <address@hidden> writes:

> Hi Jan-Peter,
>
>
> Jan-Peter Voigt wrote
>> to use a file for including definitions and also to compile it 
>> stand-alone, I use a command to conditionally create the score. It is 
>> integrated in a system to execute templates:
>> https://github.com/openlilylib/snippets/tree/master/templates/lalily
>> 
>> Attached is a short example, which conditionally compiles (without the 
>> template framework).
>
> Wow, thanks, this is a nice solution!  So the "conditional-compile.ly" file
> is the child file (for a single movement) and the "conditional-compile2.ly"
> file is the parent file (that contains several movements).  Below is a
> version of "conditional-compile.ly" where I added some logging commands if
> that helps anyone else see how it's working.
>
> Your "doScore" function seems to be a workaround for the limitation
> that music functions can't return a score.

That's not a "limitation".  A music function returning a score makes as
little sense as an integer function returning a complex number.

If you want to return a score, don't use a music function.

> (I tried to rewrite it as a music function but got "error: music
> function cannot return #<Score>".

Scheme functions exist.

-- 
David Kastrup



reply via email to

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