Re: combining pieces in one book

2012-06-25 Thread Dr. med. Kai Lautenschläger
Am 23.06.2012 um 22:23 schrieb David Kastrup d...@gnu.org:

 Dr. med. Kai Lautenschläger kai.lautenschlae...@me.com writes:
 
 and got the following errors (this is just the first few of many many errors:
 
 ---8---SNIP---
 »/Users/kailautenschlager/Documents/02_Musik
 (SugarSync)/LP/BuchTest/BuchTest.ly« wird verarbeitet
 Analysieren...
 /Users/kailautenschlager/Documents/02_Musik
 (SugarSync)/LP/BuchTest/../001Test/001Test.ly:54:0: Fehler: syntax
 error, unexpected STRING
 
 global = {
 /Users/kailautenschlager/Documents/02_Musik
 (SugarSync)/LP/BuchTest/../001Test/001Test.ly:67:0: Fehler: syntax
 error, unexpected STRING
 
 A \book can't contain assignments.
 

Hi David, what do you mean by assignments? I'm not a native speaker and not 
familiar with programming. Is assignments a fix set of command?

Kai
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: combining pieces in one book

2012-06-25 Thread Jan-Peter Voigt


Hi David, what do you mean by assignments? I'm not a native speaker 
and not familiar with programming. Is assignments a fix set of command?


Kai


Hello Kai,
it's the assignment of a variable in lily-syntax:

--snip--
% allowed
musik = \relative c'' { bes a c b }

% not allowed
\score {
musik = \relative c'' { bes a c b }
}
--snip--

that means, that a construct [var = value] (without [])  may never be 
inside { ... } or  ... 


You might trick that:
--snip--

parserDefine = #(define-music-function (parser location name 
mus)(symbol? not-null?)


(ly:parser-define! parser name mus)

(make-music 'SequentialMusic 'void #t))

--snip--
and then use
\parserDefine #'musik \relative c'' { c e d b }


parserDefine now is a music-function and can be used anywhere. This way 
the variable musik can be assigned and afterwords called via \musik


... but I woudn't recommend it! This might have *side-effects* and can 
lead to badly organized code!


HTH
Cheers, Jan-Peter


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: combining pieces in one book

2012-06-25 Thread Dr. med. Kai Lautenschläger
Hi Jan-Peter,

thanks for the explanation. Right now I am fiddling around with Christophers 
idea of splitting up the files in content-files and layout-files. I had this 
before and just changed… Oh, well. It sounds logical to me though. and working 
with functions is just copy and paste for me, because I don't now the code and 
couldn't find an error nor tweak the options.

Thanks also to the others, that gave their comments. Now I have to ponder the 
answers. I fear though, I will be back again with more questions… ;-)

best regards,
Kai

Am 25.6.2012 um 11:40 schrieb Jan-Peter Voigt:

 
 Hi David, what do you mean by assignments? I'm not a native speaker and not 
 familiar with programming. Is assignments a fix set of command?
 
 Kai
 
 Hello Kai,
 it's the assignment of a variable in lily-syntax:
 
 --snip--
 % allowed
 musik = \relative c'' { bes a c b }
 
 % not allowed
 \score {
 musik = \relative c'' { bes a c b }
 }
 --snip--
 
 that means, that a construct [var = value] (without [])  may never be inside 
 { ... } or  ... 
 
 You might trick that:
 --snip--
 
 parserDefine = #(define-music-function (parser location name mus)(symbol? 
 not-null?)
 
 (ly:parser-define! parser name mus)
 
 (make-music 'SequentialMusic 'void #t))
 
 --snip--
 and then use
 \parserDefine #'musik \relative c'' { c e d b }
 
 
 parserDefine now is a music-function and can be used anywhere. This way the 
 variable musik can be assigned and afterwords called via \musik
 
 ... but I woudn't recommend it! This might have *side-effects* and can lead 
 to badly organized code!
 
 HTH
 Cheers, Jan-Peter
 
 
 ___
 lilypond-user mailing list
 lilypond-user@gnu.org
 https://lists.gnu.org/mailman/listinfo/lilypond-user

Mit freundlichen Grüßen



K. Lautenschläger
---
la...@gmx.de

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


combining pieces in one book

2012-06-23 Thread Dr. med. Kai Lautenschläger
Hi to all,

If this has been answered before, please point me there. I searched the manual 
several times, but couldn't find an answer, that helped me. 

I have many pieces for male choir, that are stored as .ly-files in a directory 
with a subdirectory for every piece. All of them use some files via \include 
command. Those files are situated in the parent directory.

Now I would like to make a book (one PDF with TOC and numbered pages) from 
several of these pieces. And - to make it more complicated - this book changes 
in content (the .ly-files are the repertoire, book will be the selection for 
any given concert.

I am searching for a solution to _easily_ make those books without working on 
the pieces-files. Using \bookpart gave a great number of errors and didn't 
compile. Can anyone give me a starter, how to go about this?

Thanks
Kai

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: combining pieces in one book

2012-06-23 Thread Christopher R. Maden
On 06/23/2012 09:53 AM, Dr. med. Kai Lautenschläger wrote:
 I have many pieces for male choir, that are stored as .ly-files in a
 directory with a subdirectory for every piece. All of them use some
 files via \include command. Those files are situated in the parent
 directory.
 
 Now I would like to make a book (one PDF with TOC and numbered pages)
 from several of these pieces. And - to make it more complicated -
 this book changes in content (the .ly-files are the repertoire, book
 will be the selection for any given concert.
 
 I am searching for a solution to _easily_ make those books without
 working on the pieces-files. Using \bookpart gave a great number of
 errors and didn't compile. Can anyone give me a starter, how to go
 about this?

As best I can tell, you need to structure things carefully to make this
work.  This may mean that you will need to do a one-time edit on the
pieces themselves.

1) Music content with no \score.

2) Individual layout pieces: \include the music content and have a \score.

3) Book file, \includes each piece of music, uses \bookpart if you like
and \score.

