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