]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/combining-two-parts-on-the-same-staff.ly
Merge branch 'master' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / input / lsr / combining-two-parts-on-the-same-staff.ly
1 %% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
2 %% This file is in the public domain.
3 \version "2.11.38"
4
5 \header {
6   lsrtags = "simultaneous-notes, text"
7
8   texidoc = "
9 The part combiner tool ( @code{\\partcombine} command ) allows the
10 combination of several different parts on the same staff. Text
11 directions such as \"solo\" or \"a2\" are added by default; to remove
12 them, simply set the property @code{printPartCombineTexts} to
13 \"false\". For vocal scores (hymns), there is no need to add
14 \"solo\"/\"a2\" texts, so they should be switched off. However, it
15 might be better not to use it if there are any solos, as they won't be
16 indicated. In such cases, standard polyphonic notation may be
17 preferable.
18
19 This snippet presents the three ways two parts can be printed on a same
20 staff: standard polyphony, @code{\\partcombine} without texts, and
21 @code{\\partcombine} with texts.
22
23
24
25
26 "
27   doctitle = "Combining two parts on the same staff"
28 } % begin verbatim
29 musicUp = \relative c'' {
30   \time 4/4
31   a4 c4.( g8) a4 |
32   g4 e' g,( a8 b) |
33   c b a2.
34 }
35
36 musicDown = \relative c'' {
37   g4 e4.( d8) c4 |
38   r2 g'4( f8 e) |
39   d2 \stemDown a
40 }
41
42 \score {
43   <<
44     <<
45     \new Staff {
46       \set Staff.instrumentName = "Standard polyphony  "
47       << \musicUp  \\ \musicDown >>
48     }
49     \new Staff \with { printPartCombineTexts = ##f } {
50       \set Staff.instrumentName = "PartCombine without texts  "
51       \partcombine \musicUp \musicDown
52     }
53     \new Staff {
54       \set Staff.instrumentName = "PartCombine with texts  "
55       \partcombine \musicUp \musicDown
56     }
57     >>
58   >>
59   \layout {
60     indent = 6.0\cm
61     \context {
62       \Score
63       \override SystemStartBar #'collapse-height = #30
64     }
65   }
66 }