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)))
18 #(define-music-function
19 (parser location style) (string-or-symbol?)
20 (_i "Set @var{style} as the accidental style to use.")
21 (set-accidental-style (if (string? style)
22 (string->symbol style)
27 % For drawing vertical chord brackets with \arpeggio
28 % This is a shorthand for the value of the print-function property
29 % of either Staff.Arpeggio or PianoStaff.Arpeggio, depending whether
30 % cross-staff brackets are desired.
32 arpeggio = #(make-music 'ArpeggioEvent)
34 \revert Arpeggio #'stencil
35 \revert Arpeggio #'X-extent
36 \override Arpeggio #'arpeggio-direction = #UP
39 \revert Arpeggio #'stencil
40 \revert Arpeggio #'X-extent
41 \override Arpeggio #'arpeggio-direction = #DOWN
44 \revert Arpeggio #'stencil
45 \revert Arpeggio #'X-extent
46 \revert Arpeggio #'arpeggio-direction
47 \revert Arpeggio #'dash-definition
50 \revert Arpeggio #'X-extent
51 \override Arpeggio #'stencil = #ly:arpeggio::brew-chord-bracket
53 arpeggioParenthesis = {
54 \override Arpeggio #'stencil = #ly:arpeggio::brew-chord-slur
55 \override Arpeggio #'X-extent = #ly:grob::stencil-width
56 \revert Arpeggio #'dash-definition
58 arpeggioParenthesisDashed = {
59 \override Arpeggio #'stencil = #ly:arpeggio::brew-chord-slur
60 \override Arpeggio #'X-extent = #ly:grob::stencil-width
61 \override Arpeggio #'dash-definition = #'((0 1 0.4 0.75))
67 autoBeamOn = \set autoBeaming = ##t
68 autoBeamOff = \set autoBeaming = ##f
74 \override BalloonTextItem #'extra-spacing-width = #'(0 . 0)
75 \override BalloonTextItem #'extra-spacing-height = #'(-inf.0 . +inf.0)
78 \override BalloonTextItem #'extra-spacing-width = #'(+inf.0 . -inf.0)
79 \override BalloonTextItem #'extra-spacing-height = #'(0 . 0)
85 bassFigureExtendersOn = {
86 \set useBassFigureExtenders = ##t
87 \set Staff.useBassFigureExtenders = ##t
89 bassFigureExtendersOff = {
90 \set useBassFigureExtenders = ##f
91 \set Staff.useBassFigureExtenders = ##f
93 bassFigureStaffAlignmentDown =
94 \override Staff.BassFigureAlignmentPositioning #'direction = #DOWN
95 bassFigureStaffAlignmentUp =
96 \override Staff.BassFigureAlignmentPositioning #'direction = #UP
97 bassFigureStaffAlignmentNeutral =
98 \revert Staff.BassFigureAlignmentPositioning #'direction
104 \set Timing.timing = ##f
105 \set Timing.autoBeaming = ##f
109 \set Timing.timing = ##t
110 \set Timing.measurePosition = #ZERO-MOMENT
111 \set Timing.autoBeaming = ##t
118 \set chordRootNamer = #(chord-name->italian-markup #t)
119 \set chordPrefixSpacer = #0.4
122 \set chordRootNamer = #(chord-name->german-markup #t)
123 \set chordNoteNamer = #note-name->german-markup
126 \set chordRootNamer = #(chord-name->german-markup #f)
127 \set chordNoteNamer = #note-name->german-markup
130 \set chordRootNamer = #(chord-name->italian-markup #f)
131 \set chordPrefixSpacer = #0.4
134 \set chordNameExceptions = #powerChordExceptions
138 %% compressFullBarRests
140 compressFullBarRests = \set Score.skipBars = ##t
141 expandFullBarRests = \set Score.skipBars = ##f
146 dotsUp = \override Dots #'direction = #UP
147 dotsDown = \override Dots #'direction = #DOWN
148 dotsNeutral = \revert Dots #'direction
154 \override DynamicText #'direction = #UP
155 \override DynamicLineSpanner #'direction = #UP
158 \override DynamicText #'direction = #DOWN
159 \override DynamicLineSpanner #'direction = #DOWN
162 \revert DynamicText #'direction
163 \revert DynamicLineSpanner #'direction
170 \override NoteHead #'stencil = #note-head::brew-ez-stencil
171 \override NoteHead #'font-size = #-8
172 \override NoteHead #'font-family = #'sans
173 \override NoteHead #'font-series = #'bold
176 \revert NoteHead #'stencil
177 \revert NoteHead #'font-size
178 \revert NoteHead #'font-family
179 \revert NoteHead #'font-series
185 %% End the incipit and print a ``normal line start''.
186 endincipit = \context Staff {
187 \partial 16 s16 % Hack to handle e.g. \bar ".|" \endincipit
188 \once \override Staff.Clef #'full-size-change = ##t
189 \once \override Staff.Clef #'non-default = ##t
197 #(make-music 'MultiMeasureTextEvent
199 ;; Set the 'text based on the 'direction
200 (cons 'text (lambda (grob)
201 (if (eq? (ly:grob-property grob 'direction) DOWN)
202 (markup #:musicglyph "scripts.dfermata")
203 (markup #:musicglyph "scripts.ufermata"))))
204 (cons 'outside-staff-priority 40)
205 (cons 'outside-staff-padding 0)))
209 teeny = \set fontSize = #-3
210 tiny = \set fontSize = #-2
211 small = \set fontSize = #-1
212 normalsize = \set fontSize = #0
213 large = \set fontSize = #1
214 huge = \set fontSize = #2
219 glissando = #(make-music 'GlissandoEvent)
225 #(define-music-function (parser location) ()
226 (_i "Set the default note head style to a diamond-shaped style.")
227 (override-head-style '(NoteHead TabNoteHead) 'harmonic))
228 harmonicsOff = \defaultNoteHeads
230 #(define-music-function (parser location note) (ly:music?)
231 (_i "Print @var{note} with a diamond-shaped note head.")
232 (style-note-heads 'NoteHead 'harmonic note))
238 % hide notes, accidentals, etc.
239 \override Dots #'transparent = ##t
240 \override NoteHead #'transparent = ##t
241 \override NoteHead #'no-ledgers = ##t
242 \override Stem #'transparent = ##t
243 \override Flag #'transparent = ##t
244 \override Beam #'transparent = ##t
245 \override Accidental #'transparent = ##t
248 \revert Accidental #'transparent
249 \revert Beam #'transparent
250 \revert Stem #'transparent
251 \revert Flag #'transparent
252 \revert NoteHead #'transparent
253 \revert NoteHead #'no-ledgers
254 \revert Dots #'transparent
261 \set squashedPosition = #0
262 \override NoteHead #'style = #'slash
263 \override Accidental #'stencil = ##f
264 \override AccidentalCautionary #'stencil = ##f
267 \unset squashedPosition
268 \revert NoteHead #'style
269 \revert Accidental #'stencil
270 \revert AccidentalCautionary #'stencil
276 mergeDifferentlyDottedOn =
277 \override Staff.NoteCollision #'merge-differently-dotted = ##t
278 mergeDifferentlyDottedOff =
279 \revert Staff.NoteCollision #'merge-differently-dotted
280 mergeDifferentlyHeadedOn =
281 \override Staff.NoteCollision #'merge-differently-headed = ##t
282 mergeDifferentlyHeadedOff =
283 \revert Staff.NoteCollision #'merge-differently-headed
286 %% numeric time signature
288 numericTimeSignature = \override Staff.TimeSignature #'style = #'numbered
289 defaultTimeSignature = \revert Staff.TimeSignature #'style
295 #(define-music-function (parser location) ()
296 (_i "Set the default note head style to a triangle-shaped style.")
297 (override-head-style 'NoteHead 'do))
298 palmMuteOff = \defaultNoteHeads
300 #(define-music-function (parser location note) (ly:music?)
301 (_i "Print @var{note} with a triangle-shaped note head.")
302 (style-note-heads 'NoteHead 'do note))
308 phrasingSlurUp = \override PhrasingSlur #'direction = #UP
309 phrasingSlurDown = \override PhrasingSlur #'direction = #DOWN
310 phrasingSlurNeutral = \revert PhrasingSlur #'direction
312 % dash-patterns (make-simple-dash-definition defined at top of file)
313 phrasingSlurDashPattern =
314 #(define-music-function (parser location dash-fraction dash-period)
316 (_i "Set up a custom style of dash pattern for @var{dash-fraction} ratio of
317 line to space repeated at @var{dash-period} interval for phrasing slurs.")
319 \override PhrasingSlur #'dash-definition =
320 $(make-simple-dash-definition dash-fraction dash-period)
323 \override PhrasingSlur #'dash-definition = #'((0 1 0.4 0.75))
325 \override PhrasingSlur #'dash-definition = #'((0 1 0.1 0.75))
326 phrasingSlurHalfDashed =
327 \override PhrasingSlur #'dash-definition = #'((0 0.5 0.4 0.75)
329 phrasingSlurHalfSolid =
330 \override PhrasingSlur #'dash-definition = #'((0 0.5 1 1)
333 \revert PhrasingSlur #'dash-definition
339 #(define-music-function (parser location) ()
340 (_i "Enable generation of code in final-format (e.g. pdf) files to reference the
341 originating lilypond source statement;
342 this is helpful when developing a score but generates bigger final-format files.")
343 (ly:set-option 'point-and-click #t)
344 (make-music 'SequentialMusic 'void #t))
347 #(define-music-function (parser location) ()
348 (_i "Suppress generating extra code in final-format (e.g. pdf) files to point
349 back to the lilypond source statement.")
350 (ly:set-option 'point-and-click #f)
351 (make-music 'SequentialMusic 'void #t))
354 #(define-void-function (parser location types) (list-or-symbol?)
355 (_i "Set a type or list of types (such as @code{#'note-event}) for which point-and-click info is generated.")
356 (ly:set-option 'point-and-click types))
358 %% predefined fretboards
360 predefinedFretboardsOff =
361 \set predefinedDiagramTable = ##f
362 predefinedFretboardsOn =
363 \set predefinedDiagramTable = #default-fret-table
368 aikenHeads = \set shapeNoteStyles = #'#(do re miMirror fa sol la ti)
369 aikenHeadsMinor = \set shapeNoteStyles = #'#(la ti do re miMirror fa sol)
371 \set shapeNoteStyles = #'#(doFunk reFunk miFunk faFunk solFunk laFunk tiFunk)
373 \set shapeNoteStyles = #'#(laFunk tiFunk doFunk reFunk miFunk faFunk solFunk)
374 sacredHarpHeads = \set shapeNoteStyles = #'#(fa sol la fa sol la mi)
375 sacredHarpHeadsMinor = \set shapeNoteStyles = #'#(la mi fa sol la fa sol)
376 southernHarmonyHeads =
377 \set shapeNoteStyles = #'#(faThin sol laThin faThin sol laThin miThin)
378 southernHarmonyHeadsMinor =
379 \set shapeNoteStyles = #'#(laThin miThin faThin sol laThin faThin sol)
381 \set shapeNoteStyles = #'#(doWalker reWalker miWalker faWalker solFunk laWalker tiWalker)
383 \set shapeNoteStyles = #'#(laWalker tiWalker doWalker reWalker miWalker faWalker solFunk)
388 shiftOn = \override NoteColumn #'horizontal-shift = #1
389 shiftOnn = \override NoteColumn #'horizontal-shift = #2
390 shiftOnnn = \override NoteColumn #'horizontal-shift = #3
391 shiftOff = \revert NoteColumn #'horizontal-shift
397 slurUp = \override Slur #'direction = #UP
398 slurDown = \override Slur #'direction = #DOWN
399 slurNeutral = \revert Slur #'direction
401 % dash-patterns (make-simple-dash-definition defined at top of file)
403 #(define-music-function (parser location dash-fraction dash-period)
405 (_i "Set up a custom style of dash pattern for @var{dash-fraction}
406 ratio of line to space repeated at @var{dash-period} interval for slurs.")
408 \override Slur #'dash-definition =
409 $(make-simple-dash-definition dash-fraction dash-period)
411 slurDashed = \override Slur #'dash-definition = #'((0 1 0.4 0.75))
412 slurDotted = \override Slur #'dash-definition = #'((0 1 0.1 0.75))
413 slurHalfDashed = \override Slur #'dash-definition = #'((0 0.5 0.4 0.75)
415 slurHalfSolid = \override Slur #'dash-definition = #'((0 0.5 1 1)
417 slurSolid = \revert Slur #'dash-definition
422 showStaffSwitch = \set followVoice = ##t
423 hideStaffSwitch = \set followVoice = ##f
428 stemUp = \override Stem #'direction = #UP
429 stemDown = \override Stem #'direction = #DOWN
430 stemNeutral = \revert Stem #'direction
435 % switch to full notation
438 \revert TabStaff.TimeSignature #'stencil
439 % stems (the half note gets a double stem)
440 \revert TabVoice.Stem #'length
441 \revert TabVoice.Stem #'no-stem-extend
442 \revert TabVoice.Flag #'style
443 \revert TabVoice.Stem #'details
444 \revert TabVoice.Stem #'transparent
445 \override TabVoice.Stem #'stencil = #tabvoice::draw-double-stem-for-half-notes
446 \set autoBeaming = ##t
447 \revert NoteColumn #'ignore-collision
449 \revert TabVoice.Beam #'stencil
450 \revert TabVoice.StemTremolo #'stencil
451 \revert TabVoice.Dots #'stencil
452 \revert TabVoice.Tie #'stencil
453 \revert TabVoice.Tie #'after-line-breaking
454 \revert TabVoice.RepeatTie #'stencil
455 \revert TabVoice.RepeatTie #'after-line-breaking
456 \revert TabVoice.LaissezVibrerTie #'stencil
457 \revert TabVoice.Slur #'stencil
458 \revert TabVoice.PhrasingSlur #'stencil
460 \revert TabVoice.TupletBracket #'stencil
461 \revert TabVoice.TupletNumber #'stencil
463 \revert TabVoice.DynamicText #'transparent
464 \revert TabVoice.DynamicTextSpanner #'stencil
465 \revert TabVoice.DynamicTextSpanner #'stencil
466 \revert TabVoice.Hairpin #'transparent
468 \revert TabVoice.Rest #'stencil
469 \revert TabVoice.MultiMeasureRest #'stencil
470 \revert TabVoice.MultiMeasureRestNumber #'transparent
471 \revert TabVoice.MultiMeasureRestText #'transparent
473 \revert TabVoice.Glissando #'stencil
474 \revert TabVoice.Script #'stencil
475 \revert TabVoice.TextScript #'stencil
476 \revert TabVoice.TextSpanner #'stencil
477 \revert TabStaff.Arpeggio #'stencil
478 \revert TabStaff.NoteColumn #'ignore-collision
481 %tie/repeat tie behaviour
482 hideSplitTiedTabNotes = {
483 \override TabVoice.TabNoteHead #'(details tied-properties break-visibility) = #all-invisible
484 \override TabVoice.TabNoteHead #'(details tied-properties parenthesize) = ##f
485 \override TabVoice.TabNoteHead #'(details repeat-tied-properties note-head-visible) = ##f
486 \override TabVoice.TabNoteHead #'(details repeat-tied-properties parenthesize) = ##f
489 showSplitTiedTabNotes = {
490 \override TabVoice.TabNoteHead #'(details tied-properties break-visibility) = #begin-of-line-visible
491 \override TabVoice.TabNoteHead #'(details tied-properties parenthesize) = ##t
492 \override TabVoice.TabNoteHead #'(details repeat-tied-properties note-head-visible) = ##t
493 \override TabVoice.TabNoteHead #'(details repeat-tied-properties parenthesize) = ##t
499 \override TextScript #'extra-spacing-width = #'(0 . 0)
500 \override TextScript #'extra-spacing-height = #'(-inf.0 . +inf.0)
503 \override TextScript #'extra-spacing-width = #'(+inf.0 . -inf.0)
504 \override TextScript #'extra-spacing-height = #'(0 . 0)
510 textSpannerUp = \override TextSpanner #'direction = #UP
511 textSpannerDown = \override TextSpanner #'direction = #DOWN
512 textSpannerNeutral = \revert TextSpanner #'direction
518 tieUp = \override Tie #'direction = #UP
519 tieDown = \override Tie #'direction = #DOWN
520 tieNeutral = \revert Tie #'direction
522 % dash-patterns (make-simple-dash-definition defined at top of file)
524 #(define-music-function (parser location dash-fraction dash-period)
526 (_i "Set up a custom style of dash pattern for @var{dash-fraction}
527 ratio of line to space repeated at @var{dash-period} interval for ties.")
529 \override Tie #'dash-definition =
530 $(make-simple-dash-definition dash-fraction dash-period)
532 tieDashed = \override Tie #'dash-definition = #'((0 1 0.4 0.75))
533 tieDotted = \override Tie #'dash-definition = #'((0 1 0.1 0.75))
534 tieHalfDashed = \override Tie #'dash-definition = #'((0 0.5 0.4 0.75)
536 tieHalfSolid = \override Tie #'dash-definition = #'((0 0.5 1 1)
538 tieSolid = \revert Tie #'dash-definition
543 tupletUp = \override TupletBracket #'direction = #UP
544 tupletDown = \override TupletBracket #'direction = #DOWN
545 tupletNeutral = \revert TupletBracket #'direction
550 % dynamic ly:dir? text script, articulation script ly:dir?
551 voiceOne = #(context-spec-music (make-voice-props-set 0) 'Voice)
552 voiceTwo = #(context-spec-music (make-voice-props-set 1) 'Voice)
553 voiceThree = #(context-spec-music (make-voice-props-set 2) 'Voice)
554 voiceFour = #(context-spec-music (make-voice-props-set 3) 'Voice)
555 oneVoice = #(context-spec-music (make-voice-props-revert) 'Voice)
561 \override NoteHead #'style = #'diamond
562 \override NoteHead #'color = #red
563 \override Stem #'color = #red
564 \override Flag #'color = #red
565 \override Beam #'color = #red
568 \override NoteHead #'style = #'triangle
569 \override NoteHead #'color = #blue
570 \override Stem #'color = #blue
571 \override Flag #'color = #blue
572 \override Beam #'color = #blue
575 \override NoteHead #'style = #'xcircle
576 \override NoteHead #'color = #green
577 \override Stem #'color = #green
578 \override Flag #'color = #green
579 \override Beam #'color = #green
582 \override NoteHead #'style = #'cross
583 \override NoteHead #'color = #magenta
584 \override Stem #'color = #magenta
585 \override Flag #'color = #magenta
586 \override Beam #'color = #magenta
588 voiceNeutralStyle = {
589 \revert NoteHead #'style
590 \revert NoteHead #'color
600 #(define-music-function (parser location) ()
601 (_i "Set the default note head style to a cross-shaped style.")
602 (override-head-style '(TabNoteHead NoteHead) 'cross))
603 xNotesOff = \defaultNoteHeads
605 #(define-music-function (parser location note) (ly:music?)
606 (_i "Print @var{note} with a cross-shaped note head.")
607 (style-note-heads '(TabNoteHead NoteHead) 'cross note))
610 %% dead notes (these need to come after "x notes")
612 % Define aliases of cross-head notes for specific purposes
613 deadNotesOn = \xNotesOn
614 deadNotesOff = \xNotesOff