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