lilypond-user
[Top][All Lists]
Advanced

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

Re: include header conflicts


From: David Kastrup
Subject: Re: include header conflicts
Date: Wed, 28 Nov 2012 00:36:07 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

Eluze <address@hidden> writes:

> David Kastrup wrote
>> 
>> You could suck the whole file into one score and get just the music back
>> out again using ly:score-music, something like
>> 
>> #(ly:score-music #{ \score { \include "xxx.ly" } #})
>> 
>> The music will already be "scorified" (repeat chords expanded, \\
>> replaced and other things), so you just need to add it to your book or
>> whatever.
>
> is there any more information/documentation on these functions:
>
> ly:score-music
> ly:score-header
> or similar?

Not that I know of.

> but there is no instruction how to use it, what may/should (or what
> may not) be in the file that's included, in which context you can run
> it …

Well, any context where wrapping a \score around the file contents would
deliver a working result.

> the reason I'm asking is because there are a lot of constellations
> with failures and I don't feel like finding out by trial and learning

Sure: your files need to have a certain form to make this work (the
problem was putting music and headers in the same file, being able to
strip the headers on demand).  Depending on your preferred form, you
might need to suck into a \book rather than a \score.  Or something
else.

If you need to be more flexible, take a look at
Documentation/snippets/generating-whole-scores-also-book-parts-in-scheme-without-using-the-parser.ly
which redefines several hooks and then is able to include a file of
arbitrary structure (depending on its elements, the various different
hooks get called).

-- 
David Kastrup




reply via email to

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