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)))
9 %% common definition for all note head styles reverting
10 %% (palm mute, harmonics, dead notes, ...)
12 #(define-music-function (parser location) ()
13 (_i "Revert to the default note head style.")
14 (revert-head-style '(NoteHead TabNoteHead)))
20 % For drawing vertical chord brackets with \arpeggio
21 % This is a shorthand for the value of the print-function property
22 % of either Staff.Arpeggio or PianoStaff.Arpeggio, depending whether
23 % cross-staff brackets are desired.
25 arpeggio = #(make-music 'ArpeggioEvent)
27 \revert Arpeggio #'stencil
28 \revert Arpeggio #'X-extent
29 \override Arpeggio #'arpeggio-direction = #UP
32 \revert Arpeggio #'stencil
33 \revert Arpeggio #'X-extent
34 \override Arpeggio #'arpeggio-direction = #DOWN
37 \revert Arpeggio #'stencil
38 \revert Arpeggio #'X-extent
39 \revert Arpeggio #'arpeggio-direction
40 \revert Arpeggio #'dash-definition
43 \revert Arpeggio #'X-extent
44 \override Arpeggio #'stencil = #ly:arpeggio::brew-chord-bracket
46 arpeggioParenthesis = {
47 \override Arpeggio #'stencil = #ly:arpeggio::brew-chord-slur
48 \override Arpeggio #'X-extent = #ly:grob::stencil-width
49 \revert Arpeggio #'dash-definition
51 arpeggioParenthesisDashed = {
52 \override Arpeggio #'stencil = #ly:arpeggio::brew-chord-slur
53 \override Arpeggio #'X-extent = #ly:grob::stencil-width
54 \override Arpeggio #'dash-definition = #'((0 1 0.4 0.75))
60 autoBeamOn = \set autoBeaming = ##t
61 autoBeamOff = \set autoBeaming = ##f
67 \override BalloonTextItem #'extra-spacing-width = #'(0 . 0)
68 \override BalloonTextItem #'extra-spacing-height = #'(-inf.0 . +inf.0)
71 \override BalloonTextItem #'extra-spacing-width = #'(+inf.0 . -inf.0)
72 \override BalloonTextItem #'extra-spacing-height = #'(0 . 0)
78 bassFigureExtendersOn = {
79 \set useBassFigureExtenders = ##t
80 \set Staff.useBassFigureExtenders = ##t
82 bassFigureExtendersOff = {
83 \set useBassFigureExtenders = ##f
84 \set Staff.useBassFigureExtenders = ##f
86 bassFigureStaffAlignmentDown =
87 \override Staff.BassFigureAlignmentPositioning #'direction = #DOWN
88 bassFigureStaffAlignmentUp =
89 \override Staff.BassFigureAlignmentPositioning #'direction = #UP
90 bassFigureStaffAlignmentNeutral =
91 \revert Staff.BassFigureAlignmentPositioning #'direction
97 \set Timing.timing = ##f
98 \set Timing.autoBeaming = ##f
102 \set Timing.timing = ##t
103 \set Timing.measurePosition = #ZERO-MOMENT
104 \set Timing.autoBeaming = ##t
111 \set chordRootNamer = #(chord-name->italian-markup #t)
112 \set chordPrefixSpacer = #0.4
115 \set chordRootNamer = #(chord-name->german-markup #t)
116 \set chordNoteNamer = #note-name->german-markup
119 \set chordRootNamer = #(chord-name->german-markup #f)
120 \set chordNoteNamer = #note-name->german-markup
123 \set chordRootNamer = #(chord-name->italian-markup #f)
124 \set chordPrefixSpacer = #0.4
128 %% compressFullBarRests
130 compressFullBarRests = \set Score.skipBars = ##t
131 expandFullBarRests = \set Score.skipBars = ##f
136 dotsUp = \override Dots #'direction = #UP
137 dotsDown = \override Dots #'direction = #DOWN
138 dotsNeutral = \revert Dots #'direction
144 \override DynamicText #'direction = #UP
145 \override DynamicLineSpanner #'direction = #UP
148 \override DynamicText #'direction = #DOWN
149 \override DynamicLineSpanner #'direction = #DOWN
152 \revert DynamicText #'direction
153 \revert DynamicLineSpanner #'direction
160 \override NoteHead #'stencil = #note-head::brew-ez-stencil
161 \override NoteHead #'font-size = #-8
162 \override NoteHead #'font-family = #'sans
163 \override NoteHead #'font-series = #'bold
166 \revert NoteHead #'stencil
167 \revert NoteHead #'font-size
168 \revert NoteHead #'font-family
169 \revert NoteHead #'font-series
175 %% End the incipit and print a ``normal line start''.
176 endincipit = \context Staff {
177 \partial 16 s16 % Hack to handle e.g. \bar ".|" \endincipit
178 \once \override Staff.Clef #'full-size-change = ##t
179 \once \override Staff.Clef #'non-default = ##t
187 #(make-music 'MultiMeasureTextEvent
189 ;; Set the 'text based on the 'direction
190 (cons 'text (lambda (grob)
191 (if (eq? (ly:grob-property grob 'direction) DOWN)
192 (markup #:musicglyph "scripts.dfermata")
193 (markup #:musicglyph "scripts.ufermata"))))
194 (cons 'outside-staff-priority 40)
195 (cons 'outside-staff-padding 0)))
199 teeny = \set fontSize = #-3
200 tiny = \set fontSize = #-2
201 small = \set fontSize = #-1
202 normalsize = \set fontSize = #0
203 large = \set fontSize = #1
204 huge = \set fontSize = #2
209 glissando = #(make-music 'GlissandoEvent)
215 #(define-music-function (parser location) ()
216 (_i "Set the default note head style to a diamond-shaped style.")
217 (override-head-style 'NoteHead 'harmonic))
218 harmonicsOff = \defaultNoteHeads
220 #(define-music-function (parser location note) (ly:music?)
221 (_i "Print @var{note} with a diamond-shaped note head.")
222 (style-note-heads 'NoteHead 'harmonic note))
228 % hide notes, accidentals, etc.
229 \override Dots #'transparent = ##t
230 \override NoteHead #'transparent = ##t
231 \override NoteHead #'no-ledgers = ##t
232 \override Stem #'transparent = ##t
233 \override Beam #'transparent = ##t
234 \override Accidental #'transparent = ##t
237 \revert Accidental #'transparent
238 \revert Beam #'transparent
239 \revert Stem #'transparent
240 \revert NoteHead #'transparent
241 \revert NoteHead #'no-ledgers
242 \revert Dots #'transparent
249 \set squashedPosition = #0
250 \override NoteHead #'style = #'slash
251 \override Accidental #'stencil = ##f
254 \unset squashedPosition
255 \revert NoteHead #'style
256 \revert Accidental #'stencil
262 mergeDifferentlyDottedOn =
263 \override Staff.NoteCollision #'merge-differently-dotted = ##t
264 mergeDifferentlyDottedOff =
265 \revert Staff.NoteCollision #'merge-differently-dotted
266 mergeDifferentlyHeadedOn =
267 \override Staff.NoteCollision #'merge-differently-headed = ##t
268 mergeDifferentlyHeadedOff =
269 \revert Staff.NoteCollision #'merge-differently-headed
272 %% numeric time signature
274 numericTimeSignature = \override Staff.TimeSignature #'style = #'numbered
275 defaultTimeSignature = \revert Staff.TimeSignature #'style
281 #(define-music-function (parser location) ()
282 (_i "Set the default note head style to a triangle-shaped style.")
283 (override-head-style 'NoteHead 'do))
284 palmMuteOff = \defaultNoteHeads
286 #(define-music-function (parser location note) (ly:music?)
287 (_i "Print @var{note} with a triangle-shaped note head.")
288 (style-note-heads 'NoteHead 'do note))
294 phrasingSlurUp = \override PhrasingSlur #'direction = #UP
295 phrasingSlurDown = \override PhrasingSlur #'direction = #DOWN
296 phrasingSlurNeutral = \revert PhrasingSlur #'direction
298 % dash-patterns (make-simple-dash-definition defined at top of file)
299 phrasingSlurDashPattern =
300 #(define-music-function (parser location dash-fraction dash-period)
302 (_i "Set up a custom style of dash pattern for @var{dash-fraction} ratio of
303 line to space repeated at @var{dash-period} interval.")
305 \override PhrasingSlur #'dash-definition =
306 $(make-simple-dash-definition dash-fraction dash-period)
309 \override PhrasingSlur #'dash-definition = #'((0 1 0.4 0.75))
311 \override PhrasingSlur #'dash-definition = #'((0 1 0.1 0.75))
312 phrasingSlurHalfDashed =
313 \override PhrasingSlur #'dash-definition = #'((0 0.5 0.4 0.75)
315 phrasingSlurHalfSolid =
316 \override PhrasingSlur #'dash-definition = #'((0 0.5 1 1)
319 \revert PhrasingSlur #'dash-definition
325 #(define-music-function (parser location) ()
326 (_i "Enable generation of code in final-format (e.g. pdf) files to reference the
327 originating lilypond source statement;
328 this is helpful when developing a score but generates bigger final-format files.")
329 (ly:set-option 'point-and-click #t)
330 (make-music 'SequentialMusic 'void #t))
333 #(define-music-function (parser location) ()
334 (_i "Suppress generating extra code in final-format (e.g. pdf) files to point
335 back to the lilypond source statement.")
336 (ly:set-option 'point-and-click #f)
337 (make-music 'SequentialMusic 'void #t))
340 %% predefined fretboards
342 predefinedFretboardsOff =
343 \set predefinedDiagramTable = ##f
344 predefinedFretboardsOn =
345 \set predefinedDiagramTable = #default-fret-table
350 aikenHeads = \set shapeNoteStyles = #'#(do re miMirror fa sol la ti)
351 aikenHeadsMinor = \set shapeNoteStyles = #'#(la ti do re miMirror fa sol)
353 \set shapeNoteStyles = #'#(doFunk reFunk miFunk faFunk solFunk laFunk tiFunk)
355 \set shapeNoteStyles = #'#(laFunk tiFunk doFunk reFunk miFunk faFunk solFunk)
356 sacredHarpHeads = \set shapeNoteStyles = #'#(fa sol la fa sol la mi)
357 sacredHarpHeadsMinor = \set shapeNoteStyles = #'#(la mi fa sol la fa sol)
358 southernHarmonyHeads =
359 \set shapeNoteStyles = #'#(faThin sol laThin faThin sol laThin miThin)
360 southernHarmonyHeadsMinor =
361 \set shapeNoteStyles = #'#(laThin miThin faThin sol laThin faThin sol)
363 \set shapeNoteStyles = #'#(doWalker reWalker miWalker faWalker solFunk laWalker tiWalker)
365 \set shapeNoteStyles = #'#(laWalker tiWalker doWalker reWalker miWalker faWalker solFunk)
370 shiftOn = \override NoteColumn #'horizontal-shift = #1
371 shiftOnn = \override NoteColumn #'horizontal-shift = #2
372 shiftOnnn = \override NoteColumn #'horizontal-shift = #3
373 shiftOff = \revert NoteColumn #'horizontal-shift
379 slurUp = \override Slur #'direction = #UP
380 slurDown = \override Slur #'direction = #DOWN
381 slurNeutral = \revert Slur #'direction
383 % dash-patterns (make-simple-dash-definition defined at top of file)
385 #(define-music-function (parser location dash-fraction dash-period)
388 \override Slur #'dash-definition =
389 $(make-simple-dash-definition dash-fraction dash-period)
391 slurDashed = \override Slur #'dash-definition = #'((0 1 0.4 0.75))
392 slurDotted = \override Slur #'dash-definition = #'((0 1 0.1 0.75))
393 slurHalfDashed = \override Slur #'dash-definition = #'((0 0.5 0.4 0.75)
395 slurHalfSolid = \override Slur #'dash-definition = #'((0 0.5 1 1)
397 slurSolid = \revert Slur #'dash-definition
402 showStaffSwitch = \set followVoice = ##t
403 hideStaffSwitch = \set followVoice = ##f
408 stemUp = \override Stem #'direction = #UP
409 stemDown = \override Stem #'direction = #DOWN
410 stemNeutral = \revert Stem #'direction
415 % switch to full notation
418 \revert TabStaff.TimeSignature #'stencil
419 % stems (the half note gets a double stem)
420 \revert TabVoice.Stem #'length
421 \revert TabVoice.Stem #'no-stem-extend
422 \revert TabVoice.Stem #'flag-style
423 \revert TabVoice.Stem #'details
424 \revert TabVoice.Stem #'transparent
425 \override TabVoice.Stem #'stencil = #tabvoice::draw-double-stem-for-half-notes
426 \set autoBeaming = ##t
427 \revert NoteColumn #'ignore-collision
429 \revert TabVoice.Beam #'stencil
430 \revert TabVoice.StemTremolo #'stencil
431 \revert TabVoice.Dots #'stencil
432 \revert TabVoice.Tie #'stencil
433 \revert TabVoice.Tie #'after-line-breaking
434 \revert TabVoice.RepeatTie #'stencil
435 \revert TabVoice.RepeatTie #'after-line-breaking
436 \revert TabVoice.LaissezVibrerTie #'stencil
437 \revert TabVoice.Slur #'stencil
438 \revert TabVoice.PhrasingSlur #'stencil
440 \revert TabVoice.TupletBracket #'stencil
441 \revert TabVoice.TupletNumber #'stencil
443 \revert TabVoice.DynamicText #'transparent
444 \revert TabVoice.DynamicTextSpanner #'stencil
445 \revert TabVoice.DynamicTextSpanner #'stencil
446 \revert TabVoice.Hairpin #'transparent
448 \revert TabVoice.Rest #'stencil
449 \revert TabVoice.MultiMeasureRest #'stencil
450 \revert TabVoice.MultiMeasureRestNumber #'transparent
451 \revert TabVoice.MultiMeasureRestText #'transparent
453 \revert TabVoice.Script #'stencil
454 \revert TabVoice.TextScript #'stencil
455 \revert TabVoice.TextSpanner #'stencil
456 \revert TabStaff.Arpeggio #'stencil
457 \revert TabStaff.NoteColumn #'ignore-collision
460 %tie/repeat tie behaviour
461 hideSplitTiedTabNotes = {
462 \override TabVoice.TabNoteHead #'(details tied-properties break-visibility) = #all-invisible
463 \override TabVoice.TabNoteHead #'(details tied-properties parenthesize) = ##f
464 \override TabVoice.TabNoteHead #'(details repeat-tied-properties note-head-visible) = ##f
465 \override TabVoice.TabNoteHead #'(details repeat-tied-properties parenthesize) = ##f
468 showSplitTiedTabNotes = {
469 \override TabVoice.TabNoteHead #'(details tied-properties break-visibility) = #begin-of-line-visible
470 \override TabVoice.TabNoteHead #'(details tied-properties parenthesize) = ##t
471 \override TabVoice.TabNoteHead #'(details repeat-tied-properties note-head-visible) = ##t
472 \override TabVoice.TabNoteHead #'(details repeat-tied-properties parenthesize) = ##t
478 \override TextScript #'extra-spacing-width = #'(0 . 0)
479 \override TextScript #'extra-spacing-height = #'(-inf.0 . +inf.0)
482 \override TextScript #'extra-spacing-width = #'(+inf.0 . -inf.0)
483 \override TextScript #'extra-spacing-height = #'(0 . 0)
489 textSpannerUp = \override TextSpanner #'direction = #UP
490 textSpannerDown = \override TextSpanner #'direction = #DOWN
491 textSpannerNeutral = \revert TextSpanner #'direction
497 tieUp = \override Tie #'direction = #UP
498 tieDown = \override Tie #'direction = #DOWN
499 tieNeutral = \revert Tie #'direction
501 % dash-patterns (make-simple-dash-definition defined at top of file)
503 #(define-music-function (parser location dash-fraction dash-period)
506 \override Tie #'dash-definition =
507 $(make-simple-dash-definition dash-fraction dash-period)
509 tieDashed = \override Tie #'dash-definition = #'((0 1 0.4 0.75))
510 tieDotted = \override Tie #'dash-definition = #'((0 1 0.1 0.75))
511 tieHalfDashed = \override Tie #'dash-definition = #'((0 0.5 0.4 0.75)
513 tieHalfSolid = \override Tie #'dash-definition = #'((0 0.5 1 1)
515 tieSolid = \revert Tie #'dash-definition
520 tupletUp = \override TupletBracket #'direction = #UP
521 tupletDown = \override TupletBracket #'direction = #DOWN
522 tupletNeutral = \revert TupletBracket #'direction
527 % dynamic ly:dir? text script, articulation script ly:dir?
528 voiceOne = #(context-spec-music (make-voice-props-set 0) 'Voice)
529 voiceTwo = #(context-spec-music (make-voice-props-set 1) 'Voice)
530 voiceThree = #(context-spec-music (make-voice-props-set 2) 'Voice)
531 voiceFour = #(context-spec-music (make-voice-props-set 3) 'Voice)
532 oneVoice = #(context-spec-music (make-voice-props-revert) 'Voice)
538 \override NoteHead #'style = #'diamond
539 \override NoteHead #'color = #red
540 \override Stem #'color = #red
541 \override Beam #'color = #red
544 \override NoteHead #'style = #'triangle
545 \override NoteHead #'color = #blue
546 \override Stem #'color = #blue
547 \override Beam #'color = #blue
550 \override NoteHead #'style = #'xcircle
551 \override NoteHead #'color = #green
552 \override Stem #'color = #green
553 \override Beam #'color = #green
556 \override NoteHead #'style = #'cross
557 \override NoteHead #'color = #magenta
558 \override Stem #'color = #magenta
559 \override Beam #'color = #magenta
561 voiceNeutralStyle = {
562 \revert NoteHead #'style
563 \revert NoteHead #'color
572 #(define-music-function (parser location) ()
573 (_i "Set the default note head style to a cross-shaped style.")
574 (override-head-style '(TabNoteHead NoteHead) 'cross))
575 xNotesOff = \defaultNoteHeads
577 #(define-music-function (parser location note) (ly:music?)
578 (_i "Print @var{note} with a cross-shaped note head.")
579 (style-note-heads '(TabNoteHead NoteHead) 'cross note))
582 %% dead notes (these need to come after "x notes")
584 % Define aliases of cross-head notes for specific purposes
585 deadNotesOn = \xNotesOn
586 deadNotesOff = \xNotesOff