> ---------- Forwarded message ----------
> From: Andrew Bernard <andrew.bern...@gmail.com>
> To: lilypond-user Mailinglist <lilypond-user@gnu.org>
> Date: Wed, 13 Mar 2019 21:10:32 +1100
> Subject: Advice sought on making parts for string quartet
> I'm seeking the advice of the list expertise on the topic of producing
> parts for a string quartet. I think I know the answer to this in advance,
> but I want to validate my ideas. In the score I am setting for a composer
> colleague, we are fussy about pagination and line breaks. Lilypond does a
> marvellous job of layout out music, but all our scores use explicit page
> and line breaks at all times. I don't currently use a separate part to
> control the layout vis a vis line and page breaking, since the time
> signature changes multiple times per pages and it would be a major
> headache, two hundred pages of trying to track that separately.
>
> The issue is that if I use tags to produce a score and parts as per the
> standard examples, the explicitly written page breaks cause the parts to
> have page breaks after each line, obviously, instead of line breaks.
>
> I cannot be the only person to need to deal with this. What's the best
> practice for making parts when using explicit page breaking?
>
> Do I have to have a separate part for breaking, and one to be used for the
> score, and one to be used for parts?
>
> Andrew
>
> In the interests of having an MWE that shows what not to do, i.e., my
> effort so far, here we are:
>
> %====
>
> %%file: score.ly
> \version "2.19.82"
>
> \include "piece.ly"
>
> #(set-global-staff-size 14)
>
> \book {
>
>   \score {
>     \new StaffGroup \keepWithTag #'score \music
>     \layout { }
>     %\midi { }
>   }
> }
>
> \book {
>   \bookOutputName "violinone"
>   \score {
>     \keepWithTag #'vn1 \music
>     \layout { }
>   }
> }
>
> \book {
>   \bookOutputName "violintwo"
>   \score {
>     \keepWithTag #'vn2 \music
>     \layout { }
>   }
> }
>
> \book {
>   \bookOutputName "viola"
>   \score {
>     \keepWithTag #'vla \music
>     \layout { }
>   }
> }
>
> \book {
>   \bookOutputName "cello"
>   \score {
>     \keepWithTag #'vlc \music
>     \layout { }
>   }
> }
>
> %-----
> %% file: piece.ly
> \version "2.19.82"
>
> Violinone = \new Voice {
>   \relative c'' {
>     c2 d e1
>     \pageBreak
>     c2 d e1
>     \pageBreak
>     c2 d e1
>
>     \bar "|."
>   }
> }
>
> Violintwo = \new Voice {
>   \relative c'' {
>     g2 f e1
>     \pageBreak
>     g2 f e1
>     \pageBreak
>     g2 f e1
>
>     \bar "|."
>   }
> }
>
> Viola = \new Voice {
>   \relative c' {
>     \clef alto
>     e2 d c1
>     \pageBreak
>     e2 d c1
>     \pageBreak
>     e2 d c1
>     \bar "|."
>   }
> }
>
> Cello = \new Voice {
>   \relative c' {
>     \clef bass
>     c2 b a1
>     \pageBreak
>     c2 b a1
>     \pageBreak
>     c2 b a1
>     \bar "|."
>   }
> }
>
> global = {
>   \time 4/4
>   \key c \major
> }
>
> music = {
>   <<
>     \tag #'score \tag #'vn1
>     \new Staff \with { instrumentName = "Violin 1" }
>     << \global \Violinone >>
>
>     \tag #'score \tag #'vn2
>     \new Staff \with { instrumentName = "Violin 2" }
>     << \global \Violintwo>>
>
>     \tag #'score \tag #'vla
>     \new Staff \with { instrumentName = "Viola" }
>     << \global \Viola>>
>
>     \tag #'score \tag #'vlc
>     \new Staff \with { instrumentName = "Cello" }
>     << \global \Cello >>
>   >>
> }
>
> %====
>




The use of edition engraver is certainly one good approach.  Although, you
would have a similar task to the one you wanted to avoid, which is to
compile a separate mapping of breaks.  In the case of the ee, this amounts
to compiling a list of entries for each measure number where you need the
breaks, rather than creating another voice with all the durations.

The use of variables is very clever and something to consider.  I might
just switch to this in the future!

But I figured I'd share the approach I use, which solves this exact problem
for me such that I have not found a need to improve it, and for which you
are already set up, which is to use tags.  Tags support multiple names, so
in addition to whatever tags you are using currently, you could add ones to
distinguish between parts and the score.


The basic concept is that if you want a part-only line break, you can write

    \tag #'Part { \break }

If you want a score-only line break, you can write

    \tag #'Score { \break }

Same deal for page breaks.   For the ease of input, these can be defined:

    breakPart = \tag #'Part { \break }
    breakScore = \tag #'Score { \break }
    pageBreakPart = \tag #'Part { \pageBreak }
    pageBreakScore = \tag #'Score { \pageBreak }

And then to use them, you write:

    \breakPart
    \breakScore
    \pageBreakPart
    \pageBreakScore

So, for example:

Violinone = \new Voice {
  \relative c'' {
    c2 d e1
    \breakPart
    \pageBreakScore
    c2 d e1
    \pageBreakPart
    c2 d e1
    \bar "|."
  }
}


The one sticky point conceptually here is that, if you don't currently have
a global structure (your example's global just lists stuff at the top, and
does not map out the entire piece), that means you will have to put the
score-based breaks in one of the parts.

You might need to put the score-based breaks in more than one part if, for
example, you want to break the score during what is a multi-measure rest of
one of the parts.


Then, you just supply the appropriate tag in the \score's:

%%file: score.ly
\version "2.19.82"

\include "piece.ly"

#(set-global-staff-size 14)

\book {
  \score {
    % I changed this case to match my definitions above,
    % which should be fine for your example since you didn't use "score"
anywhere.
    % The () are just to clarify that this could be a list of tags, in case
you use others.
    \new StaffGroup \keepWithTag #'(Score) \music
    \layout { }
    %\midi { }
  }
}

\book {
  \bookOutputName "violinone"
  \score {
    %  This is really the only change:  use a list of tags, including the
one used in the part-based breaks
    \keepWithTag #'(Part vn1) \music
    \layout { }
  }
}


HTH,

Elaine Alt
415 . 341 .4954                                           "*Confusion is
highly underrated*"
ela...@flaminghakama.com
Producer ~ Composer ~ Instrumentalist ~ Educator
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to