denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] Book with Denemo


From: Andreas Schneider
Subject: Re: [Denemo-devel] Book with Denemo
Date: Thu, 5 May 2016 22:16:14 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0

I have been doing a little research in the lilypond docs. One can put
\book blocks around groups of movements. When having several \book
blocks, the contents of each book blocks goes into a different file. See
http://lilypond.org/doc/v2.18/Documentation/notation/multiple-output-files-from-one-input-file

I want to have chapters in my book. This is done with \bookpart blocks.
No \book block seems necessary when only one output file is desired. I
have written the following scripts to put a group of movements into a
\bookpart:

;;;StartBookpart
(let ((tag "StartBookpart"))
  (d-DirectivePut-movementcontrol-prefix tag "\\bookpart { %start of
bookpart\n")
  (d-SetSaved #f)
)

;;;EndBookpart
(let ((tag "EndBookpart"))
  (d-DirectivePut-movementcontrol-postfix tag "\n} %end of bookpart\n")
  (d-SetSaved #f)
)

However, I do not know how to emit a \header block with a chapter title
inside the bookpart but outside the score block of the first movement of
the bookpart. Is this possible with a script?

Regarding the paper block, there are four possibilities according to
http://lilypond.org/doc/v2.18/Documentation/notation/the-paper-block
When setting the values for the whole document, the correct place is at
the top level. Emitting the \paper block inside a \book block means the
definitions are for that book. That is, if you have multiple \book
blocks, the \layout is valid only for the \book it is defined in.
However, in most cases one will have only one \book block (either
explicitly written or implicitly defined); then it does not matter if
the \paper block is inside or outside the \book block.

That the default paper size is hard-wired explains that I was not able
to change it with a script. (Using a script to emit a default-paper-size
resulted in two such definitions in the lilypond code, but only the
hard-wired one was used.) What is the correct way in Denemo to change
the default paper size, e.g. to landscape mode?

Andreas


Am 05.05.2016 um 15:44 schrieb Richard Shann:
> Well, this puts a \book { before the first movement and } after the
> last:
> 
> (d-PushPosition)
> (while (d-PreviousMovement))
> (d-DirectivePut-score-prefix "test" "\\book {\n")
> (while (d-NextMovement))
> (d-DirectivePut-movementcontrol-postfix "test" "\n}%end of book \n")
> (d-PopPosition)
> 
> It would need a bit of further work to make it into a proper command -
> if you added a further movement it would need to find the old end of
> book and move it, (so setting the DENEMO_OVERRIDE_DYNAMIC override field
> would probably be good and making it look for whether it was already
> present), but before getting to that I see some peculiarities:
> 
> The 
> 
> #(set-default-paper-size "a4")
> #(set-global-staff-size 18)
> 
> are issued by hard-wired code using the values in the  built in score
> properties. These are *inside* the \book { which appears to make a
> difference, though I don't understand quite what difference it is.
> If you can experiment with this and find out whether it makes more sense
> to move the d-DirectivePut-score-prefix output to immediately before the
> \score then I should be able to move it.
> The second thing I notice is that the \paper {} block is emitted after
> this \book {  though that doesn't appear to affect the output. But again
> it would be good to know where the \paper {} block *should* come.
> 
> Lastly, it is ugly that the closing of the \book { is being placed after
> the last movement, it should be possible to do it with a
> d-DirectivePut-score-postfix so that it would continue to work even when
> further movements are added. It should be possible to arrange for this
> by overriding the default placing of the output(*). If you can say this
> is useful code to be able to add I can do this. One possibility, however
> is that we just build it in to Denemo's LilyPond output that the \book
> { } is explicitly output for every Denemo score. (Or would it sometimes
> be desirable to put several \book { } 's around groups of movements in a
> Denemo score???)
> 
> Richard
> (*) by default d-DirectivePut-score-postfix is output in every movement
> after the start of the \score block, before the music.




reply via email to

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