]> git.donarmstrong.com Git - lilypond.git/blob - ly/performer-init.ly
Issue 3225: Decouple \defaultchild from \accepts list in contexts
[lilypond.git] / ly / performer-init.ly
1 %%%% This file is part of LilyPond, the GNU music typesetter.
2 %%%%
3 %%%% Copyright (C) 1996--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
4 %%%%                          Jan Nieuwenhuizen <janneke@gnu.org>
5 %%%%
6 %%%% LilyPond is free software: you can redistribute it and/or modify
7 %%%% it under the terms of the GNU General Public License as published by
8 %%%% the Free Software Foundation, either version 3 of the License, or
9 %%%% (at your option) any later version.
10 %%%%
11 %%%% LilyPond is distributed in the hope that it will be useful,
12 %%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
13 %%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 %%%% GNU General Public License for more details.
15 %%%%
16 %%%% You should have received a copy of the GNU General Public License
17 %%%% along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
18
19 \version "2.17.11"
20
21 %%
22 %% setup for Request->Element conversion.
23 %%
24 \context {
25   \type "Performer_group"
26   \name Staff
27   \accepts Voice
28   \accepts CueVoice
29   \defaultchild Voice
30
31   \consists "Staff_performer"
32   \consists "Key_performer"
33 }
34
35 \context {
36   \name Global
37   \accepts Score
38   \defaultchild Score
39   \description "Hard coded entry point for LilyPond.  Cannot be tuned."
40   EventClasses = #all-event-classes
41 }
42
43 \context {
44   \type "Performer_group"
45   \name KievanStaff
46   \denies Voice
47   \accepts KievanVoice
48   \defaultchild KievanVoice
49   \alias Staff
50   \consists "Staff_performer"
51   \consists "Key_performer"
52 }
53
54 \context {
55   \type "Performer_group"
56   \name VaticanaStaff
57   \alias Staff
58   \denies Voice
59   \accepts VaticanaVoice
60   \defaultchild VaticanaVoice
61   \consists "Staff_performer"
62   \consists "Key_performer"
63 }
64
65 \context {
66   \type "Performer_group"
67   \name MensuralStaff
68   \denies Voice
69   \accepts MensuralVoice
70   \defaultchild MensuralVoice
71   \alias Staff
72   \consists "Staff_performer"
73   \consists "Key_performer"
74 }
75
76 \context {
77   \Staff
78   \name DrumStaff
79   midiInstrument = #"drums"
80   \accepts DrumVoice
81   \defaultchild DrumVoice
82 }
83
84 \context {
85   \type "Performer_group"
86   \name Voice
87   \consists "Dynamic_performer"
88   \consists "Tie_performer"
89   \consists "Piano_pedal_performer"
90   \consists "Note_performer"
91   \consists "Beam_performer"
92   \consists "Slur_performer"
93 }
94
95 \context {
96   \Voice
97   \name CueVoice
98   \alias Voice
99 }
100
101 \context {
102   \type "Performer_group"
103   \name VaticanaVoice
104   \alias Voice
105   \consists "Dynamic_performer"
106   \consists "Tie_performer"
107   \consists "Note_performer"
108   \consists "Beam_performer"
109   autoBeaming = ##f  % needed for consistent melismata with engravers
110   \consists "Slur_performer"
111 }
112
113 \context {
114   \type "Performer_group"
115   \name KievanVoice
116   \alias Voice
117   \consists "Dynamic_performer"
118   \consists "Tie_performer"
119   \consists "Note_performer"
120   \consists "Beam_performer"
121   autoBeaming = ##f  % needed for consistent melismata with engravers
122   \consists "Slur_performer"
123 }
124
125 \context {
126   \type "Performer_group"
127   \name MensuralVoice
128   \alias Voice
129   \consists "Dynamic_performer"
130   \consists "Tie_performer"
131   \consists "Note_performer"
132   \consists "Beam_performer"
133   autoBeaming = ##f  % needed for consistent melismata with engravers
134   \consists "Slur_performer"
135 }
136
137 \context {
138   \Voice
139   \remove "Note_performer"
140   \consists "Drum_note_performer"
141   \name DrumVoice
142 }
143
144 \context {
145   \type "Performer_group"
146   \name FiguredBass
147 }
148
149 \context {
150   \type "Performer_group"
151   \name FretBoards
152 }
153
154 \context {
155   \type "Performer_group"
156   \name GrandStaff
157   \accepts RhythmicStaff
158   \accepts Staff
159   \accepts Dynamics
160   \defaultchild Staff
161 }
162
163 \context {
164   \type "Performer_group"
165   \name "PianoStaff"
166   \accepts Staff
167   \accepts DrumStaff
168   \defaultchild Staff
169 }
170
171 \context {
172   \Voice
173   \name TabVoice
174   autoBeaming = ##f  % needed for consistent melismata with engravers
175 }
176
177 \context {
178   \type "Performer_group"
179   \name "Devnull"
180 }
181
182 \context {
183   \Staff
184   \name TabStaff
185   midiInstrument = #"acoustic guitar (nylon)"
186   \alias Staff
187   \accepts TabVoice
188   \defaultchild TabVoice
189 }
190
191 \context {
192   \type "Score_performer"
193
194   \name Score
195
196   melismaBusyProperties = #default-melisma-properties
197   instrumentName = #"bright acoustic"
198   midiChannelMapping = #'staff
199
200   %% quarter = 60
201   tempoWholesPerMinute = #(ly:make-moment 15/1)
202
203   \accepts Staff
204   \accepts DrumStaff
205   \accepts GrandStaff
206   \accepts PianoStaff
207   \accepts TabStaff
208   \accepts StaffGroup
209   \accepts Devnull
210   \accepts ChoirStaff
211   \accepts RhythmicStaff
212   \accepts ChordNames
213   \accepts FiguredBass
214   \accepts FretBoards
215   \accepts Lyrics
216   \accepts VaticanaStaff
217   \accepts KievanStaff
218   \accepts MensuralStaff
219
220   \consists "Time_signature_performer"
221   \consists "Control_track_performer"
222   \consists "Tempo_performer"
223
224   \alias "Timing"
225
226   %% An alias for Timing is established by the Timing_translator in
227   %% whatever context it is initialized, and the timing variables are
228   %% then copied from wherever Timing had been previously established.
229   %% The alias at Score level provides a target for initializing
230   %% Timing variables in layout definitions before any
231   %% Timing_translator has been run.
232
233   timeSignatureSettings = #default-time-signature-settings
234   timeSignatureFraction = 4/4
235   autoBeaming = ##t  % needed for consistent melismata with engravers
236
237   %% Other beaming variables are not important as autobeams don't affect
238   %% the Midi.  Melismata are only affected by beams when autobeaming
239   %% is switched off.
240
241   \consists "Timing_translator"
242
243   \defaultchild "Staff"
244
245   dynamicAbsoluteVolumeFunction = #default-dynamic-absolute-volume
246   instrumentEqualizer = #default-instrument-equalizer
247   drumPitchTable = #(alist->hash-table midiDrumPitches)
248   timing = ##t
249 }
250
251
252 \context {
253   \type "Performer_group"
254   \consists "Staff_performer" % Performer_group ?
255   \consists "Lyric_performer"
256   \name Lyrics
257 }
258
259 \context{
260   \type "Performer_group"
261   \name ChoirStaff
262   \accepts Staff
263   \accepts DrumStaff
264   \defaultchild Staff
265 }
266
267 \context {
268   \type "Performer_group"
269   \consists "Staff_performer"
270   \accepts ChordNameVoice
271   \defaultchild ChordNameVoice
272   \name ChordNames
273 }
274
275 \context {
276   \Voice
277   \name ChordNameVoice
278 }
279
280 \context {
281   \type "Performer_group"
282   \name StaffGroup
283   \accepts Staff
284   \accepts DrumStaff
285   \accepts TabStaff
286   \accepts RhythmicStaff
287   \accepts GrandStaff
288   \accepts PianoStaff
289   \accepts Lyrics
290   \accepts ChordNames
291   \accepts FiguredBass
292   \accepts FretBoards
293   \defaultchild Staff
294 }
295
296 \context {
297   \Staff
298   \name RhythmicStaff
299 }
300
301 \context {
302   \type "Performer_group"
303   \name Dynamics
304   \consists "Piano_pedal_performer"
305 }