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