]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/string-quartet-template-with-separate-parts.ly
7efde9f3a74876fb837946b8c8558646fdb3e4d4
[lilypond.git] / Documentation / snippets / string-quartet-template-with-separate-parts.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.di.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.18.0"
8
9 \header {
10   lsrtags = "preparing-parts, template, unfretted-strings"
11
12   texidoc = "
13 The @qq{String quartet template} snippet produces a nice string
14 quartet, but what if you needed to print parts? This new template
15 demonstrates how to use the @code{\\tag} feature to easily split a
16 piece into individual parts.
17
18 You need to split this template into separate files; the filenames are
19 contained in comments at the beginning of each file. @code{piece.ly}
20 contains all the music definitions. The other files – @code{score.ly},
21 @code{vn1.ly}, @code{vn2.ly}, @code{vla.ly}, and @code{vlc.ly} –
22 produce the appropriate part.
23
24
25 Do not forget to remove specified comments when using separate files!
26
27 "
28   doctitle = "String quartet template with separate parts"
29 } % begin verbatim
30
31 %%%%% piece.ly
32 %%%%% (This is the global definitions file)
33
34 global= {
35   \time 4/4
36   \key c \major
37 }
38
39 Violinone = \new Voice { \relative c''{
40   \set Staff.instrumentName = #"Violin 1 "
41
42   c2 d e1
43
44 \bar "|." }}   %*********************************
45 Violintwo = \new Voice { \relative c''{
46   \set Staff.instrumentName = #"Violin 2 "
47
48   g2 f e1
49
50 \bar "|." }}   %*********************************
51 Viola = \new Voice { \relative c' {
52   \set Staff.instrumentName = #"Viola "
53   \clef alto
54
55   e2 d c1
56
57 \bar "|." }}   %*********************************
58 Cello = \new Voice { \relative c' {
59   \set Staff.instrumentName = #"Cello "
60   \clef bass
61
62   c2 b a1
63
64 \bar "|."}}   %**********************************
65
66 music = {
67   <<
68     \tag #'score \tag #'vn1 \new Staff { << \global \Violinone >> }
69     \tag #'score \tag #'vn2 \new Staff { << \global \Violintwo>> }
70     \tag #'score \tag #'vla \new Staff { << \global \Viola>> }
71     \tag #'score \tag #'vlc \new Staff { << \global \Cello>> }
72   >>
73 }
74
75 %%% These are the other files you need to save on your computer
76
77 %%%%% score.ly
78 %%%%% (This is the main file)
79
80 %%% uncomment the line below when using a separate file
81 %\include "piece.ly"
82 #(set-global-staff-size 14)
83 \score {
84   \new StaffGroup \keepWithTag #'score \music
85   \layout { }
86   \midi { }
87 }
88
89
90 %{ Uncomment this block when using separate files
91
92 %%%%% vn1.ly
93 %%%%% (This is the Violin 1 part file)
94
95 \include "piece.ly"
96 \score {
97   \keepWithTag #'vn1 \music
98   \layout { }
99 }
100
101
102 %%%%% vn2.ly
103 %%%%% (This is the Violin 2 part file)
104
105 \include "piece.ly"
106 \score {
107   \keepWithTag #'vn2 \music
108   \layout { }
109 }
110
111
112 %%%%% vla.ly
113 %%%%% (This is the Viola part file)
114
115 \include "piece.ly"
116 \score {
117   \keepWithTag #'vla \music
118   \layout { }
119 }
120
121
122 %%%%% vlc.ly
123 %%%%% (This is the Cello part file)
124
125 \include "piece.ly"
126 \score {
127   \keepWithTag #'vlc \music
128   \layout { }
129 }
130
131 %}