I automate this to some degree by pulling out paper and other common
definitions, e.g.:

=-=-=-=-=

wind_barley_tune.ly:

\windBarleyLayout = \new Staff  ... 
\windBarleyTitle = The Wind That Shakes the Barley

=-=-=-=-=

tunes.ly:

\paper { ... }
\header { title = \theTitle }
\score { \theLayout \layout {} }

=-=-=-=-=

wind_barley.ly:

\include wind_barley_tune.ly
theLayout = \windBarleyLayout
theTitle = \windBarleyTitle
\include tunes.ly

=-=-=-=-=

crism_tunes.ly:

\paper { ... }
\header { ... }
\include musical_priest_tune.ly
\include wind_barley_tune.ly
\score { \musPriestLayout \layout {} }
\score { \windBarleyLayout \layout {} }

=-=-=-=-=

~Chris
-- 
Chris Maden, text nerd  URL: http://crism.maden.org/ 
LIVE FREE: vote for Gary Johnson, Libertarian for President.
 URL: http://garyjohnson2012.com/   URL: http://lp.org/ 
GnuPG fingerprint: DB08 CF6C 2583 7F55 3BE9  A210 4A51 DBAC 5C5C 3D5E



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: combining pieces in one book

2012-06-23 Thread Federico Bruni

Il 23/06/2012 15:53, Dr. med. Kai Lautenschläger ha scritto:

Hi to all,

If this has been answered before, please point me there. I searched
the manual several times, but couldn't find an answer, that helped
me.



I'm CCing lilypond-bug, because I believe that missing index entries for 
book and bookpart doesn't help when searching this kind of information.


@bugsquad Please add a @cindex for \book and \bookpart

They are introduced in NR 3.1.2 (bookpart) and 3.1.3 (book).


I have many pieces for male choir, that are stored as .ly-files in a
directory with a subdirectory for every piece. All of them use some
files via \include command. Those files are situated in the parent
directory.

