]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/combining-two-parts-on-the-same-staff.ly
Merge branch 'master' of ssh+git://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  texidoc = "
8 The part combiner tool ( @code{\\partcombine} command ) allows you to
9 combine different parts on the same staff. Text directions such as
10 \"solo\" or \"a2\" are added by default; to remove them, simply set the
11 property @code{printPartCombineTexts} to \"false\". For vocal scores
12 (hymns), there is no need to add \"solo\"/\"a2\" texts, so they should
13 be switched off. However, you'd better not use it if there are any
14 solos, as they won't be indicated. In such cases, you may simply want
15 to use standard LilyPond polyphony. This snippet presents the three
16 ways two parts can be printed on a same staff: standard polyphony,
17 @code{\\partcombine} whitout texts, and @code{\\partcombine} with texts.
18
19
20
21 " }
22 % begin verbatim
23 musicUp = \relative c'' {
24   \time 4/4
25   a4 c4.( g8) a4 |
26   g4 e' g,( a8 b) |
27   c b a2.
28 }
29
30 musicDown = \relative c'' {
31   g4 e4.( d8) c4 |
32   r2 g'4( f8 e) |
33   d2 \stemDown a
34 }
35
36 \score {
37   <<
38     <<
39     \new Staff {
40       \set Staff.instrumentName = "Standard polyphony  "
41       << \musicUp  \\ \musicDown >>
42     }
43     \new Staff \with { printPartCombineTexts = ##f } {
44       \set Staff.instrumentName = "PartCombine without texts  "
45       \partcombine \musicUp \musicDown
46     }
47     \new Staff {
48       \set Staff.instrumentName = "PartCombine with texts  "
49       \partcombine \musicUp \musicDown
50     }
51     >>
52   >>
53   \layout {
54     indent = 6.0\cm
55     \context {
56       \Score
57       \override SystemStartBar #'collapse-height = #30
58     }
59   }
60 }