Re: how to create a book from multiple .ly files

2020-02-05 Thread Kieren MacMillan
Hi Dario,

> i wrote some training exercises for the piano; I have a .ly file for each one

Good!

> because these exercises share the same structure (a musical pattern that is 
> translated to other keys) I put the music content (notes) on a separated .ly 
> file

Good!

> I read the documentation but I don't understand how to do to collect all the 
> exercises in a single book, with text parts between them. 

\include "firstscore.ly"
\include "secondscore.ly"
...
 
\score {
  <<
[first score]
  >>
}

\markup { "Text part" }

\score {
  <<
[second score]
  >>
}

\markup { "Text part" }

…


Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info




Re: how to create a book from multiple .ly files

2020-02-04 Thread Ralph Palmer
On Tue, Feb 4, 2020 at 8:23 AM Dario Marrini 
wrote:

> Hi musicians,
> i wrote some training exercises for the piano; I have a .ly file for each
> one; because these exercises share the same structure (a musical pattern
> that is translated to other keys) I put the music content (notes) on a
> separated .ly file; I read the documentation but I don't understand how to
> do to collect all the exercises in a single book, with text parts between
> them.
> I would avoid copyng and paste the music content on the final "book" .ly
> file, indeed using single exercises files as reference , but I don't know
> if I can or not. Any help is appreciated
>
> dario
>

Hi, Dario -

Please take a look at
http://lilypond.org/doc/v2.19/Documentation/notation/multiple-scores-in-a-book
in the Notation Reference. There, you can see how \bookpart can be used to
include the individual exercises, with text (using \markup, and represented
by the ellipsis (the ... ) on the line after the score.

I haven't ever put long text entries between \score s, but here's the
structure I've used successfully with fiddle tunes:

%%%
\version "2.19.81"
\language "english"

\include "*GlobalSettings*.ily"   % my file with global \paper,
\layout, and font size settings

\include "*tune1*".ly
\include "*tune2*".ly
\include "*tune3*".ly

% I don't know why I put this \paper here, rather than in \
*GlobalSettings*.ly. I think there was a reason, but I can't remember it
%%
\paper {
  scoreTitleMarkup = \markup {
\fill-line {
  { \column {
\fromproperty #'header:title
%\fromproperty #'header:poet
}
{ \fromproperty #'header:composer
}
  }
}
  }
}

\book {
  % Title of set.
  \header {
subtitle = \markup { \fontsize #4 "*Title of Collection*"}
  }

  % Tune 1 % This first tune has melody and harmony.
  \score {
\new GrandStaff
<<
  \new Staff
  \relative c' {
\clef alto
\*tuneOne*
  }
  \relative c' {
\clef alto
\new Staff
\*tuneOneHarmony*
  }
>>
\layout {
  indent = #0
  \context {
%prevent tunes from printing on two pages
\override NonMusicalPaperColumn.page-break-permission = ##f
  }
}

% Title and meter of this tune.
\header {
  title = \markup \large \bold "*Tune 1*"
  composer = \markup \bold "*Composer 1*"
}
  }
  \noPageBreak
  \markup \fill-line { " " }  % I used this for source and copyright
information.

 additional \markup can go here

   % Tune 2
  \score {
\relative c' {
  \clef alto
  { \*tuneTwo* }
}
\layout {
  indent = #0
  \context {
%prevent tunes from printing on two pages
\override NonMusicalPaperColumn.page-break-permission = ##f
  }
}

% Title and meter of this tune.
\header {
  title = \markup \large \bold "*Tune 2*"
  composer = \markup \bold "*Composer 2*"
}
  }
  \noPageBreak
  \markup \fill-line { " " } % I used this for source and copyright
information.

 additional \markup can go here

  % Tune 3
  \score {
\relative c' {
  \clef alto
  { \*tuneThree* }
}
\layout {
  indent = #0
  \context {
%prevent tunes from printing on two pages
\override NonMusicalPaperColumn.page-break-permission = ##f
  }
}

% Title and meter of this tune.
\header {
  title = \markup \large \bold "*Tune 3*"
  composer = \markup \bold "*Composer 3*"
}
  }
  \noPageBreak
  \markup \fill-line { " " } % I used this for source and copyright
information.

 additional \markup can go here

}

%%%

I'm pretty sure I've closed all the {}s, and not put in any extra }s, but
I'm not positive. Let me know if you have any other questions. I have the
\layout {...} entry in both the *GlobalSettings*.ily and in the individual
files; I'm not sure that's necessary, but I seem to recall having a problem
when I omitted that entry from the individual files.

Regarding text between the tunes, or exercises in your case, I have minimal
experience, and someone else might be able to give you better advice.

HTH,

Ralph

-- 
Ralph Palmer
Brattleboro, VT
USA
(he, him, his)
palmer.r.vio...@gmail.com


how to create a book from multiple .ly files

2020-02-04 Thread Dario Marrini
Hi musicians,
i wrote some training exercises for the piano; I have a .ly file for each
one; because these exercises share the same structure (a musical pattern
that is translated to other keys) I put the music content (notes) on a
separated .ly file; I read the documentation but I don't understand how to
do to collect all the exercises in a single book, with text parts between
them.
I would avoid copyng and paste the music content on the final "book" .ly
file, indeed using single exercises files as reference , but I don't know
if I can or not. Any help is appreciated

dario