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 context style) ((symbol?) string?)
20 (_i "Set accidental style to @var{style}, a string. If an optional
21 @var{context} symbol is given, e.g. @code{#'Staff} or @code{#'Voice},
22 the settings are applied to that context. Otherwise, the context
23 defaults to @samp{Staff}, except for piano styles, which use
24 @samp{GrandStaff} as a context." )
26 (set-accidental-style (string->symbol style) context)
27 (set-accidental-style (string->symbol style))))
31 % For drawing vertical chord brackets with \arpeggio
32 % This is a shorthand for the value of the print-function property
33 % of either Staff.Arpeggio or PianoStaff.Arpeggio, depending whether
34 % cross-staff brackets are desired.
36 arpeggio = #(make-music 'ArpeggioEvent)
38 \revert Arpeggio #'stencil
39 \revert Arpeggio #'X-extent
40 \override Arpeggio #'arpeggio-direction = #UP
43 \revert Arpeggio #'stencil
44 \revert Arpeggio #'X-extent
45 \override Arpeggio #'arpeggio-direction = #DOWN
48 \revert Arpeggio #'stencil
49 \revert Arpeggio #'X-extent
50 \revert Arpeggio #'arpeggio-direction
51 \revert Arpeggio #'dash-definition
54 \revert Arpeggio #'X-extent
55 \override Arpeggio #'stencil = #ly:arpeggio::brew-chord-bracket
57 arpeggioParenthesis = {
58 \override Arpeggio #'stencil = #ly:arpeggio::brew-chord-slur
59 \override Arpeggio #'X-extent = #ly:grob::stencil-width
60 \revert Arpeggio #'dash-definition
62 arpeggioParenthesisDashed = {
63 \override Arpeggio #'stencil = #ly:arpeggio::brew-chord-slur
64 \override Arpeggio #'X-extent = #ly:grob::stencil-width
65 \override Arpeggio #'dash-definition = #'((0 1 0.4 0.75))
71 autoBeamOn = \set autoBeaming = ##t
72 autoBeamOff = \set autoBeaming = ##f
78 \override BalloonTextItem #'extra-spacing-width = #'(0 . 0)
79 \override BalloonTextItem #'extra-spacing-height = #'(-inf.0 . +inf.0)
82 \override BalloonTextItem #'extra-spacing-width = #'(+inf.0 . -inf.0)
83 \override BalloonTextItem #'extra-spacing-height = #'(0 . 0)
90 #(define-void-function
91 (parser location bar glyph-list) (string? list?)
92 (_i "Define bar line settings for bar line @var{bar}.
93 The list @var{glyph-list} must have three entries which define
94 the appearance at the end of line, at the beginning of the next line,
95 and the span bar, respectively." )
96 (if (not (= (length glyph-list) 3))
97 (ly:error (_ "Argument list for bar '~a' must have three components.") bar)
101 (caddr glyph-list))))
106 bassFigureExtendersOn = {
107 \set useBassFigureExtenders = ##t
108 \set Staff.useBassFigureExtenders = ##t
110 bassFigureExtendersOff = {
111 \set useBassFigureExtenders = ##f
112 \set Staff.useBassFigureExtenders = ##f
114 bassFigureStaffAlignmentDown =
115 \override Staff.BassFigureAlignmentPositioning #'direction = #DOWN
116 bassFigureStaffAlignmentUp =
117 \override Staff.BassFigureAlignmentPositioning #'direction = #UP
118 bassFigureStaffAlignmentNeutral =
119 \revert Staff.BassFigureAlignmentPositioning #'direction
125 \set Timing.timing = ##f
126 \set Timing.autoBeaming = ##f
130 \set Timing.timing = ##t
131 \set Timing.measurePosition = #ZERO-MOMENT
132 \set Timing.autoBeaming = ##t
139 \set chordRootNamer = #(chord-name->italian-markup #t)
140 \set chordPrefixSpacer = #0.4
143 \set chordRootNamer = #(chord-name->german-markup #t)
144 \set chordNoteNamer = #note-name->german-markup
147 \set chordRootNamer = #(chord-name->german-markup #f)
148 \set chordNoteNamer = #note-name->german-markup
151 \set chordRootNamer = #(chord-name->italian-markup #f)
152 \set chordPrefixSpacer = #0.4
155 \set chordNameExceptions = #powerChordExceptions
159 %% compressFullBarRests
161 compressFullBarRests = \set Score.skipBars = ##t
162 expandFullBarRests = \set Score.skipBars = ##f
167 dotsUp = \override Dots #'direction = #UP
168 dotsDown = \override Dots #'direction = #DOWN
169 dotsNeutral = \revert Dots #'direction
175 \override DynamicText #'direction = #UP
176 \override DynamicLineSpanner #'direction = #UP
179 \override DynamicText #'direction = #DOWN
180 \override DynamicLineSpanner #'direction = #DOWN
183 \revert DynamicText #'direction
184 \revert DynamicLineSpanner #'direction
191 \override NoteHead #'stencil = #note-head::brew-ez-stencil
192 \override NoteHead #'font-size = #-8
193 \override NoteHead #'font-family = #'sans
194 \override NoteHead #'font-series = #'bold
197 \revert NoteHead #'stencil
198 \revert NoteHead #'font-size
199 \revert NoteHead #'font-family
200 \revert NoteHead #'font-series
206 %% End the incipit and print a ``normal line start''.
207 endincipit = \context Staff {
208 \partial 16 s16 % Hack to handle e.g. \bar ".|" \endincipit
209 \once \override Staff.Clef #'full-size-change = ##t
210 \once \override Staff.Clef #'non-default = ##t
218 #(make-music 'MultiMeasureTextEvent
220 ;; Set the 'text based on the 'direction
221 (cons 'text (lambda (grob)
222 (if (eq? (ly:grob-property grob 'direction) DOWN)
223 (markup #:musicglyph "scripts.dfermata")
224 (markup #:musicglyph "scripts.ufermata"))))
225 (cons 'outside-staff-priority 40)
226 (cons 'outside-staff-padding 0)))
230 teeny = \set fontSize = #-3
231 tiny = \set fontSize = #-2
232 small = \set fontSize = #-1
233 normalsize = \set fontSize = #0
234 large = \set fontSize = #1
235 huge = \set fontSize = #2
240 glissando = #(make-music 'GlissandoEvent)
246 #(define-music-function (parser location) ()
247 (_i "Set the default note head style to a diamond-shaped style.")
248 (override-head-style '(NoteHead TabNoteHead) 'harmonic))
249 harmonicsOff = \defaultNoteHeads
251 #(define-music-function (parser location note) (ly:music?)
252 (_i "Print @var{note} with a diamond-shaped note head.")
253 (style-note-heads 'NoteHead 'harmonic note))
259 % hide notes, accidentals, etc.
260 \override Dots #'transparent = ##t
261 \override NoteHead #'transparent = ##t
262 \override NoteHead #'no-ledgers = ##t
263 \override Stem #'transparent = ##t
264 \override Flag #'transparent = ##t
265 \override Beam #'transparent = ##t
266 \override Accidental #'transparent = ##t
267 \override Rest #'transparent = ##t
268 \override TabNoteHead #'transparent = ##t
271 \revert Accidental #'transparent
272 \revert Beam #'transparent
273 \revert Stem #'transparent
274 \revert Flag #'transparent
275 \revert NoteHead #'transparent
276 \revert NoteHead #'no-ledgers
277 \revert Dots #'transparent
278 \revert Rest #'transparent
279 \revert TabNoteHead #'transparent
286 \set squashedPosition = #0
287 \override NoteHead #'style = #'slash
288 \override Accidental #'stencil = ##f
289 \override AccidentalCautionary #'stencil = ##f
292 \unset squashedPosition
293 \revert NoteHead #'style
294 \revert Accidental #'stencil
295 \revert AccidentalCautionary #'stencil
301 mergeDifferentlyDottedOn =
302 \override Staff.NoteCollision #'merge-differently-dotted = ##t
303 mergeDifferentlyDottedOff =
304 \revert Staff.NoteCollision #'merge-differently-dotted
305 mergeDifferentlyHeadedOn =
306 \override Staff.NoteCollision #'merge-differently-headed = ##t
307 mergeDifferentlyHeadedOff =
308 \revert Staff.NoteCollision #'merge-differently-headed
311 %% numeric time signature
313 numericTimeSignature = \override Staff.TimeSignature #'style = #'numbered
314 defaultTimeSignature = \revert Staff.TimeSignature #'style
320 #(define-music-function (parser location) ()
321 (_i "Set the default note head style to a triangle-shaped style.")
322 (override-head-style 'NoteHead 'do))
323 palmMuteOff = \defaultNoteHeads
325 #(define-music-function (parser location note) (ly:music?)
326 (_i "Print @var{note} with a triangle-shaped note head.")
327 (style-note-heads 'NoteHead 'do note))
333 phrasingSlurUp = \override PhrasingSlur #'direction = #UP
334 phrasingSlurDown = \override PhrasingSlur #'direction = #DOWN
335 phrasingSlurNeutral = \revert PhrasingSlur #'direction
337 % dash-patterns (make-simple-dash-definition defined at top of file)
338 phrasingSlurDashPattern =
339 #(define-music-function (parser location dash-fraction dash-period)
341 (_i "Set up a custom style of dash pattern for @var{dash-fraction} ratio of
342 line to space repeated at @var{dash-period} interval for phrasing slurs.")
344 \override PhrasingSlur #'dash-definition =
345 $(make-simple-dash-definition dash-fraction dash-period)
348 \override PhrasingSlur #'dash-definition = #'((0 1 0.4 0.75))
350 \override PhrasingSlur #'dash-definition = #'((0 1 0.1 0.75))
351 phrasingSlurHalfDashed =
352 \override PhrasingSlur #'dash-definition = #'((0 0.5 0.4 0.75)
354 phrasingSlurHalfSolid =
355 \override PhrasingSlur #'dash-definition = #'((0 0.5 1 1)
358 \revert PhrasingSlur #'dash-definition
364 #(define-music-function (parser location) ()
365 (_i "Enable generation of code in final-format (e.g. pdf) files to reference the
366 originating lilypond source statement;
367 this is helpful when developing a score but generates bigger final-format files.")
368 (ly:set-option 'point-and-click #t)
369 (make-music 'SequentialMusic 'void #t))
372 #(define-music-function (parser location) ()
373 (_i "Suppress generating extra code in final-format (e.g. pdf) files to point
374 back to the lilypond source statement.")
375 (ly:set-option 'point-and-click #f)
376 (make-music 'SequentialMusic 'void #t))
379 #(define-void-function (parser location types) (list-or-symbol?)
380 (_i "Set a type or list of types (such as @code{#'note-event}) for which point-and-click info is generated.")
381 (ly:set-option 'point-and-click types))
383 %% predefined fretboards
385 predefinedFretboardsOff =
386 \set predefinedDiagramTable = ##f
387 predefinedFretboardsOn =
388 \set predefinedDiagramTable = #default-fret-table
393 aikenHeads = \set shapeNoteStyles = #'#(do re miMirror fa sol la ti)
394 aikenHeadsMinor = \set shapeNoteStyles = #'#(la ti do re miMirror fa sol)
396 \set shapeNoteStyles = #'#(doFunk reFunk miFunk faFunk solFunk laFunk tiFunk)
398 \set shapeNoteStyles = #'#(laFunk tiFunk doFunk reFunk miFunk faFunk solFunk)
399 sacredHarpHeads = \set shapeNoteStyles = #'#(fa sol la fa sol la mi)
400 sacredHarpHeadsMinor = \set shapeNoteStyles = #'#(la mi fa sol la fa sol)
401 southernHarmonyHeads =
402 \set shapeNoteStyles = #'#(faThin sol laThin faThin sol laThin miThin)
403 southernHarmonyHeadsMinor =
404 \set shapeNoteStyles = #'#(laThin miThin faThin sol laThin faThin sol)
406 \set shapeNoteStyles = #'#(doWalker reWalker miWalker faWalker solFunk laWalker tiWalker)
408 \set shapeNoteStyles = #'#(laWalker tiWalker doWalker reWalker miWalker faWalker solFunk)
413 shiftOn = \override NoteColumn #'horizontal-shift = #1
414 shiftOnn = \override NoteColumn #'horizontal-shift = #2
415 shiftOnnn = \override NoteColumn #'horizontal-shift = #3
416 shiftOff = \revert NoteColumn #'horizontal-shift
422 slurUp = \override Slur #'direction = #UP
423 slurDown = \override Slur #'direction = #DOWN
424 slurNeutral = \revert Slur #'direction
426 % dash-patterns (make-simple-dash-definition defined at top of file)
428 #(define-music-function (parser location dash-fraction dash-period)
430 (_i "Set up a custom style of dash pattern for @var{dash-fraction}
431 ratio of line to space repeated at @var{dash-period} interval for slurs.")
433 \override Slur #'dash-definition =
434 $(make-simple-dash-definition dash-fraction dash-period)
436 slurDashed = \override Slur #'dash-definition = #'((0 1 0.4 0.75))
437 slurDotted = \override Slur #'dash-definition = #'((0 1 0.1 0.75))
438 slurHalfDashed = \override Slur #'dash-definition = #'((0 0.5 0.4 0.75)
440 slurHalfSolid = \override Slur #'dash-definition = #'((0 0.5 1 1)
442 slurSolid = \revert Slur #'dash-definition
447 showStaffSwitch = \set followVoice = ##t
448 hideStaffSwitch = \set followVoice = ##f
453 stemUp = \override Stem #'direction = #UP
454 stemDown = \override Stem #'direction = #DOWN
455 stemNeutral = \revert Stem #'direction
460 % switch to full notation
463 \revert TabStaff.TimeSignature #'stencil
464 % stems (the half note gets a double stem)
465 \revert TabVoice.Stem #'length
466 \revert TabVoice.Stem #'no-stem-extend
467 \revert TabVoice.Flag #'style
468 \revert TabVoice.Stem #'details
469 \revert TabVoice.Stem #'stencil
470 \revert TabVoice.Flag #'stencil
471 \override TabVoice.Stem #'stencil = #tabvoice::draw-double-stem-for-half-notes
472 \override TabVoice.Stem #'X-extent = #tabvoice::make-double-stem-width-for-half-notes
473 \set TabVoice.autoBeaming = ##t
474 \revert TabVoice.NoteColumn #'ignore-collision
476 \revert TabVoice.Beam #'stencil
477 \revert TabVoice.StemTremolo #'stencil
478 \revert TabVoice.Dots #'stencil
479 \revert TabVoice.Tie #'stencil
480 \revert TabVoice.Tie #'after-line-breaking
481 \revert TabVoice.RepeatTie #'stencil
482 \revert TabVoice.RepeatTie #'after-line-breaking
483 \revert TabVoice.LaissezVibrerTie #'stencil
484 \revert TabVoice.Slur #'stencil
485 \revert TabVoice.PhrasingSlur #'stencil
487 \revert TabVoice.TupletBracket #'stencil
488 \revert TabVoice.TupletNumber #'stencil
490 \revert TabVoice.DynamicText #'stencil
491 \revert TabVoice.DynamicTextSpanner #'stencil
492 \revert TabVoice.DynamicTextSpanner #'stencil
493 \revert TabVoice.Hairpin #'stencil
495 \revert TabVoice.Rest #'stencil
496 \revert TabVoice.MultiMeasureRest #'stencil
497 \revert TabVoice.MultiMeasureRestNumber #'stencil
498 \revert TabVoice.MultiMeasureRestText #'stencil
500 \revert TabVoice.Glissando #'stencil
501 \revert TabVoice.Script #'stencil
502 \revert TabVoice.TextScript #'stencil
503 \revert TabVoice.TextSpanner #'stencil
504 \revert TabStaff.Arpeggio #'stencil
505 \revert TabStaff.NoteColumn #'ignore-collision
508 %tie/repeat tie behaviour
509 hideSplitTiedTabNotes = {
510 \override TabVoice.TabNoteHead #'(details tied-properties break-visibility) = #all-invisible
511 \override TabVoice.TabNoteHead #'(details tied-properties parenthesize) = ##f
512 \override TabVoice.TabNoteHead #'(details repeat-tied-properties note-head-visible) = ##f
513 \override TabVoice.TabNoteHead #'(details repeat-tied-properties parenthesize) = ##f
516 showSplitTiedTabNotes = {
517 \override TabVoice.TabNoteHead #'(details tied-properties break-visibility) = #begin-of-line-visible
518 \override TabVoice.TabNoteHead #'(details tied-properties parenthesize) = ##t
519 \override TabVoice.TabNoteHead #'(details repeat-tied-properties note-head-visible) = ##t
520 \override TabVoice.TabNoteHead #'(details repeat-tied-properties parenthesize) = ##t
526 \override TextScript #'extra-spacing-width = #'(0 . 0)
527 \override TextScript #'extra-spacing-height = #'(-inf.0 . +inf.0)
530 \override TextScript #'extra-spacing-width = #'(+inf.0 . -inf.0)
531 \override TextScript #'extra-spacing-height = #'(0 . 0)
537 textSpannerUp = \override TextSpanner #'direction = #UP
538 textSpannerDown = \override TextSpanner #'direction = #DOWN
539 textSpannerNeutral = \revert TextSpanner #'direction
545 tieUp = \override Tie #'direction = #UP
546 tieDown = \override Tie #'direction = #DOWN
547 tieNeutral = \revert Tie #'direction
549 % dash-patterns (make-simple-dash-definition defined at top of file)
551 #(define-music-function (parser location dash-fraction dash-period)
553 (_i "Set up a custom style of dash pattern for @var{dash-fraction}
554 ratio of line to space repeated at @var{dash-period} interval for ties.")
556 \override Tie #'dash-definition =
557 $(make-simple-dash-definition dash-fraction dash-period)
559 tieDashed = \override Tie #'dash-definition = #'((0 1 0.4 0.75))
560 tieDotted = \override Tie #'dash-definition = #'((0 1 0.1 0.75))
561 tieHalfDashed = \override Tie #'dash-definition = #'((0 0.5 0.4 0.75)
563 tieHalfSolid = \override Tie #'dash-definition = #'((0 0.5 1 1)
565 tieSolid = \revert Tie #'dash-definition
570 tupletUp = \override TupletBracket #'direction = #UP
571 tupletDown = \override TupletBracket #'direction = #DOWN
572 tupletNeutral = \revert TupletBracket #'direction
577 % dynamic ly:dir? text script, articulation script ly:dir?
578 voiceOne = #(context-spec-music (make-voice-props-set 0) 'Voice)
579 voiceTwo = #(context-spec-music (make-voice-props-set 1) 'Voice)
580 voiceThree = #(context-spec-music (make-voice-props-set 2) 'Voice)
581 voiceFour = #(context-spec-music (make-voice-props-set 3) 'Voice)
582 oneVoice = #(context-spec-music (make-voice-props-revert) 'Voice)
588 \override NoteHead #'style = #'diamond
589 \override NoteHead #'color = #red
590 \override Stem #'color = #red
591 \override Flag #'color = #red
592 \override Beam #'color = #red
595 \override NoteHead #'style = #'triangle
596 \override NoteHead #'color = #blue
597 \override Stem #'color = #blue
598 \override Flag #'color = #blue
599 \override Beam #'color = #blue
602 \override NoteHead #'style = #'xcircle
603 \override NoteHead #'color = #green
604 \override Stem #'color = #green
605 \override Flag #'color = #green
606 \override Beam #'color = #green
609 \override NoteHead #'style = #'cross
610 \override NoteHead #'color = #magenta
611 \override Stem #'color = #magenta
612 \override Flag #'color = #magenta
613 \override Beam #'color = #magenta
615 voiceNeutralStyle = {
616 \revert NoteHead #'style
617 \revert NoteHead #'color
627 #(define-void-function (parser location bar) (string?)
628 (allow-volta-hook bar))
633 #(define-music-function (parser location) ()
634 (_i "Set the default note head style to a cross-shaped style.")
635 (override-head-style '(TabNoteHead NoteHead) 'cross))
636 xNotesOff = \defaultNoteHeads
638 #(define-music-function (parser location note) (ly:music?)
639 (_i "Print @var{note} with a cross-shaped note head.")
640 (style-note-heads '(TabNoteHead NoteHead) 'cross note))
643 %% dead notes (these need to come after "x notes")
645 % Define aliases of cross-head notes for specific purposes
646 deadNotesOn = \xNotesOn
647 deadNotesOff = \xNotesOff