Now I would like to make a book (one PDF with TOC and numbered pages)
from several of these pieces. And - to make it more complicated -
this book changes in content (the .ly-files are the repertoire, book
will be the selection for any given concert.

I am searching for a solution to _easily_ make those books without
working on the pieces-files. Using \bookpart gave a great number of
errors and didn't compile. Can anyone give me a starter, how to go
about this?




In order to understand what you are doing wrong, you should post a 
minimal example and copy the error message.


I remember I had problems with bookpart when I started using lilypond:
http://lists.gnu.org/archive/html/lilypond-user/2009-08/msg00835.html
http://lists.gnu.org/archive/html/lilypond-user/2009-08/msg00856.html

Since then I've never used bookpart anymore, now I just use a main file 
which include the \score(s) defined in separate files.  See attached 
file here:

http://lists.gnu.org/archive/html/lilypond-user/2012-05/msg00057.html

HTH
--
Federico

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: combining pieces in one book

2012-06-23 Thread Phil Holmes
- Original Message - 
From: Dr. med. Kai Lautenschläger kai.lautenschlae...@me.com

To: lilypond-user User lilypond-user@gnu.org
Sent: Saturday, June 23, 2012 2:53 PM
Subject: combining pieces in one book



Hi to all,

If this has been answered before, please point me there. I searched the 
manual several times, but couldn't find an answer, that helped me.


I have many pieces for male choir, that are stored as .ly-files in a 
directory with a subdirectory for every piece. All of them use some files 
via \include command. Those files are situated in the parent directory.


Now I would like to make a book (one PDF with TOC and numbered pages) from 
several of these pieces. And - to make it more complicated - this book 
changes in content (the .ly-files are the repertoire, book will be the 
selection for any given concert.


I am searching for a solution to _easily_ make those books without working 
on the pieces-files. Using \bookpart gave a great number of errors and 
didn't compile. Can anyone give me a starter, how to go about this?


Thanks
Kai



2 obvious options come to mind:  lilypond-book, which is documented in the 
Usage manual 
http://lilypond.org/doc/v2.14/Documentation/usage/lilypond_002dbook.


Alternatively, you can simply use \book in the following way:

\book {
 \markup { Some text }
 \include AFile.ly
}

You would need to add your own contents page once the layout was sorted out.

--
Phil Holmes 



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: combining pieces in one book

2012-06-23 Thread Dr. med. Kai Lautenschläger

Am 23.06.2012 um 16:37 schrieb Phil Holmes:

 - Original Message - From: Dr. med. Kai Lautenschläger 
 kai.lautenschlae...@me.com
 To: lilypond-user User lilypond-user@gnu.org
 Sent: Saturday, June 23, 2012 2:53 PM
 Subject: combining pieces in one book
 
 
 I have many pieces for male choir, that are stored as .ly-files in a 
 directory with a subdirectory for every piece. All of them use some files 
 via \include command. Those files are situated in the parent directory.
 
 Now I would like to make a book (one PDF with TOC and numbered pages) from 
 several of these pieces. And - to make it more complicated - this book 
 changes in content (the .ly-files are the repertoire, book will be the 
 selection for any given concert.
 
 I am searching for a solution to _easily_ make those books without working 
 on the pieces-files. Using \bookpart gave a great number of errors and 
 didn't compile. Can anyone give me a starter, how to go about this?
 
 
 2 obvious options come to mind:  lilypond-book, which is documented in the 
 Usage manual 
 http://lilypond.org/doc/v2.14/Documentation/usage/lilypond_002dbook.
I am using a Mac and am not experienced enough to understand the manual and 
requirements mentioned there. All the extern programs won't work, telling my, 
there is no python to be found. It's there, though - but this should be a new 
topic here. Only: lilypond-book has not been a solution so far.

 Alternatively, you can simply use \book in the following way:
 
 \book {
 \markup { Some text }
 \include AFile.ly
 }

Sounds good. I did this: 
---8---SNIP---
\version 2.15.40
\book {
\markup { 001Test }
\include ../001Test/001Test.ly
}
---8---SNIP---


and got the following errors (this is just the first few of many many errors:

---8---SNIP---
»/Users/kailautenschlager/Documents/02_Musik 
(SugarSync)/LP/BuchTest/BuchTest.ly« wird verarbeitet
Analysieren...
/Users/kailautenschlager/Documents/02_Musik 
(SugarSync)/LP/BuchTest/../001Test/001Test.ly:54:0: Fehler: syntax error, 
unexpected STRING

global = {
/Users/kailautenschlager/Documents/02_Musik 
(SugarSync)/LP/BuchTest/../001Test/001Test.ly:67:0: Fehler: syntax error, 
unexpected STRING

mid = {
/Users/kailautenschlager/Documents/02_Musik 
(SugarSync)/LP/BuchTest/../001Test/001Test.ly:74:0: Fehler: syntax error, 
unexpected STRING

StimmeEins = \relative c' {
/Users/kailautenschlager/Documents/02_Musik 
(SugarSync)/LP/BuchTest/../001Test/001Test.ly:83:0: Fehler: syntax error, 
unexpected STRING

StimmeZwei = \relative c' {
/Users/kailautenschlager/Documents/02_Musik 
(SugarSync)/LP/BuchTest/../001Test/001Test.ly:92:0: Fehler: syntax error, 
unexpected STRING

StimmeDrei = \relative c {
/Users/kailautenschlager/Documents/02_Musik 
---8---SNIP---

What am I missing?
Kai
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: combining pieces in one book

2012-06-23 Thread David Kastrup
Dr. med. Kai Lautenschläger kai.lautenschlae...@me.com writes:

 and got the following errors (this is just the first few of many many errors:

 ---8---SNIP---
 »/Users/kailautenschlager/Documents/02_Musik
 (SugarSync)/LP/BuchTest/BuchTest.ly« wird verarbeitet
 Analysieren...
 /Users/kailautenschlager/Documents/02_Musik
 (SugarSync)/LP/BuchTest/../001Test/001Test.ly:54:0: Fehler: syntax
 error, unexpected STRING

 global = {
 /Users/kailautenschlager/Documents/02_Musik
 (SugarSync)/LP/BuchTest/../001Test/001Test.ly:67:0: Fehler: syntax
 error, unexpected STRING

A \book can't contain assignments.

-- 
David Kastrup


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user