]> git.donarmstrong.com Git - lilypond.git/blob - ly/property-init.ly
010b5ac0a9bf618a8489e10de0225fd928ca8c24
[lilypond.git] / ly / property-init.ly
1 % property-init.ly
2
3 \version "2.12.0"
4
5 stemUp = \override Stem #'direction = #UP
6 stemDown = \override Stem #'direction = #DOWN 
7 stemNeutral = \revert Stem #'direction
8
9 slurUp = \override Slur #'direction = #UP
10 slurDown = \override Slur #'direction = #DOWN
11 slurNeutral = \revert Slur #'direction
12
13 #(define (make-simple-dash-definition dash-fraction dash-period)
14     (list (list 0 1 dash-fraction dash-period)))
15
16 slurDashed = {
17   \override Slur #'dash-definition =  #'((0 1 0.4 0.75))
18 }
19 slurDashPattern = 
20 #(define-music-function (parser location dash-fraction dash-period)
21   (number? number?)
22   #{
23      \override Slur #'dash-definition =
24        $(make-simple-dash-definition dash-fraction dash-period)
25   #})
26 slurDotted = {
27   \override Slur #'dash-definition =  #'((0 1 0.1 0.75))
28 }
29 slurHalfDashed = {
30   \override Slur #'dash-definition =  #'((0 0.5 0.4 0.75)
31                                          (0.5 1 1 1))
32 }
33 slurHalfSolid = {
34   \override Slur #'dash-definition =  #'((0 0.5 1 1)
35                                          (0.5 1 0.4 0.75))
36 }
37 slurSolid = {
38   \revert Slur #'dash-definition
39 }
40
41
42
43 phrasingSlurUp = \override PhrasingSlur #'direction = #UP
44 phrasingSlurDown = \override PhrasingSlur #'direction = #DOWN
45 phrasingSlurNeutral = \revert PhrasingSlur #'direction
46
47 phrasingSlurDashed = {
48   \override PhrasingSlur #'dash-definition =  #'((0 1 0.4 0.75))
49 }
50 phrasingSlurDashPattern = 
51 #(define-music-function (parser location dash-fraction dash-period)
52   (number? number?)
53   #{
54      \override PhrasingSlur #'dash-definition =
55        $(make-simple-dash-definition dash-fraction dash-period)
56   #})
57 phrasingSlurDotted = {
58   \override PhrasingSlur #'dash-definition =  #'((0 1 0.1 0.75))
59 }
60 phrasingSlurHalfDashed = {
61   \override PhrasingSlur #'dash-definition =  #'((0 0.5 0.4 0.75)
62                                                  (0.5 1 1 1))
63 }
64 phrasingSlurHalfSolid = {
65   \override PhrasingSlur #'dash-definition =  #'((0 0.5 1 1)
66                                                  (0.5 1 0.4 0.75))
67 }
68 phrasingSlurSolid = {
69   \revert PhrasingSlur #'dash-definition
70 }
71
72 mergeDifferentlyDottedOn = {
73   \override Staff.NoteCollision #'merge-differently-dotted = ##t
74 }
75 mergeDifferentlyDottedOff = {
76   \revert Staff.NoteCollision #'merge-differently-dotted
77 }
78
79 mergeDifferentlyHeadedOn = {
80   \override Staff.NoteCollision #'merge-differently-headed = ##t
81 }
82 mergeDifferentlyHeadedOff = {
83   \revert Staff.NoteCollision #'merge-differently-headed
84 }
85
86 shiftOn = \override NoteColumn #'horizontal-shift = #1
87 shiftOnn = \override NoteColumn #'horizontal-shift = #2
88 shiftOnnn = \override NoteColumn #'horizontal-shift = #3
89 shiftOff = \revert NoteColumn #'horizontal-shift
90
91 tieUp = \override Tie #'direction = #UP
92 tieDown = \override Tie #'direction = #DOWN
93 tieNeutral = \revert Tie #'direction
94
95 tieDashed = {
96   \override Tie #'dash-definition = #'((0 1 0.4 0.75))
97 }
98 tieDashPattern = 
99 #(define-music-function (parser location dash-fraction dash-period)
100   (number? number?)
101   #{
102      \override Tie #'dash-definition =
103        $(make-simple-dash-definition dash-fraction dash-period)
104   #})
105 tieDotted = {
106   \override Tie #'dash-definition = #'((0 1 0.1 0.75))
107 }
108 tieHalfDashed = {
109   \override Tie #'dash-definition =  #'((0 0.5 0.4 0.75)
110                                         (0.5 1 1 1))
111 }
112 tieHalfSolid = {
113   \override Tie #'dash-definition =  #'((0 0.5 1 1)
114                                         (0.5 1 0.4 0.75))
115 }
116 tieSolid = {
117   \revert Tie #'dash-definition
118 }
119
120 easyHeadsOn = {
121   \override NoteHead #'stencil = #ly:note-head::brew-ez-stencil
122   \override NoteHead #'font-size = #-7
123   \override NoteHead #'font-family = #'sans
124   \override NoteHead #'font-series = #'bold
125 }
126
127 easyHeadsOff = {
128   \revert NoteHead #'stencil
129   \revert NoteHead #'font-size
130   \revert NoteHead #'font-family
131   \revert NoteHead #'font-series
132 }
133
134 aikenHeads = \set shapeNoteStyles = #'#(do re mi fa #f la ti)
135
136 sacredHarpHeads = \set shapeNoteStyles = #'#(fa #f la fa #f la mi)
137
138 dynamicUp = {
139   \override DynamicText #'direction = #UP
140   \override DynamicLineSpanner #'direction = #UP
141 }
142
143 dynamicDown = {
144   \override DynamicText #'direction = #DOWN
145   \override DynamicLineSpanner #'direction = #DOWN
146 }
147
148 dynamicNeutral = {
149   \revert DynamicText #'direction
150   \revert DynamicLineSpanner #'direction
151 }
152
153
154 dotsUp = \override Dots #'direction = #UP
155 dotsDown = \override Dots #'direction = #DOWN
156 dotsNeutral = \revert Dots #'direction
157
158 tupletUp = \override TupletBracket #'direction = #UP
159 tupletDown = \override TupletBracket #'direction = #DOWN
160 tupletNeutral = \revert TupletBracket #'direction
161
162 cadenzaOn = \set Timing.timing = ##f
163 cadenzaOff = {
164   \set Timing.timing = ##t
165   \set Timing.measurePosition = #ZERO-MOMENT
166 }
167
168 % dynamic ly:dir?  text script, articulation script ly:dir? 
169 oneVoice = #(context-spec-music (make-voice-props-revert) 'Voice)
170 voiceOne = #(context-spec-music (make-voice-props-set 0) 'Voice)
171 voiceTwo = #(context-spec-music (make-voice-props-set 1) 'Voice)
172 voiceThree = #(context-spec-music (make-voice-props-set 2) 'Voice)
173 voiceFour = #(context-spec-music (make-voice-props-set 3) 'Voice)
174
175 voiceOneStyle = {
176   \override NoteHead #'style = #'diamond
177   \override NoteHead #'color = #red
178   \override Stem #'color = #red
179   \override Beam #'color = #red
180 }
181 voiceTwoStyle = {
182   \override NoteHead #'style = #'triangle
183   \override NoteHead #'color = #blue
184   \override Stem #'color = #blue
185   \override Beam #'color = #blue
186 }
187 voiceThreeStyle = {
188   \override NoteHead #'style = #'xcircle
189   \override NoteHead #'color = #green
190   \override Stem #'color = #green
191   \override Beam #'color = #green
192 }
193 voiceFourStyle = {
194   \override NoteHead #'style = #'cross
195   \override NoteHead #'color = #magenta
196   \override Stem #'color = #magenta
197   \override Beam #'color = #magenta
198 }
199 voiceNeutralStyle = {
200   \revert NoteHead #'style
201   \revert NoteHead #'color
202   \revert Stem #'color
203   \revert Beam #'color
204 }
205
206 teeny = {
207   \set fontSize = #-3
208 }
209
210 tiny = {
211   \set fontSize = #-2
212 }
213
214 small = {
215   \set fontSize = #-1
216 }
217
218 normalsize = {
219   \set fontSize = #0
220 }
221
222 large = {
223   \set fontSize = #1
224 }
225
226 huge = {
227   \set fontSize = #2
228 }
229
230 %% End the incipit and print a ``normal line start''.
231 endincipit = \context Staff {
232   \partial 16 s16  % Hack to handle e.g. \bar ".|" \endincipit
233   \once \override Staff.Clef #'full-size-change = ##t
234   \once \override Staff.Clef #'non-default = ##t
235   \bar ""
236 }
237
238 autoBeamOff = \set autoBeaming = ##f
239 autoBeamOn = \set autoBeaming = ##t
240
241 textLengthOn = {
242   \override TextScript #'extra-spacing-width = #'(0 . 0)
243   \override TextScript #'extra-spacing-height = #'(-inf.0 . +inf.0)
244 }
245
246 textLengthOff = {
247   \override TextScript #'extra-spacing-width = #'(+inf.0 . -inf.0)
248   \override TextScript #'extra-spacing-height = #'(0 . 0)
249 }
250
251 balloonLengthOn = {
252   \override BalloonTextItem #'extra-spacing-width = #'(0 . 0)
253   \override BalloonTextItem #'extra-spacing-height = #'(-inf.0 . +inf.0)
254 }
255
256 balloonLengthOff = {
257   \override BalloonTextItem #'extra-spacing-width = #'(+inf.0 . -inf.0)
258   \override BalloonTextItem #'extra-spacing-height = #'(0 . 0)
259 }
260
261
262 showStaffSwitch = \set followVoice = ##t
263 hideStaffSwitch = \set followVoice = ##f
264
265 expandFullBarRests = {
266   \set Score.skipBars = ##f
267 }
268
269 compressFullBarRests = {
270   \set Score.skipBars = ##t
271 }
272
273 numericTimeSignature = {
274   \override Staff.TimeSignature #'style = #'()
275 }
276
277 defaultTimeSignature = {
278   \revert Staff.TimeSignature #'style
279 }
280
281
282 % For drawing vertical chord brackets with \arpeggio
283 % This is a shorthand for the value of the print-function property 
284 % of either Staff.Arpeggio or PianoStaff.Arpeggio, depending whether 
285 % cross-staff brackets are desired. 
286
287 arpeggio = #(make-music 'ArpeggioEvent)
288
289 arpeggioArrowUp = {
290   \revert Arpeggio  #'stencil
291   \revert Arpeggio #'X-extent
292   \override Arpeggio  #'arpeggio-direction = #UP
293 }
294 arpeggioArrowDown = {
295   \revert Arpeggio #'stencil
296   \revert Arpeggio #'X-extent
297   \override Arpeggio  #'arpeggio-direction = #DOWN
298 }
299 arpeggioNormal = {
300   \revert Arpeggio #'stencil
301   \revert Arpeggio #'X-extent
302   \revert Arpeggio  #'arpeggio-direction
303 }
304 arpeggioBracket = {
305   \revert Arpeggio #'X-extent
306   \override Arpeggio #'stencil = #ly:arpeggio::brew-chord-bracket
307 }
308 arpeggioParenthesis = {
309   \override Arpeggio #'stencil = #ly:arpeggio::brew-chord-slur
310   \override Arpeggio #'X-extent = #ly:grob::stencil-width
311 }
312
313 glissando = #(make-music 'GlissandoEvent)
314
315 fermataMarkup = \markup { \musicglyph #"scripts.ufermata" } 
316
317 hideNotes = {
318   % hide notes, accidentals, etc.
319   \override Dots #'transparent = ##t
320   \override NoteHead #'transparent = ##t
321   \override NoteHead #'no-ledgers = ##t
322   \override Stem #'transparent = ##t
323   \override Beam #'transparent = ##t
324   \override Accidental #'transparent = ##t
325 }
326
327
328 unHideNotes = {
329   \revert Accidental #'transparent
330   \revert Beam #'transparent
331   \revert Stem #'transparent
332   \revert NoteHead #'transparent
333   \revert NoteHead #'no-ledgers
334   \revert Dots #'transparent
335 }
336
337 germanChords = {
338   \set chordRootNamer = #(chord-name->german-markup #t)
339   \set chordNoteNamer = #note-name->german-markup
340 }
341 semiGermanChords = {
342   \set chordRootNamer = #(chord-name->german-markup #f)
343   \set chordNoteNamer = #note-name->german-markup
344 }
345
346 frenchChords = {
347   \set chordRootNamer = #(chord-name->italian-markup #t)
348   \set chordPrefixSpacer = #0.4
349 }
350
351 italianChords = {
352   \set chordRootNamer = #(chord-name->italian-markup #f)
353   \set chordPrefixSpacer = #0.4
354 }
355
356 improvisationOn = {
357   \set squashedPosition = #0
358   \override NoteHead #'style = #'slash
359   \override Accidental #'stencil = ##f
360 }
361
362 improvisationOff = {
363   \unset squashedPosition
364   \revert NoteHead #'style
365   \revert Accidental #'stencil
366 }
367
368 textSpannerUp = \override TextSpanner #'direction = #UP
369 textSpannerDown = \override TextSpanner #'direction = #DOWN
370 textSpannerNeutral = \revert TextSpanner #'direction
371
372
373
374 bassFigureExtendersOn = {
375   \set useBassFigureExtenders = ##t
376   \set Staff.useBassFigureExtenders = ##t
377 }
378
379 bassFigureExtendersOff = {
380   \set useBassFigureExtenders = ##f
381   \set Staff.useBassFigureExtenders = ##f
382 }
383
384 bassFigureStaffAlignmentDown = {
385   \override Staff.BassFigureAlignmentPositioning #'direction = #DOWN
386 }
387
388 bassFigureStaffAlignmentUp = {
389   \override Staff.BassFigureAlignmentPositioning #'direction = #UP
390 }
391
392 bassFigureStaffAlignmentNeutral = {
393   \revert Staff.BassFigureAlignmentPositioning #'direction
394 }
395
396 predefinedFretboardsOff = {  
397   \set FretBoards.predefinedDiagramTable = ##f
398 }
399
400 predefinedFretboardsOn = {
401   \set FretBoards.predefinedDiagramTable = #fretboard-table
402 }
403
404 pointAndClickOff = #(define-music-function (parser location) ()
405                       (ly:set-option 'point-and-click #f)
406                       (make-music 'SequentialMusic 'void #t))
407
408 pointAndClickOn = #(define-music-function (parser location) ()
409                       (ly:set-option 'point-and-click #t)
410                       (make-music 'SequentialMusic 'void #t))