]> git.donarmstrong.com Git - lilypond.git/blob - ly/property-init.ly
fermataMarkup correction
[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 phrasingSlurUp = \override PhrasingSlur #'direction = #UP
43 phrasingSlurDown = \override PhrasingSlur #'direction = #DOWN
44 phrasingSlurNeutral = \revert PhrasingSlur #'direction
45
46 phrasingSlurDashed = {
47   \override PhrasingSlur #'dash-definition =  #'((0 1 0.4 0.75))
48 }
49 phrasingSlurDashPattern =
50 #(define-music-function (parser location dash-fraction dash-period)
51   (number? number?)
52   #{
53      \override PhrasingSlur #'dash-definition =
54        $(make-simple-dash-definition dash-fraction dash-period)
55   #})
56 phrasingSlurDotted = {
57   \override PhrasingSlur #'dash-definition =  #'((0 1 0.1 0.75))
58 }
59 phrasingSlurHalfDashed = {
60   \override PhrasingSlur #'dash-definition =  #'((0 0.5 0.4 0.75)
61                                                  (0.5 1 1 1))
62 }
63 phrasingSlurHalfSolid = {
64   \override PhrasingSlur #'dash-definition =  #'((0 0.5 1 1)
65                                                  (0.5 1 0.4 0.75))
66 }
67 phrasingSlurSolid = {
68   \revert PhrasingSlur #'dash-definition
69 }
70
71 mergeDifferentlyDottedOn = {
72   \override Staff.NoteCollision #'merge-differently-dotted = ##t
73 }
74 mergeDifferentlyDottedOff = {
75   \revert Staff.NoteCollision #'merge-differently-dotted
76 }
77
78 mergeDifferentlyHeadedOn = {
79   \override Staff.NoteCollision #'merge-differently-headed = ##t
80 }
81 mergeDifferentlyHeadedOff = {
82   \revert Staff.NoteCollision #'merge-differently-headed
83 }
84
85 shiftOn = \override NoteColumn #'horizontal-shift = #1
86 shiftOnn = \override NoteColumn #'horizontal-shift = #2
87 shiftOnnn = \override NoteColumn #'horizontal-shift = #3
88 shiftOff = \revert NoteColumn #'horizontal-shift
89
90 tieUp = \override Tie #'direction = #UP
91 tieDown = \override Tie #'direction = #DOWN
92 tieNeutral = \revert Tie #'direction
93
94 tieDashed = {
95   \override Tie #'dash-definition = #'((0 1 0.4 0.75))
96 }
97 tieDashPattern =
98 #(define-music-function (parser location dash-fraction dash-period)
99   (number? number?)
100   #{
101      \override Tie #'dash-definition =
102        $(make-simple-dash-definition dash-fraction dash-period)
103   #})
104 tieDotted = {
105   \override Tie #'dash-definition = #'((0 1 0.1 0.75))
106 }
107 tieHalfDashed = {
108   \override Tie #'dash-definition =  #'((0 0.5 0.4 0.75)
109                                         (0.5 1 1 1))
110 }
111 tieHalfSolid = {
112   \override Tie #'dash-definition =  #'((0 0.5 1 1)
113                                         (0.5 1 0.4 0.75))
114 }
115 tieSolid = {
116   \revert Tie #'dash-definition
117 }
118
119 easyHeadsOn = {
120   \override NoteHead #'stencil = #ly:note-head::brew-ez-stencil
121   \override NoteHead #'font-size = #-7
122   \override NoteHead #'font-family = #'sans
123   \override NoteHead #'font-series = #'bold
124 }
125
126 easyHeadsOff = {
127   \revert NoteHead #'stencil
128   \revert NoteHead #'font-size
129   \revert NoteHead #'font-family
130   \revert NoteHead #'font-series
131 }
132
133 aikenHeads = \set shapeNoteStyles = #'#(do re mi fa #f la ti)
134
135 sacredHarpHeads = \set shapeNoteStyles = #'#(fa #f la fa #f la mi)
136
137 dynamicUp = {
138   \override DynamicText #'direction = #UP
139   \override DynamicLineSpanner #'direction = #UP
140 }
141
142 dynamicDown = {
143   \override DynamicText #'direction = #DOWN
144   \override DynamicLineSpanner #'direction = #DOWN
145 }
146
147 dynamicNeutral = {
148   \revert DynamicText #'direction
149   \revert DynamicLineSpanner #'direction
150 }
151
152
153 dotsUp = \override Dots #'direction = #UP
154 dotsDown = \override Dots #'direction = #DOWN
155 dotsNeutral = \revert Dots #'direction
156
157 tupletUp = \override TupletBracket #'direction = #UP
158 tupletDown = \override TupletBracket #'direction = #DOWN
159 tupletNeutral = \revert TupletBracket #'direction
160
161 cadenzaOn = \set Timing.timing = ##f
162 cadenzaOff = {
163   \set Timing.timing = ##t
164   \set Timing.measurePosition = #ZERO-MOMENT
165 }
166
167 % dynamic ly:dir?  text script, articulation script ly:dir?
168 oneVoice = #(context-spec-music (make-voice-props-revert) 'Voice)
169 voiceOne = #(context-spec-music (make-voice-props-set 0) 'Voice)
170 voiceTwo = #(context-spec-music (make-voice-props-set 1) 'Voice)
171 voiceThree = #(context-spec-music (make-voice-props-set 2) 'Voice)
172 voiceFour = #(context-spec-music (make-voice-props-set 3) 'Voice)
173
174 voiceOneStyle = {
175   \override NoteHead #'style = #'diamond
176   \override NoteHead #'color = #red
177   \override Stem #'color = #red
178   \override Beam #'color = #red
179 }
180 voiceTwoStyle = {
181   \override NoteHead #'style = #'triangle
182   \override NoteHead #'color = #blue
183   \override Stem #'color = #blue
184   \override Beam #'color = #blue
185 }
186 voiceThreeStyle = {
187   \override NoteHead #'style = #'xcircle
188   \override NoteHead #'color = #green
189   \override Stem #'color = #green
190   \override Beam #'color = #green
191 }
192 voiceFourStyle = {
193   \override NoteHead #'style = #'cross
194   \override NoteHead #'color = #magenta
195   \override Stem #'color = #magenta
196   \override Beam #'color = #magenta
197 }
198 voiceNeutralStyle = {
199   \revert NoteHead #'style
200   \revert NoteHead #'color
201   \revert Stem #'color
202   \revert Beam #'color
203 }
204
205 teeny = {
206   \set fontSize = #-3
207 }
208
209 tiny = {
210   \set fontSize = #-2
211 }
212
213 small = {
214   \set fontSize = #-1
215 }
216
217 normalsize = {
218   \set fontSize = #0
219 }
220
221 large = {
222   \set fontSize = #1
223 }
224
225 huge = {
226   \set fontSize = #2
227 }
228
229 %% End the incipit and print a ``normal line start''.
230 endincipit = \context Staff {
231   \partial 16 s16  % Hack to handle e.g. \bar ".|" \endincipit
232   \once \override Staff.Clef #'full-size-change = ##t
233   \once \override Staff.Clef #'non-default = ##t
234   \bar ""
235 }
236
237 autoBeamOff = \set autoBeaming = ##f
238 autoBeamOn = \set autoBeaming = ##t
239
240 textLengthOn = {
241   \override TextScript #'extra-spacing-width = #'(0 . 0)
242   \override TextScript #'extra-spacing-height = #'(-inf.0 . +inf.0)
243 }
244
245 textLengthOff = {
246   \override TextScript #'extra-spacing-width = #'(+inf.0 . -inf.0)
247   \override TextScript #'extra-spacing-height = #'(0 . 0)
248 }
249
250 balloonLengthOn = {
251   \override BalloonTextItem #'extra-spacing-width = #'(0 . 0)
252   \override BalloonTextItem #'extra-spacing-height = #'(-inf.0 . +inf.0)
253 }
254
255 balloonLengthOff = {
256   \override BalloonTextItem #'extra-spacing-width = #'(+inf.0 . -inf.0)
257   \override BalloonTextItem #'extra-spacing-height = #'(0 . 0)
258 }
259
260
261 showStaffSwitch = \set followVoice = ##t
262 hideStaffSwitch = \set followVoice = ##f
263
264 expandFullBarRests = {
265   \set Score.skipBars = ##f
266 }
267
268 compressFullBarRests = {
269   \set Score.skipBars = ##t
270 }
271
272 numericTimeSignature = {
273   \override Staff.TimeSignature #'style = #'()
274 }
275
276 defaultTimeSignature = {
277   \revert Staff.TimeSignature #'style
278 }
279
280
281 % For drawing vertical chord brackets with \arpeggio
282 % This is a shorthand for the value of the print-function property
283 % of either Staff.Arpeggio or PianoStaff.Arpeggio, depending whether
284 % cross-staff brackets are desired.
285
286 arpeggio = #(make-music 'ArpeggioEvent)
287
288 arpeggioArrowUp = {
289   \revert Arpeggio  #'stencil
290   \revert Arpeggio #'X-extent
291   \override Arpeggio  #'arpeggio-direction = #UP
292 }
293 arpeggioArrowDown = {
294   \revert Arpeggio #'stencil
295   \revert Arpeggio #'X-extent
296   \override Arpeggio  #'arpeggio-direction = #DOWN
297 }
298 arpeggioNormal = {
299   \revert Arpeggio #'stencil
300   \revert Arpeggio #'X-extent
301   \revert Arpeggio #'arpeggio-direction
302   \revert Arpeggio #'dash-definition
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   \revert Arpeggio #'dash-definition
312 }
313 arpeggioParenthesisDashed = {
314   \override Arpeggio #'stencil = #ly:arpeggio::brew-chord-slur
315   \override Arpeggio #'X-extent = #ly:grob::stencil-width
316   \override Arpeggio #'dash-definition = #'((0 1 0.4 0.75))
317 }
318
319
320
321 glissando = #(make-music 'GlissandoEvent)
322
323 fermataMarkup =
324 #(make-music 'MultiMeasureTextEvent
325    ; Set the 'text based on the 'direction
326    'tweaks (list (cons 'text (lambda (grob)
327        (if (eq? (ly:grob-property grob 'direction) DOWN)
328            (markup #:musicglyph "scripts.dfermata")
329            (markup #:musicglyph "scripts.ufermata"))))))
330
331 hideNotes = {
332   % hide notes, accidentals, etc.
333   \override Dots #'transparent = ##t
334   \override NoteHead #'transparent = ##t
335   \override NoteHead #'no-ledgers = ##t
336   \override Stem #'transparent = ##t
337   \override Beam #'transparent = ##t
338   \override Accidental #'transparent = ##t
339 }
340
341
342 unHideNotes = {
343   \revert Accidental #'transparent
344   \revert Beam #'transparent
345   \revert Stem #'transparent
346   \revert NoteHead #'transparent
347   \revert NoteHead #'no-ledgers
348   \revert Dots #'transparent
349 }
350
351 germanChords = {
352   \set chordRootNamer = #(chord-name->german-markup #t)
353   \set chordNoteNamer = #note-name->german-markup
354 }
355 semiGermanChords = {
356   \set chordRootNamer = #(chord-name->german-markup #f)
357   \set chordNoteNamer = #note-name->german-markup
358 }
359
360 frenchChords = {
361   \set chordRootNamer = #(chord-name->italian-markup #t)
362   \set chordPrefixSpacer = #0.4
363 }
364
365 italianChords = {
366   \set chordRootNamer = #(chord-name->italian-markup #f)
367   \set chordPrefixSpacer = #0.4
368 }
369
370 harmonicsOn = \override NoteHead #'style = #'harmonic
371
372 harmonicsOff = \revert NoteHead #'style
373
374 improvisationOn = {
375   \set squashedPosition = #0
376   \override NoteHead #'style = #'slash
377   \override Accidental #'stencil = ##f
378 }
379
380 improvisationOff = {
381   \unset squashedPosition
382   \revert NoteHead #'style
383   \revert Accidental #'stencil
384 }
385
386 textSpannerUp = \override TextSpanner #'direction = #UP
387 textSpannerDown = \override TextSpanner #'direction = #DOWN
388 textSpannerNeutral = \revert TextSpanner #'direction
389
390
391
392 bassFigureExtendersOn = {
393   \set useBassFigureExtenders = ##t
394   \set Staff.useBassFigureExtenders = ##t
395 }
396
397 bassFigureExtendersOff = {
398   \set useBassFigureExtenders = ##f
399   \set Staff.useBassFigureExtenders = ##f
400 }
401
402 bassFigureStaffAlignmentDown = {
403   \override Staff.BassFigureAlignmentPositioning #'direction = #DOWN
404 }
405
406 bassFigureStaffAlignmentUp = {
407   \override Staff.BassFigureAlignmentPositioning #'direction = #UP
408 }
409
410 bassFigureStaffAlignmentNeutral = {
411   \revert Staff.BassFigureAlignmentPositioning #'direction
412 }
413
414 predefinedFretboardsOff = {
415   \set FretBoards.predefinedDiagramTable = ##f
416 }
417
418 predefinedFretboardsOn = {
419   \set FretBoards.predefinedDiagramTable = #fretboard-table
420 }
421
422 pointAndClickOff = #(define-music-function (parser location) ()
423                       (ly:set-option 'point-and-click #f)
424                       (make-music 'SequentialMusic 'void #t))
425
426 pointAndClickOn = #(define-music-function (parser location) ()
427                       (ly:set-option 'point-and-click #t)
428                       (make-music 'SequentialMusic 'void #t))
429
430 palmMuteOn = {
431  #(override-head-style 'NoteHead 'do)
432 }
433
434 palmMuteOff = {
435  #(revert-head-style 'NoteHead)
436 }
437
438 palmMute =
439 #(define-music-function (parser location note) (ly:music?)
440     (style-note-heads 'NoteHead 'do note))
441
442 deadNotesOn = {
443   #(override-head-style '(TabNoteHead NoteHead) 'cross)
444 }
445
446 deadNotesOff = {
447   #(revert-head-style '(TabNoteHead NoteHead))
448 }
449
450 deadNote =
451 #(define-music-function (parser location note) (ly:music?)
452    (style-note-heads '(TabNoteHead NoteHead) 'cross note))
453
454 tabFullNotation = {
455   % time signature
456   \revert TabStaff.TimeSignature #'stencil
457   % stems (the half note gets a double stem)
458   \override TabVoice.Stem #'stencil = #tabvoice::draw-double-stem-for-half-notes
459   % beams, dots
460   \revert TabVoice.Beam #'stencil
461   \revert TabVoice.Dots #'stencil
462   \revert TabVoice.Tie #'stencil
463   \revert TabVoice.Tie #'after-line-breaking
464   \revert TabVoice.RepeatTie #'stencil
465   \revert TabVoice.RepeatTie #'after-line-breaking
466   \revert TabVoice.LaissezVibrerTie #'stencil
467   \revert TabVoice.Slur #'stencil
468   \revert PhrasingSlur #'stencil
469   % tuplet stuff
470   \revert TabVoice.TupletBracket #'stencil
471   \revert TabVoice.TupletNumber #'stencil
472   % dynamic signs
473   \revert DynamicText #'transparent
474   \revert DynamicTextSpanner #'stencil
475   \revert TabVoice.DynamicTextSpanner #'stencil
476   \revert TabVoice.Hairpin #'transparent
477   % rests
478   \revert TabVoice.Rest #'stencil
479   \revert TabVoice.MultiMeasureRest #'stencil
480   % markups etc.
481   \revert TabVoice.Script #'stencil
482   \revert TabVoice.TextScript #'stencil
483   \revert TabStaff.Arpeggio #'stencil
484 }