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