bookparts

classic Classic list List threaded Threaded
38 messages Options
12
Reply | Threaded
Open this post in threaded view
|

bookparts

Noeck
Hi,

I need some further insights in what a bookpart is.
I've read the doc but it is very short on the issue:
http://lilypond.org/doc/v2.19/Documentation/notation/multiple-scores-in-a-book
My understanding from try and error is this (and I would be happy if you
could correct me or confirm the statements):


\paper blocks inside a \bookpart only affect this bookpart, while \paper
blocks outside affect everything. So it seems to be a scoping for paper
blocks.

Q: Is it correct that the bookpart is a scope for paper blocks?


If I put a \layout block in a \bookpart, lilypond complains and says:
Für Papier-Block wird \paper benötigt
(\paper needed for paper block) – whatever that means ...

Q: Is it correct that \layout blocks don't belong inside a \bookpart?


I can define variables at top-level and use them in any boobpart. But
defining a variable inside a bookpart fails ("Error: syntax error,
unexpected SYMBOL").

Q: Is it correct that I can't define a variable inside a bookpart?
Q: That means if I have many scores with many voices in my document,
   I need unique names for all of them and can not reuse \soprano for
   the next piece with different content?


As my included files contain definitions, I cannot include them inside a
bookpart as far as I understand. So I need to put them at top level, right?

Q: Included files just behave as if the content was inserted at the same
   position?
Q: Includes must be at top level?


When does a \paper block apply? The order of score and \paper block
doesn't seem to decide upon it. From the example below I am puzzled why
the top-level paper block applies to the second score but not to the
first. It is after all scores but on top-level. Shouldn't it affect
either both or none?


*What I want to achieve* is to have ~10 independent pieces and
concatenate all of them into one book as well as printing everyone on
its own. The separate pieces should have taglines etc. on the first/last
page as usual. But the book should not repeat them for every piece. Each
piece should start a new page in the book. I dreamed of just including
all the scores into one document. But the output is terrible (errors as
the ones above etc.).

Q: Should I use bookparts at all or just \pageBreaks?


Thanks for reading until here! :)

Cheers,
Joram




\bookpart {
  \paper {
    left-margin = 8\cm
  }

  \markup "ASD"
  \score {  { a } }
}

\bookpart {
  { b }
  \header {
    title= "Title"
  }
}

\paper {
  top-margin = 5\cm
}

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: bookparts

Thomas Morley-2
2018-03-04 18:09 GMT+01:00 Noeck <[hidden email]>:

> Hi,
>
> I need some further insights in what a bookpart is.
> I've read the doc but it is very short on the issue:
> http://lilypond.org/doc/v2.19/Documentation/notation/multiple-scores-in-a-book
> My understanding from try and error is this (and I would be happy if you
> could correct me or confirm the statements):
>
>
> \paper blocks inside a \bookpart only affect this bookpart, while \paper
> blocks outside affect everything. So it seems to be a scoping for paper
> blocks.
>
> Q: Is it correct that the bookpart is a scope for paper blocks?

Hi,

you may be interested in this
http://lilypond.1069038.n5.nabble.com/Setting-paper-for-bookpart-td204803.html
discussion, not that it'll help a lot...

Cheers,
  Harm

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: bookparts

David Kastrup
Thomas Morley <[hidden email]> writes:

> 2018-03-04 18:09 GMT+01:00 Noeck <[hidden email]>:
>> Hi,
>>
>> I need some further insights in what a bookpart is.
>> I've read the doc but it is very short on the issue:
>> http://lilypond.org/doc/v2.19/Documentation/notation/multiple-scores-in-a-book
>> My understanding from try and error is this (and I would be happy if you
>> could correct me or confirm the statements):
>>
>>
>> \paper blocks inside a \bookpart only affect this bookpart, while \paper
>> blocks outside affect everything. So it seems to be a scoping for paper
>> blocks.
>>
>> Q: Is it correct that the bookpart is a scope for paper blocks?
>
> Hi,
>
> you may be interested in this
> http://lilypond.1069038.n5.nabble.com/Setting-paper-for-bookpart-td204803.html
> discussion, not that it'll help a lot...

I actually don't have much of an idea how bookparts are supposed to work
and what differentiates them from books reliably and whether books may
be used as bookparts and vice versa and what that means.

