]> git.donarmstrong.com Git - lilypond.git/blob - ly/property-init.ly
Run scripts/auxiliar/update-with-convert-ly.sh
[lilypond.git] / ly / property-init.ly
1 % property-init.ly
2
3 \version "2.17.20"
4
5 %% for dashed slurs, phrasing slurs, and ties
6 #(define (make-simple-dash-definition dash-fraction dash-period)
7     (list (list 0 1 dash-fraction dash-period)))
8
9 %% common definition for all note head styles reverting
10 %% (palm mute, harmonics, dead notes, ...)
11 defaultNoteHeads =
12 #(define-music-function (parser location) ()
13    (_i "Revert to the default note head style.")
14    (revert-head-style '(NoteHead TabNoteHead)))
15
16 accidentalStyle =
17 #(define-music-function
18    (parser location style) (symbol-list?)
19    (_i "Set accidental style to symbol list @var{style} in the form
20 @samp{piano-cautionary}.  If @var{style} has a form like
21 @samp{Staff.piano-cautionary}, the settings are applied to that
22 context.  Otherwise, the context defaults to @samp{Staff}, except for
23 piano styles, which use @samp{GrandStaff} as a context." )
24    (case (length style)
25     ((1) (set-accidental-style (car style)))
26     ((2) (set-accidental-style (cadr style) (car style)))
27     (else
28      (ly:parser-error parser (_ "not an accidental style")
29       location)
30      (make-music 'Music))))
31
32 %% arpeggios
33
34 % For drawing vertical chord brackets with \arpeggio
35 % This is a shorthand for the value of the print-function property
36 % of either Staff.Arpeggio or PianoStaff.Arpeggio, depending whether
37 % cross-staff brackets are desired.
38
39 arpeggio = #(make-music 'ArpeggioEvent)
40 arpeggioArrowUp = {
41   \revert Arpeggio.stencil
42   \revert Arpeggio.X-extent
43   \override Arpeggio.arpeggio-direction = #UP
44 }
45 arpeggioArrowDown = {
46   \revert Arpeggio.stencil
47   \revert Arpeggio.X-extent
48   \override Arpeggio.arpeggio-direction = #DOWN
49 }
50 arpeggioNormal = {
51   \revert Arpeggio.stencil
52   \revert Arpeggio.X-extent
53   \revert Arpeggio.arpeggio-direction
54   \revert Arpeggio.dash-definition
55 }
56 arpeggioBracket = {
57   \revert Arpeggio.X-extent
58   \override Arpeggio.stencil = #ly:arpeggio::brew-chord-bracket
59 }
60 arpeggioParenthesis = {
61   \override Arpeggio.stencil = #ly:arpeggio::brew-chord-slur
62   \override Arpeggio.X-extent = #ly:grob::stencil-width
63   \revert Arpeggio.dash-definition
64 }
65 arpeggioParenthesisDashed = {
66   \override Arpeggio.stencil = #ly:arpeggio::brew-chord-slur
67   \override Arpeggio.X-extent = #ly:grob::stencil-width
68   \override Arpeggio.dash-definition = #'((0 1 0.4 0.75))
69 }
70
71
72 %% auto beaming
73
74 autoBeamOn  = \set autoBeaming = ##t
75 autoBeamOff = \set autoBeaming = ##f
76
77
78 %% balloon length
79
80 balloonLengthOn = {
81   \override BalloonTextItem.extra-spacing-width = #'(0 . 0)
82   \override BalloonTextItem.extra-spacing-height = #'(-inf.0 . +inf.0)
83 }
84 balloonLengthOff = {
85   \override BalloonTextItem.extra-spacing-width = #'(+inf.0 . -inf.0)
86   \override BalloonTextItem.extra-spacing-height = #'(0 . 0)
87 }
88
89
90 %% bar lines
91
92 defineBarLine =
93 #(define-void-function
94    (parser location bar glyph-list) (string? list?)
95    (_i "Define bar line settings for bar line @var{bar}.
96      The list @var{glyph-list} must have three entries which define
97      the appearance at the end of line, at the beginning of the next line,
98      and the span bar, respectively." )
99   (if (not (= (length glyph-list) 3))
100       (ly:error (_ "Argument list for bar '~a' must have three components.") bar)
101       (define-bar-line bar
102                        (car glyph-list)
103                        (cadr glyph-list)
104                        (caddr glyph-list))))
105
106
107 %% bass figures
108
109 bassFigureExtendersOn = {
110   \set useBassFigureExtenders = ##t
111   \set Staff.useBassFigureExtenders = ##t
112 }
113 bassFigureExtendersOff = {
114   \set useBassFigureExtenders = ##f
115   \set Staff.useBassFigureExtenders = ##f
116 }
117 bassFigureStaffAlignmentDown =
118   \override Staff.BassFigureAlignmentPositioning.direction = #DOWN
119 bassFigureStaffAlignmentUp =
120   \override Staff.BassFigureAlignmentPositioning.direction = #UP
121 bassFigureStaffAlignmentNeutral =
122   \revert Staff.BassFigureAlignmentPositioning.direction
123
124
125 %% cadenzas
126
127 cadenzaOn  = {
128   \set Timing.timing = ##f
129   \set Timing.autoBeaming = ##f
130 }
131
132 cadenzaOff = {
133   \set Timing.timing = ##t
134   \set Timing.measurePosition = #ZERO-MOMENT
135   \set Timing.autoBeaming = ##t
136 }
137
138
139 %% chord names
140
141 frenchChords = {
142   \set chordRootNamer = #(chord-name->italian-markup #t)
143   \set chordPrefixSpacer = #0.4
144 }
145 germanChords = {
146   \set chordRootNamer = #(chord-name->german-markup #t)
147   \set chordNoteNamer = #note-name->german-markup
148 }
149 semiGermanChords = {
150   \set chordRootNamer = #(chord-name->german-markup #f)
151   \set chordNoteNamer = #note-name->german-markup
152 }
153 italianChords = {
154   \set chordRootNamer = #(chord-name->italian-markup #f)
155   \set chordPrefixSpacer = #0.4
156 }
157 powerChords = {
158   \set chordNameExceptions = #powerChordExceptions
159 }
160
161
162 %% compressFullBarRests
163
164 compressFullBarRests = \set Score.skipBars = ##t
165 expandFullBarRests   = \set Score.skipBars = ##f
166
167
168 %% dots
169
170 dotsUp      = \override Dots.direction = #UP
171 dotsDown    = \override Dots.direction = #DOWN
172 dotsNeutral = \revert Dots.direction
173
174
175 %% dynamics
176
177 dynamicUp = {
178   \override DynamicText.direction = #UP
179   \override DynamicLineSpanner.direction = #UP
180 }
181 dynamicDown = {
182   \override DynamicText.direction = #DOWN
183   \override DynamicLineSpanner.direction = #DOWN
184 }
185 dynamicNeutral = {
186   \revert DynamicText.direction
187   \revert DynamicLineSpanner.direction
188 }
189
190
191 %% easy heads
192
193 easyHeadsOn = {
194   \override NoteHead.stencil = #note-head::brew-ez-stencil
195   \override NoteHead.font-size = #-8
196   \override NoteHead.font-family = #'sans
197   \override NoteHead.font-series = #'bold
198 }
199 easyHeadsOff = {
200   \revert NoteHead.stencil
201   \revert NoteHead.font-size
202   \revert NoteHead.font-family
203   \revert NoteHead.font-series
204 }
205
206
207 %% endincipit
208
209 %% End the incipit and print a ``normal line start''.
210 endincipit = \context Staff {
211   \partial 16 s16  % Hack to handle e.g. \bar ".|" \endincipit
212   \once \override Staff.Clef.full-size-change = ##t
213   \once \override Staff.Clef.non-default = ##t
214   \bar ""
215 }
216
217
218 %% fermata markup
219
220 fermataMarkup =
221 #(make-music 'MultiMeasureTextEvent
222              'tweaks (list
223                       ;; Set the 'text based on the 'direction
224                       (cons 'text (lambda (grob)
225                                     (if (eq? (ly:grob-property grob 'direction) DOWN)
226                                         (markup #:musicglyph "scripts.dfermata")
227                                         (markup #:musicglyph "scripts.ufermata"))))
228                       (cons 'outside-staff-priority 40)
229                       (cons 'outside-staff-padding 0)))
230
231 %% font sizes
232
233 teeny      = \set fontSize = #-3
234 tiny       = \set fontSize = #-2
235 small      = \set fontSize = #-1
236 normalsize = \set fontSize = #0
237 large      = \set fontSize = #1
238 huge       = \set fontSize = #2
239
240
241 %% glissando
242
243 glissando = #(make-music 'GlissandoEvent)
244
245
246 %% harmonics
247
248 harmonicsOn =
249 #(define-music-function (parser location) ()
250    (_i "Set the default note head style to a diamond-shaped style.")
251    (override-head-style '(NoteHead TabNoteHead) 'harmonic))
252 harmonicsOff = \defaultNoteHeads
253 harmonicNote =
254 #(define-music-function (parser location note) (ly:music?)
255    (_i "Print @var{note} with a diamond-shaped note head.")
256    (style-note-heads 'NoteHead 'harmonic note))
257
258
259 %% hideNotes
260
261 hideNotes = {
262   % hide notes, accidentals, etc.
263   \override Dots.transparent = ##t
264   \override NoteHead.transparent = ##t
265   \override NoteHead.no-ledgers = ##t
266   % assume that any Beam inherits transparency from its parent Stem
267   \override Stem.transparent = ##t
268   \override Accidental.transparent = ##t
269   \override Rest.transparent = ##t
270   \override TabNoteHead.transparent = ##t
271 }
272 unHideNotes = {
273   \revert Accidental.transparent
274   \revert Stem.transparent
275   \revert NoteHead.transparent
276   \revert NoteHead.no-ledgers
277   \revert Dots.transparent
278   \revert Rest.transparent
279   \revert TabNoteHead.transparent
280 }
281
282
283 %% improvisation
284
285 improvisationOn = {
286   \set squashedPosition = #0
287   \override NoteHead.style = #'slash
288   \override Accidental.stencil = ##f
289   \override AccidentalCautionary.stencil = ##f
290 }
291 improvisationOff = {
292   \unset squashedPosition
293   \revert NoteHead.style
294   \revert Accidental.stencil
295   \revert AccidentalCautionary.stencil
296 }
297
298 %% kievan
299 kievanOn = {
300  \override NoteHead.style = #'kievan
301  \override Stem.X-offset = #stem::kievan-offset-callback
302  \override Stem.stencil = ##f
303  \override Flag.stencil = ##f
304  \override Rest.style = #'mensural
305  \override Accidental.glyph-name-alist = #alteration-kievan-glyph-name-alist
306  \override Dots.style = #'kievan
307  \override Slur.stencil = ##f
308  \override Stem.length = #0.0
309  \override Beam.positions = #beam::get-kievan-positions
310  \override Beam.quantized-positions = #beam::get-kievan-quantized-positions
311  \override NoteHead.duration-log = #note-head::calc-kievan-duration-log
312 }
313 kievanOff = {
314  \revert NoteHead.style
315  \revert Stem.X-offset
316  \revert Stem.stencil
317  \revert Rest.style
318  \revert Accidental.glyph-name-alist
319  \revert Dots.style
320  \revert Slur.stencil
321  \revert Flag.stencil
322  \revert Stem.length
323  \revert Beam.positions
324  \revert Beam.quantized-positions
325  \revert NoteHead.duration-log
326 }
327
328 %% merging
329
330 mergeDifferentlyDottedOn =
331   \override Staff.NoteCollision.merge-differently-dotted = ##t
332 mergeDifferentlyDottedOff =
333   \revert Staff.NoteCollision.merge-differently-dotted
334 mergeDifferentlyHeadedOn =
335   \override Staff.NoteCollision.merge-differently-headed = ##t
336 mergeDifferentlyHeadedOff =
337   \revert Staff.NoteCollision.merge-differently-headed
338
339
340 %% numeric time signature
341
342 numericTimeSignature = \override Staff.TimeSignature.style = #'numbered
343 defaultTimeSignature = \revert Staff.TimeSignature.style
344
345
346 %% palm mutes
347
348 palmMuteOn =
349 #(define-music-function (parser location) ()
350    (_i "Set the default note head style to a triangle-shaped style.")
351    (override-head-style 'NoteHead 'do))
352 palmMuteOff = \defaultNoteHeads
353 palmMute =
354 #(define-music-function (parser location note) (ly:music?)
355    (_i "Print @var{note} with a triangle-shaped note head.")
356    (style-note-heads 'NoteHead 'do note))
357
358
359 %% phrasing slurs
360
361 % directions
362 phrasingSlurUp      = \override PhrasingSlur.direction = #UP
363 phrasingSlurDown    = \override PhrasingSlur.direction = #DOWN
364 phrasingSlurNeutral = \revert PhrasingSlur.direction
365
366 % dash-patterns (make-simple-dash-definition defined at top of file)
367 phrasingSlurDashPattern =
368 #(define-music-function (parser location dash-fraction dash-period)
369    (number? number?)
370    (_i "Set up a custom style of dash pattern for @var{dash-fraction} ratio of
371 line to space repeated at @var{dash-period} interval for phrasing slurs.")
372   #{
373      \override PhrasingSlur.dash-definition =
374        $(make-simple-dash-definition dash-fraction dash-period)
375   #})
376 phrasingSlurDashed =
377   \override PhrasingSlur.dash-definition = #'((0 1 0.4 0.75))
378 phrasingSlurDotted =
379   \override PhrasingSlur.dash-definition = #'((0 1 0.1 0.75))
380 phrasingSlurHalfDashed =
381   \override PhrasingSlur.dash-definition = #'((0 0.5 0.4 0.75)
382                                                 (0.5 1 1 1))
383 phrasingSlurHalfSolid =
384   \override PhrasingSlur.dash-definition = #'((0 0.5 1 1)
385                                                 (0.5 1 0.4 0.75))
386 phrasingSlurSolid =
387   \revert PhrasingSlur.dash-definition
388
389
390 %% point and click
391
392 pointAndClickOn  =
393 #(define-void-function (parser location) ()
394    (_i "Enable generation of code in final-format (e.g. pdf) files to reference the
395 originating lilypond source statement;
396 this is helpful when developing a score but generates bigger final-format files.")
397    (ly:set-option 'point-and-click #t))
398
399 pointAndClickOff =
400 #(define-void-function (parser location) ()
401    (_i "Suppress generating extra code in final-format (e.g. pdf) files to point
402 back to the lilypond source statement.")
403    (ly:set-option 'point-and-click #f))
404
405 pointAndClickTypes =
406 #(define-void-function (parser location types) (symbol-list-or-symbol?)
407   (_i "Set a type or list of types (such as @code{#'note-event}) for which point-and-click info is generated.")
408   (ly:set-option 'point-and-click types))
409
410 %% predefined fretboards
411
412 predefinedFretboardsOff =
413   \set predefinedDiagramTable = ##f
414 predefinedFretboardsOn =
415   \set predefinedDiagramTable = #default-fret-table
416
417
418 %% shape note heads
419
420 aikenHeads      = \set shapeNoteStyles = ##(do re miMirror fa sol la ti)
421 aikenHeadsMinor = \set shapeNoteStyles = ##(la ti do re miMirror fa sol)
422 funkHeads =
423   \set shapeNoteStyles = ##(doFunk reFunk miFunk faFunk solFunk laFunk tiFunk)
424 funkHeadsMinor =
425   \set shapeNoteStyles = ##(laFunk tiFunk doFunk reFunk miFunk faFunk solFunk)
426 sacredHarpHeads = \set shapeNoteStyles = ##(fa sol la fa sol la mi)
427 sacredHarpHeadsMinor = \set shapeNoteStyles = ##(la mi fa sol la fa sol)
428 southernHarmonyHeads =
429   \set shapeNoteStyles = ##(faThin sol laThin faThin sol laThin miThin)
430 southernHarmonyHeadsMinor =
431   \set shapeNoteStyles = ##(laThin miThin faThin sol laThin faThin sol)
432 walkerHeads =
433   \set shapeNoteStyles = ##(doWalker reWalker miWalker faWalker solFunk laWalker tiWalker)
434 walkerHeadsMinor =
435   \set shapeNoteStyles = ##(laWalker tiWalker doWalker reWalker miWalker faWalker solFunk)
436
437
438 %% shifts
439
440 shiftOn   = \override NoteColumn.horizontal-shift = #1
441 shiftOnn  = \override NoteColumn.horizontal-shift = #2
442 shiftOnnn = \override NoteColumn.horizontal-shift = #3
443 shiftOff  = \revert NoteColumn.horizontal-shift
444
445
446 %% slurs
447
448 % directions
449 slurUp         = \override Slur.direction = #UP
450 slurDown       = \override Slur.direction = #DOWN
451 slurNeutral    = \revert Slur.direction
452
453 % dash-patterns (make-simple-dash-definition defined at top of file)
454 slurDashPattern =
455 #(define-music-function (parser location dash-fraction dash-period)
456   (number? number?)
457   (_i "Set up a custom style of dash pattern for @var{dash-fraction}
458 ratio of line to space repeated at @var{dash-period} interval for slurs.")
459   #{
460      \override Slur.dash-definition =
461        $(make-simple-dash-definition dash-fraction dash-period)
462   #})
463 slurDashed     = \override Slur.dash-definition = #'((0 1 0.4 0.75))
464 slurDotted     = \override Slur.dash-definition = #'((0 1 0.1 0.75))
465 slurHalfDashed = \override Slur.dash-definition = #'((0 0.5 0.4 0.75)
466                                                        (0.5 1 1 1))
467 slurHalfSolid  = \override Slur.dash-definition = #'((0 0.5 1 1)
468                                                        (0.5 1 0.4 0.75))
469 slurSolid      = \revert Slur.dash-definition
470
471
472 %% staff switches
473
474 showStaffSwitch = \set followVoice = ##t
475 hideStaffSwitch = \set followVoice = ##f
476
477
478 %% stems
479
480 stemUp      = \override Stem.direction = #UP
481 stemDown    = \override Stem.direction = #DOWN
482 stemNeutral = \revert Stem.direction
483
484
485 %% tablature
486
487 % switch to full notation
488 tabFullNotation = {
489   % time signature
490   \revert TabStaff.TimeSignature.stencil
491   % stems (the half note gets a double stem)
492   \revert TabStaff.Stem.length
493   \revert TabStaff.Stem.no-stem-extend
494   \revert TabStaff.Flag.style
495   \revert TabStaff.Stem.details
496   \revert TabStaff.Stem.stencil
497   \revert TabStaff.Flag.stencil
498   \override TabStaff.Stem.stencil = #tabvoice::draw-double-stem-for-half-notes
499   \override TabStaff.Stem.X-extent = #tabvoice::make-double-stem-width-for-half-notes
500   \set TabStaff.autoBeaming = ##t
501   \revert TabStaff.NoteColumn.ignore-collision
502   % beams, dots
503   \revert TabStaff.Beam.stencil
504   \revert TabStaff.StemTremolo.stencil
505   \revert TabStaff.Dots.stencil
506   \revert TabStaff.Tie.stencil
507   \revert TabStaff.Tie.after-line-breaking
508   \revert TabStaff.RepeatTie.stencil
509   \revert TabStaff.RepeatTie.after-line-breaking
510   \revert TabStaff.LaissezVibrerTie.stencil
511   \revert TabStaff.Slur.stencil
512   \revert TabStaff.PhrasingSlur.stencil
513   % tuplet stuff
514   \revert TabStaff.TupletBracket.stencil
515   \revert TabStaff.TupletNumber.stencil
516   % dynamic signs
517   \revert TabStaff.DynamicText.stencil
518   \revert TabStaff.DynamicTextSpanner.stencil
519   \revert TabStaff.DynamicTextSpanner.stencil
520   \revert TabStaff.Hairpin.stencil
521   % rests
522   \revert TabStaff.Rest.stencil
523   \revert TabStaff.MultiMeasureRest.stencil
524   \revert TabStaff.MultiMeasureRestNumber.stencil
525   \revert TabStaff.MultiMeasureRestText.stencil
526   % markups etc.
527   \revert TabStaff.Glissando.stencil
528   \revert TabStaff.Script.stencil
529   \revert TabStaff.TextScript.stencil
530   \revert TabStaff.TextSpanner.stencil
531   \revert TabStaff.Arpeggio.stencil
532   \revert TabStaff.NoteColumn.ignore-collision
533 }
534
535 %tie/repeat tie behaviour
536 hideSplitTiedTabNotes = {
537   \override TabVoice.TabNoteHead.details.tied-properties.break-visibility = #all-invisible
538   \override TabVoice.TabNoteHead.details.tied-properties.parenthesize = ##f
539   \override TabVoice.TabNoteHead.details.repeat-tied-properties.note-head-visible = ##f
540   \override TabVoice.TabNoteHead.details.repeat-tied-properties.parenthesize = ##f
541 }
542
543 showSplitTiedTabNotes = {
544   \override TabVoice.TabNoteHead.details.tied-properties.break-visibility = #begin-of-line-visible
545   \override TabVoice.TabNoteHead.details.tied-properties.parenthesize = ##t
546   \override TabVoice.TabNoteHead.details.repeat-tied-properties.note-head-visible = ##t
547   \override TabVoice.TabNoteHead.details.repeat-tied-properties.parenthesize = ##t
548 }
549
550 %% text length
551
552 textLengthOn = {
553   % 0.4 staff-space between adjacent texts
554   \override TextScript.extra-spacing-width = #'(-0.0 . 0.4)
555   \override TextScript.extra-spacing-height = #'(-inf.0 . +inf.0)
556 }
557
558 textLengthOff = {
559   \override TextScript.extra-spacing-width = #'(+inf.0 . -inf.0)
560   \override TextScript.extra-spacing-height = #'(0 . 0)
561 }
562
563 markLengthOn = {
564   \override Score.MetronomeMark.extra-spacing-width = #'(0 . 1.0)
565   \override Score.RehearsalMark.extra-spacing-width = #'(-0.5 . 0.5)
566   % Raise as much as four staff-spaces before pushing notecolumns right
567   \override Score.MetronomeMark.extra-spacing-height = #'(4 . 4)
568   \override Score.RehearsalMark.extra-spacing-height = #'(4 . 4)
569 }
570
571 markLengthOff = {
572   \override Score.MetronomeMark.extra-spacing-width = #'(+inf.0 . -inf.0)
573   \override Score.RehearsalMark.extra-spacing-width = #'(+inf.0 . -inf.0)
574   \revert Score.MetronomeMark.extra-spacing-height
575   \revert Score.RehearsalMark.extra-spacing-height
576 }
577
578 %% text spanners
579
580 textSpannerUp      = \override TextSpanner.direction = #UP
581 textSpannerDown    = \override TextSpanner.direction = #DOWN
582 textSpannerNeutral = \revert TextSpanner.direction
583
584
585 %% ties
586
587 % directions
588 tieUp      = \override Tie.direction = #UP
589 tieDown    = \override Tie.direction = #DOWN
590 tieNeutral = \revert Tie.direction
591
592 % dash-patterns (make-simple-dash-definition defined at top of file)
593 tieDashPattern =
594 #(define-music-function (parser location dash-fraction dash-period)
595   (number? number?)
596   (_i "Set up a custom style of dash pattern for @var{dash-fraction}
597 ratio of line to space repeated at @var{dash-period} interval for ties.")
598   #{
599      \override Tie.dash-definition =
600        $(make-simple-dash-definition dash-fraction dash-period)
601   #})
602 tieDashed     = \override Tie.dash-definition = #'((0 1 0.4 0.75))
603 tieDotted     = \override Tie.dash-definition = #'((0 1 0.1 0.75))
604 tieHalfDashed = \override Tie.dash-definition = #'((0 0.5 0.4 0.75)
605                                                      (0.5 1 1 1))
606 tieHalfSolid  = \override Tie.dash-definition = #'((0 0.5 1 1)
607                                                      (0.5 1 0.4 0.75))
608 tieSolid      = \revert Tie.dash-definition
609
610
611 %% tuplets
612
613 tupletUp      = \override TupletBracket.direction = #UP
614 tupletDown    = \override TupletBracket.direction = #DOWN
615 tupletNeutral = \revert TupletBracket.direction
616
617
618 %% voice properties
619
620 % dynamic ly:dir?  text script, articulation script ly:dir?
621 voiceOne   = #(context-spec-music (make-voice-props-set 0)  'Voice)
622 voiceTwo   = #(context-spec-music (make-voice-props-set 1)  'Voice)
623 voiceThree = #(context-spec-music (make-voice-props-set 2)  'Voice)
624 voiceFour  = #(context-spec-music (make-voice-props-set 3)  'Voice)
625 oneVoice   = #(context-spec-music (make-voice-props-revert) 'Voice)
626
627
628 %% voice styles
629
630 voiceOneStyle = {
631   \override NoteHead.style = #'diamond
632   \override NoteHead.color = #red
633   \override Stem.color = #red
634   \override Beam.color = #red
635 }
636 voiceTwoStyle = {
637   \override NoteHead.style = #'triangle
638   \override NoteHead.color = #blue
639   \override Stem.color = #blue
640   \override Beam.color = #blue
641 }
642 voiceThreeStyle = {
643   \override NoteHead.style = #'xcircle
644   \override NoteHead.color = #green
645   \override Stem.color = #green
646   \override Beam.color = #green
647 }
648 voiceFourStyle = {
649   \override NoteHead.style = #'cross
650   \override NoteHead.color = #magenta
651   \override Stem.color = #magenta
652   \override Beam.color = #magenta
653 }
654 voiceNeutralStyle = {
655   \revert NoteHead.style
656   \revert NoteHead.color
657   \revert Stem.color
658   \revert Beam.color
659 }
660
661
662 %% volta brackets
663
664 allowVoltaHook =
665 #(define-void-function (parser location bar) (string?)
666                        (allow-volta-hook bar))
667
668 %% x notes
669
670 xNotesOn =
671 #(define-music-function (parser location) ()
672    (_i "Set the default note head style to a cross-shaped style.")
673    (override-head-style '(TabNoteHead NoteHead) 'cross))
674 xNotesOff = \defaultNoteHeads
675 xNote =
676 #(define-music-function (parser location note) (ly:music?)
677    (_i "Print @var{note} with a cross-shaped note head.")
678    (style-note-heads '(TabNoteHead NoteHead) 'cross note))
679
680
681 %% dead notes (these need to come after "x notes")
682
683 % Define aliases of cross-head notes for specific purposes
684 deadNotesOn  = \xNotesOn
685 deadNotesOff = \xNotesOff
686 deadNote     = #xNote