[Top][All Lists]

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

Re: [frogs] Enhancement request: Define output-suffix as a configurable

From: Carl Sorensen
Subject: Re: [frogs] Enhancement request: Define output-suffix as a configurable context property.
Date: Sat, 19 Sep 2009 08:05:48 -0600

On 9/19/09 7:27 AM, "Ian Hulin" <address@hidden> wrote:

> Hi Carl, Neil,
> I'm quite happy to re-think the proposal if what I have in mind contravenes
> existing design architecture.
> Put it down to relative inexperience and the fact I don't get opportunity to
> work on lilly as often as I'd like.
> Anyhow, here are some of the reasons why I'd like to do something with this
> stuff:
> * Using parser variables to configure things is evil, because it requires
> users to drop into Scheme to set the parser variable. I feel we need to
> replace #(define output-suffix "gibbon-vole-aardvark") with something handled
> at the lilypond language level.
> *  
> * At the moment, output-suffix is de facto a property of a \book block.  There
> is a design assumption (informal club rule) in lilypond  that we only produce
> one back-end output file (.pdf, .png whatever) per \book block.
> * However, there is as great big exception to this in the form of midi files,
> one of which one is output for every \score block with a \midi present. At the
> moment the file name generation code kludges its way around this but it not
> very clean, unclear and all this stuff is barely documented.
> * So what I'd like to do is to have some way of replacing the Scheme
> definition either -
> *  \book { 
> *      \set output-suffix "gibbon-vole-aardvark"
> *      {... \score blocks and things}
> * }
> * , or 
> * \book \with {output-suffix = "gibbon-vole-aardvark"}
> * {
> *    {... \score blocks and things}
> * }.

Could one define a void music function

setOutputSuffix =
#(define-music-function (parser layout new-output-suffix) (string?)
    (define output-suffix new-output-suffix)
    (make-music 'SequentialMusic 'void #t))

then do

\book {
   \setOutputSuffix "gibbon-vole-aardvark"
   {... \score blocks and things ...}

I haven't tried it, but I think it may work.


reply via email to

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