]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/string-quartet-template-with-separate-parts.ly
Updates snippets from LSR
[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.dsi.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.14.2"
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
32 %%%%% piece.ly
33 %%%%% (This is the global definitions file)
34
35 global= {
36   \time 4/4
37   \key c \major
38 }
39
40 Violinone = \new Voice { \relative c''{
41   \set Staff.instrumentName = #"Violin 1 "
42
43   c2 d e1
44
45 \bar "|." }}   %*********************************
46 Violintwo = \new Voice { \relative c''{
47   \set Staff.instrumentName = #"Violin 2 "
48
49   g2 f e1
50
51 \bar "|." }}   %*********************************
52 Viola = \new Voice { \relative c' {
53   \set Staff.instrumentName = #"Viola "
54   \clef alto
55
56   e2 d c1
57
58 \bar "|." }}   %*********************************
59 Cello = \new Voice { \relative c' {
60   \set Staff.instrumentName = #"Cello "
61   \clef bass
62
63   c2 b a1
64
65 \bar "|."}}   %**********************************
66
67 music = {
68   <<
69     \tag #'score \tag #'vn1 \new Staff { << \global \Violinone >> }
70     \tag #'score \tag #'vn2 \new Staff { << \global \Violintwo>> }
71     \tag #'score \tag #'vla \new Staff { << \global \Viola>> }
72     \tag #'score \tag #'vlc \new Staff { << \global \Cello>> }
73   >>
74 }
75
76 %%% These are the other files you need to save on your computer
77
78 %%%%% score.ly
79 %%%%% (This is the main file)
80
81 %%% uncomment the line below when using a separate file
82 %\include "piece.ly"
83 #(set-global-staff-size 14)
84 \score {
85   \new StaffGroup \keepWithTag #'score \music
86   \layout { }
87   \midi { }
88 }
89
90
91 %{ Uncomment this block when using separate files
92
93 %%%%% vn1.ly
94 %%%%% (This is the Violin 1 part file)
95
96 \include "piece.ly"
97 \score {
98   \keepWithTag #'vn1 \music
99   \layout { }
100 }
101
102
103 %%%%% vn2.ly
104 %%%%% (This is the Violin 2 part file)
105
106 \include "piece.ly"
107 \score {
108   \keepWithTag #'vn2 \music
109   \layout { }
110 }
111
112
113 %%%%% vla.ly
114 %%%%% (This is the Viola part file)
115
116 \include "piece.ly"
117 \score {
118   \keepWithTag #'vla \music
119   \layout { }
120 }
121
122
123 %%%%% vlc.ly
124 %%%%% (This is the Cello part file)
125
126 \include "piece.ly"
127 \score {
128   \keepWithTag #'vlc \music
129   \layout { }
130 }
131
132 %}