The C++ data structures are the same.  books always have a paper block,
but if you add a paper block to a bookpart it will take it well enough
and I don't know how to distinguish them from books then.

--
David Kastrup

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: bookparts

Kieren MacMillan
Hi David,

> I actually don't have much of an idea how bookparts are supposed to work
> and what differentiates them from books reliably and whether books may
> be used as bookparts and vice versa and what that means.
>
> The C++ data structures are the same.  books always have a paper block,
> but if you add a paper block to a bookpart it will take it well enough
> and I don't know how to distinguish them from books then.

book = file
bookpart = portion of file with forced page break

No?
K.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: bookparts

David Kastrup
Kieren MacMillan <[hidden email]> writes:

> Hi David,
>
>> I actually don't have much of an idea how bookparts are supposed to work
>> and what differentiates them from books reliably and whether books may
>> be used as bookparts and vice versa and what that means.
>>
>> The C++ data structures are the same.  books always have a paper block,
>> but if you add a paper block to a bookpart it will take it well enough
>> and I don't know how to distinguish them from books then.
>
> book = file
> bookpart = portion of file with forced page break
>
> No?

No.  One input file can have several books (and there is one implicit
book where scores and bookparts outside of books end up).

There might be more of a connection with output files but even that gets
muddy in relation to midi files.

--
David Kastrup

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: bookparts

Kieren MacMillan
Hi David,

>> book = file
>> bookpart = portion of file with forced page break
>>
>> No?
>
> No.  One input file can have several books (and there is one implicit
> book where scores and bookparts outside of books end up).
>

> There might be more of a connection with output files


Yes, sorry… I meant

   book = output file
   bookpart = portion of output file with forced page break.

> even that gets muddy in relation to midi files.

Interesting.

Thanks!
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: bookparts

David Kastrup
Kieren MacMillan <[hidden email]> writes:

> Hi David,
>
>>> book = file
>>> bookpart = portion of file with forced page break
>>>
>>> No?
>>
>> No.  One input file can have several books (and there is one implicit
>> book where scores and bookparts outside of books end up).
>>
>
>> There might be more of a connection with output files
>
>
> Yes, sorry… I meant
>
>    book = output file
>    bookpart = portion of output file with forced page break.
>
>> even that gets muddy in relation to midi files.
>
> Interesting.

Or something.  This is really an area where one needs to make a large
inventory of what is there and behaves in what manner, and then design a
mostly coherent and useful theory about it, document it, and make sure
that everything matches that documentation.  At the moment stuff follows
no obvious principles and almost makes sense if you don't look at too
many things at once.

Which is poison for further development and actually explaining to
people how to use stuff.

--
David Kastrup

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: bookparts

Wols Lists
In reply to this post by Kieren MacMillan
On 04/03/18 19:11, Kieren MacMillan wrote:

> Hi David,
>
>>> book = file
>>> bookpart = portion of file with forced page break
>>>
>>> No?
>>
>> No.  One input file can have several books (and there is one implicit
>> book where scores and bookparts outside of books end up).
>>
>
>> There might be more of a connection with output files
>
>
> Yes, sorry… I meant
>
>    book = output file
>    bookpart = portion of output file with forced page break.
>
Or even forced file break?

Istr some option that creates a new file for each bookpart with a suffix
on the output file name.

Cheers,
Wol


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: bookparts

Graeme Lee-2
In reply to this post by Noeck
Hi Noeck.

On 5/03/2018 4:09 AM, Noeck wrote:

> Hi,
>
> I need some further insights in what a bookpart is.
> I've read the doc but it is very short on the issue:
> http://lilypond.org/doc/v2.19/Documentation/notation/multiple-scores-in-a-book
> My understanding from try and error is this (and I would be happy if you
> could correct me or confirm the statements):
>
>
> \paper blocks inside a \bookpart only affect this bookpart, while \paper
> blocks outside affect everything. So it seems to be a scoping for paper
> blocks.
>
> Q: Is it correct that the bookpart is a scope for paper blocks?
It overrides its parent \paper block in \book
> If I put a \layout block in a \bookpart, lilypond complains and says:
> Für Papier-Block wird \paper benötigt
> (\paper needed for paper block) – whatever that means ...
>
> Q: Is it correct that \layout blocks don't belong inside a \bookpart?
>
Here's a working example.  Full header on :

   \bookpart {
     \header {
       instrument = \markup { \smallCaps "Violin I" }
     }
     \paper {
       oddHeaderMarkup = \markup {
         \column {
           \fill-line {
             \on-the-fly #not-single-page
             \fromproperty #'header:instrument
           }
           " "
         }
       }
       evenHeaderMarkup = \oddHeaderMarkup
     }
     \score {
       \new StaffGroup \keepWithTag #'vnp \Imusic
       \layout {
         \compressFullBarRests
         \context {
           \Score
           \override MultiMeasureRest.expand-limit = #2
           \override MetronomeMark.self-alignment-X = #0.2
           \override MetronomeMark.padding = #2
         }
         \context {
           \Staff \override InstrumentName #'stencil = ##f
         }
       }
     }
   }
