lilypond-user
[Top][All Lists]
Advanced

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

Re: Is it possible to get lilypond to generate a lilypond source file?


From: Han-Wen Nienhuys
Subject: Re: Is it possible to get lilypond to generate a lilypond source file?
Date: Tue, 22 Nov 2005 00:31:13 +0100
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929)

Cameron Horsburgh wrote:
I suggested something similar (my original message isn't there, but it's
referenced at
http://lists.gnu.org/archive/html/lilypond-devel/2005-07/msg00224.html
) Graham Percival had a few suggestions which are useful

However, having a standalone Lilypond preprocessor could be useful for a
number of reasons. Would there be any interest in sponsoring this as a
feature? Han-Wen -- how much would it cost?

Of course!

It's possible to parse ly code coming from a string, which you can use to do do 1) and 2) below, by overriding toplevel-music-handler to call displayLilyMusic, you could achieve 3) and 4) -- then, music at toplevel will not be printed as PS, but passed through displayMusic, which would write it to a file.

Is that what you're after? I can cook up an example for you. Does EUR 50 sound as fair price to you?

A partial solution is to forget about guile, use \displayLilyMusic and
pipe lily's stdout to a file. However lily insists on creating .ps
and .pdf files, which I don't neccessarily want it to do. I'll look at
the implementation of \displayLilyMusic to see if I get any ideas.

I think it ought to be possible to write a .ly file containing guile
code that makes lilypond do the following:

        1) Read another .ly file
        2) parse that file
        3) convert the resulting music to .ly source code
        4) write this code to a third .ly file


--
 Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen




reply via email to

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