lilypond-devel
[Top][All Lists]
Advanced

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

Re: [frogs] [PATCH]: Tracker 836 - Allow output filename and output-suff


From: Carl Sorensen
Subject: Re: [frogs] [PATCH]: Tracker 836 - Allow output filename and output-suffix to be specified for a \book block
Date: Mon, 26 Oct 2009 16:05:32 -0600



On 10/26/09 1:47 PM, "Ian Hulin" <address@hidden> wrote:

> Carl Sorensen wrote:
>> 
>> 
>> On 10/23/09 5:52 PM, "Ian Hulin" <address@hidden> wrote:
>> 

>> 
>>> \bookOutputName and \bookOuptutNameRevert use the book-filename as a stack
>>> structure.  I have used this so we can we could eventually allow users to do
>>> stuff like the following (controlling the names used to open the midi files
>>> is
>>> not part of the current patch).
>>> \book {
>>>     \bookOutputName "My-Homeland"
>>>     \score {
>>>        \bookOutputName "Vysehrad"
>>>           music-declarations ...
>>>           \midi{
>>>           % midi file gets written to Vysehrad.mid(i)
>>>           }
>>>           \layout{
>>>           }
>>>        \bookOutputNameRevert
>>>     }
>>>     \score {
>>>         \bookOuputName "Vltava"
>>>         ...
>>>         \midi {
>>>         % midi file is written to Vltava.mid(i)
>>>         }
>>>     }
>>> .
>>> .
>>> . 
>> 
>> This code doesn't demonstrate the need for \bookOutputNameRevert; the same
>> thing would happen if the \bookOutputNameRevert were omitted, as far as I
>> can tell.
>> 
> 
> Consider this in one file Smetana.ly:
> 
> ;;  Music for Má Vlast
> \book {
>         \bookOutputName "My-Homeland"
>         \score {
>                 \bookOutputName "Vyšehrad"
>                 ...
>         }
>         \score {
>                 \bookOutputName "Vltava"
>                 ...
>         }
>         %%   three more \score blocks setting the output name
>         \score {
>                 \bookOutputName "Blanik"
>                 ...
>         }
> }
> 
> ;; Music for "Bartered Bride Overure"
> \book {
>         % No \bookOutputName here
>         % Until scoping for \book blocks is sorted out,
>         % this block will get output to Blanik.pdf and Blanik.midi.
>         \score {
>         ...
>         }
> }      
> 

Yes, I understand the issues with (the lack of) scoping of bookOutputNames.

But where in this example would you put \bookOutputNameRevert (or
\bookOutputNameUsePrevious)?

If you put it after the the last score in My-Homeland,  then I guess it
would go to the default values again.

It seems to me the problem could easily be resolved here by just giving a
bookOutputName to Bartered Bride Overture (and if one is using
bookOutputName in some of the books, it seems reasonable to use it for all
of the books).  It also seems that one could just set it to "" in order to
use the default, and there wouldn't be a need for a separate revert.

Also, following on with the discussion we had on the earlier message, if
every \book block initializes the bookOutputName to the default value, that
implements a scoping rule, IIUC.

HTH,

Carl





reply via email to

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