> I can define variables at top-level and use them in any boobpart. But
> defining a variable inside a bookpart fails ("Error: syntax error,
> unexpected SYMBOL").
>
> Q: Is it correct that I can't define a variable inside a bookpart?
> Q: That means if I have many scores with many voices in my document,
>     I need unique names for all of them and can not reuse \soprano for
>     the next piece with different content?
Maybe explore using tags for your voices?

>
> As my included files contain definitions, I cannot include them inside a
> bookpart as far as I understand. So I need to put them at top level, right?
>
> Q: Included files just behave as if the content was inserted at the same
>     position?
> Q: Includes must be at top level?
>
>
> When does a \paper block apply? The order of score and \paper block
> doesn't seem to decide upon it. From the example below I am puzzled why
> the top-level paper block applies to the second score but not to the
> first. It is after all scores but on top-level. Shouldn't it affect
> either both or none?
>
The first score overrides the top level \paper block with its own.

> *What I want to achieve* is to have ~10 independent pieces and
> concatenate all of them into one book as well as printing everyone on
> its own. The separate pieces should have taglines etc. on the first/last
> page as usual. But the book should not repeat them for every piece. Each
> piece should start a new page in the book. I dreamed of just including
> all the scores into one document. But the output is terrible (errors as
> the ones above etc.).
>
> Q: Should I use bookparts at all or just \pageBreaks?
>
>
> Thanks for reading until here! :)
>
> Cheers,
> Joram
>
>
>
>
> \bookpart {
>    \paper {
>      left-margin = 8\cm
>    }
>
>    \markup "ASD"
>    \score {  { a } }
> }
>
> \bookpart {
>    { b }
>    \header {
>      title= "Title"
>    }
> }
>
> \paper {
>    top-margin = 5\cm
> }
>
> _______________________________________________
> lilypond-user mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/lilypond-user


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: bookparts

Kieren MacMillan
In reply to this post by Noeck
Hi Joram,

> *What I want to achieve* is to have ~10 independent pieces and
> concatenate all of them into one book as well as printing everyone on
> its own.

I do this all the time: my musicals each have 20+ independent "cues" (songs, instrumentals, etc.); the songs are always printed together in big books (Piano/Conductor Score, Piano/Vocal Score, Chorus/Vocal Score, etc.); often, the more popular songs have their own separate score (to be sold individually).

> I need some further insights in what a bookpart is.

I think of a bookpart as a \paper scope. I generally *use* bookparts as a way to lock in certain page breaks easily: for example, the first three songs of the Piano/Conductor Score of a musical might fit nicely on 8 pages, so I wrap the three \scores in a \bookpart with a \paper { page-count = 3 } instruction.

> \paper blocks inside a \bookpart only affect this bookpart, while \paper
> blocks outside affect everything. So it seems to be a scoping for paper
> blocks.

Exactly.  =)

> Q: Is it correct that the bookpart is a scope for paper blocks?

If you’re asking whether your understanding is correct, then I would say "Yes (or at least close enough)".

If you’re asking whether Lily’s \bookpart *should* [only] be a scope for paper blocks… then I'd say "No".

> Q: Is it correct that \layout blocks don't belong inside a \bookpart?

Yes; you can bury that in the score if you need it.

> Q: Is it correct that I can't define a variable inside a bookpart?

Yes. This is probably my biggest issue with bookparts currently.

> Q: That means if I have many scores with many voices in my document,
>   I need unique names for all of them and can not reuse \soprano for
>   the next piece with different content?

Yes. I learned that the hard way…

> As my included files contain definitions, I cannot include them inside a
> bookpart as far as I understand. So I need to put them at top level, right?

