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

[ Thread Index | Date Index | More lilynet.net/frogs Archives ]




On 9/19/09 7:27 AM, "Ian Hulin" <ian@xxxxxxxxxxxx> 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.

Carl


---

----
Join the Frogs!


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/