Correct.

> Q: Included files just behave as if the content was inserted at the same
>   position?
> Q: Includes must be at top level?

Yes x 2.

> Each piece should start a new page in the book.

Sometimes even in that case I use \bookparts.

> Q: Should I use bookparts at all or just \pageBreaks?

I suggest \bookparts… but I've already done the work (e.g., having unique variable names) that makes it easier.

Hope this helps!
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: bookparts

Kieren MacMillan
Oof…

> for example, the first three songs of the Piano/Conductor Score of a musical might fit nicely on 8 pages, so I wrap the three \scores in a \bookpart with a \paper { page-count = 3 } instruction.

Obviously, that should be page-count = 8.
Sorry for the typo.

K.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: bookparts

David Kastrup
In reply to this post by Kieren MacMillan
Kieren MacMillan <[hidden email]> writes:

>> Q: Included files just behave as if the content was inserted at the same
>>   position?
>> Q: Includes must be at top level?
>
> Yes x 2.

Second yes is wrong.

--
David Kastrup

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: bookparts

Kieren MacMillan
Hi David,

>>> Q: Included files just behave as if the content was inserted at the same
>>>  position?
>>> Q: Includes must be at top level?
>>
>> Yes x 2.
>
> Second yes is wrong.

Even if the included file has variable definitions?

Thanks,
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: bookparts

Kieren MacMillan
e.g.

%%%  file1.ly

\version "2.19.58"
testing = { c''4 4 4 4 }


%%%  file2.ly

\version "2.19"
\bookpart {
  \include "tempTest.ly"
  \score { \testing }
}

throws several errors.

Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: bookparts

Kieren MacMillan
Arg. typo in the comment line… should be:

%%%  tempTest.ly

\version "2.19"
testing = { c''4 4 4 4 }


%%%  file2.ly

\version "2.19"
\bookpart {
 \include "tempTest.ly"
 \score { \testing }
}

throws several errors.

Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: bookparts

Knut Petersen
Hi Kieren!

> %%%  tempTest.ly
>
> \version "2.19"
> testing = { c''4 4 4 4 }
>
>
> %%%  file2.ly
>
> \version "2.19"
> \bookpart {
>   \include "tempTest.ly"
>   \score { \testing }
> }
>
> throws several errors.
Because the definition of testing is invalid at that point of the main
source file. If tempTest.ly would contain e.g. a score or a \paper block
no error would occur.

Knut

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: bookparts

Knut Petersen
In reply to this post by Noeck
Hi Joram et al!
> *What I want to achieve* is to have ~10 independent pieces and
> concatenate all of them into one book as well as printing everyone on
> its own. The separate pieces should have taglines etc. on the first/last
> page as usual. But the book should not repeat them for every piece. Each
> piece should start a new page in the book. I dreamed of just including
> all the scores into one document. But the output is terrible (errors as
> the ones above etc.).
>

I think the attached file gives some useful examples.

Knut

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

4Joram.ly (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: bookparts

David Kastrup
In reply to this post by Kieren MacMillan
Kieren MacMillan <[hidden email]> writes:

> Hi David,
>
>>>> Q: Included files just behave as if the content was inserted at the same
>>>>  position?
>>>> Q: Includes must be at top level?
>>>
>>> Yes x 2.
>>
>> Second yes is wrong.
>
> Even if the included file has variable definitions?

Variable definitions must be at top level.  Included files just behave
as if the content was inserted at the same position without magically
changing the implications of variable definitions either way.

--
David Kastrup

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: bookparts

David Kastrup
In reply to this post by Kieren MacMillan
Kieren MacMillan <[hidden email]> writes:

> Arg. typo in the comment line… should be:
>
> %%%  tempTest.ly
>
> \version "2.19"
> testing = { c''4 4 4 4 }
>
>
> %%%  file2.ly
>
> \version "2.19"
> \bookpart {
>  \include "tempTest.ly"
>  \score { \testing }
> }
>
> throws several errors.

Sure.  Included files behave just as if inserted at that position, and
at that position no assignments are allowed.

I don't get what is so hard to understand about that.

--
David Kastrup

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: bookparts

Kieren MacMillan
In reply to this post by David Kastrup
Hi David,

> Variable definitions must be at top level.

That was my point to Joram.

Thanks,
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
12