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)))
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." )
25 ((1) (set-accidental-style (car style)))
26 ((2) (set-accidental-style (cadr style) (car style)))
28 (ly:parser-error parser (_ "not an accidental style")
30 (make-music 'Music))))
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.
39 arpeggio = #(make-music 'ArpeggioEvent)
41 \revert Arpeggio.stencil
42 \revert Arpeggio.X-extent
43 \override Arpeggio.arpeggio-direction = #UP
46 \revert Arpeggio.stencil
47 \revert Arpeggio.X-extent
48 \override Arpeggio.arpeggio-direction = #DOWN
51 \revert Arpeggio.stencil
52 \revert Arpeggio.X-extent
53 \revert Arpeggio.arpeggio-direction
54 \revert Arpeggio.dash-definition
57 \revert Arpeggio.X-extent
58 \override Arpeggio.stencil = #ly:arpeggio::brew-chord-bracket
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
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))
74 autoBeamOn = \set autoBeaming = ##t
75 autoBeamOff = \set autoBeaming = ##f
81 \override BalloonTextItem.extra-spacing-width = #'(0 . 0)
82 \override BalloonTextItem.extra-spacing-height = #'(-inf.0 . +inf.0)
85 \override BalloonTextItem.extra-spacing-width = #'(+inf.0 . -inf.0)
86 \override BalloonTextItem.extra-spacing-height = #'(0 . 0)
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)
104 (caddr glyph-list))))
109 bassFigureExtendersOn = {
110 \set useBassFigureExtenders = ##t
111 \set Staff.useBassFigureExtenders = ##t
113 bassFigureExtendersOff = {
114 \set useBassFigureExtenders = ##f
115 \set Staff.useBassFigureExtenders = ##f
117 bassFigureStaffAlignmentDown =
118 \override Staff.BassFigureAlignmentPositioning.direction = #DOWN
119 bassFigureStaffAlignmentUp =
120 \override Staff.BassFigureAlignmentPositioning.direction = #UP
121 bassFigureStaffAlignmentNeutral =
122 \revert Staff.BassFigureAlignmentPositioning.direction
128 \set Timing.timing = ##f
129 \set Timing.autoBeaming = ##f
133 \set Timing.timing = ##t
134 \set Timing.measurePosition = #ZERO-MOMENT
135 \set Timing.autoBeaming = ##t
142 \set chordRootNamer = #(chord-name->italian-markup #t)
143 \set chordPrefixSpacer = #0.4
146 \set chordRootNamer = #(chord-name->german-markup #t)
147 \set chordNoteNamer = #note-name->german-markup
150 \set chordRootNamer = #(chord-name->german-markup #f)
151 \set chordNoteNamer = #note-name->german-markup
154 \set chordRootNamer = #(chord-name->italian-markup #f)
155 \set chordPrefixSpacer = #0.4
158 \set chordNameExceptions = #powerChordExceptions
162 %% compressFullBarRests
164 compressFullBarRests = \set Score.skipBars = ##t
165 expandFullBarRests = \set Score.skipBars = ##f
170 dotsUp = \override Dots.direction = #UP
171 dotsDown = \override Dots.direction = #DOWN
172 dotsNeutral = \revert Dots.direction
178 \override DynamicText.direction = #UP
179 \override DynamicLineSpanner.direction = #UP
182 \override DynamicText.direction = #DOWN
183 \override DynamicLineSpanner.direction = #DOWN
186 \revert DynamicText.direction
187 \revert DynamicLineSpanner.direction
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
200 \revert NoteHead.stencil
201 \revert NoteHead.font-size
202 \revert NoteHead.font-family
203 \revert NoteHead.font-series
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
221 #(make-music 'MultiMeasureTextEvent
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)))
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
243 glissando = #(make-music 'GlissandoEvent)
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
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))
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
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
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
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
314 \revert NoteHead.style
315 \revert Stem.X-offset
318 \revert Accidental.glyph-name-alist
323 \revert Beam.positions
324 \revert Beam.quantized-positions
325 \revert NoteHead.duration-log
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
340 %% numeric time signature
342 numericTimeSignature = \override Staff.TimeSignature.style = #'numbered
343 defaultTimeSignature = \revert Staff.TimeSignature.style
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
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))
362 phrasingSlurUp = \override PhrasingSlur.direction = #UP
363 phrasingSlurDown = \override PhrasingSlur.direction = #DOWN
364 phrasingSlurNeutral = \revert PhrasingSlur.direction
366 % dash-patterns (make-simple-dash-definition defined at top of file)
367 phrasingSlurDashPattern =
368 #(define-music-function (parser location dash-fraction dash-period)
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.")
373 \override PhrasingSlur.dash-definition =
374 $(make-simple-dash-definition dash-fraction dash-period)
377 \override PhrasingSlur.dash-definition = #'((0 1 0.4 0.75))
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)
383 phrasingSlurHalfSolid =
384 \override PhrasingSlur.dash-definition = #'((0 0.5 1 1)
387 \revert PhrasingSlur.dash-definition
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))
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))
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))
410 %% predefined fretboards
412 predefinedFretboardsOff =
413 \set predefinedDiagramTable = ##f
414 predefinedFretboardsOn =
415 \set predefinedDiagramTable = #default-fret-table
420 aikenHeads = \set shapeNoteStyles = ##(do re miMirror fa sol la ti)
421 aikenHeadsMinor = \set shapeNoteStyles = ##(la ti do re miMirror fa sol)
423 \set shapeNoteStyles = ##(doFunk reFunk miFunk faFunk solFunk laFunk tiFunk)
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)
433 \set shapeNoteStyles = ##(doWalker reWalker miWalker faWalker solFunk laWalker tiWalker)
435 \set shapeNoteStyles = ##(laWalker tiWalker doWalker reWalker miWalker faWalker solFunk)
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
449 slurUp = \override Slur.direction = #UP
450 slurDown = \override Slur.direction = #DOWN
451 slurNeutral = \revert Slur.direction
453 % dash-patterns (make-simple-dash-definition defined at top of file)
455 #(define-music-function (parser location dash-fraction dash-period)
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.")
460 \override Slur.dash-definition =
461 $(make-simple-dash-definition dash-fraction dash-period)
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)
467 slurHalfSolid = \override Slur.dash-definition = #'((0 0.5 1 1)
469 slurSolid = \revert Slur.dash-definition
474 showStaffSwitch = \set followVoice = ##t
475 hideStaffSwitch = \set followVoice = ##f
480 stemUp = \override Stem.direction = #UP
481 stemDown = \override Stem.direction = #DOWN
482 stemNeutral = \revert Stem.direction
487 % switch to full notation
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
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
514 \revert TabStaff.TupletBracket.stencil
515 \revert TabStaff.TupletNumber.stencil
517 \revert TabStaff.DynamicText.stencil
518 \revert TabStaff.DynamicTextSpanner.stencil
519 \revert TabStaff.DynamicTextSpanner.stencil
520 \revert TabStaff.Hairpin.stencil
522 \revert TabStaff.Rest.stencil
523 \revert TabStaff.MultiMeasureRest.stencil
524 \revert TabStaff.MultiMeasureRestNumber.stencil
525 \revert TabStaff.MultiMeasureRestText.stencil
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
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
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
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)
559 \override TextScript.extra-spacing-width = #'(+inf.0 . -inf.0)
560 \override TextScript.extra-spacing-height = #'(0 . 0)
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)
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
580 textSpannerUp = \override TextSpanner.direction = #UP
581 textSpannerDown = \override TextSpanner.direction = #DOWN
582 textSpannerNeutral = \revert TextSpanner.direction
588 tieUp = \override Tie.direction = #UP
589 tieDown = \override Tie.direction = #DOWN
590 tieNeutral = \revert Tie.direction
592 % dash-patterns (make-simple-dash-definition defined at top of file)
594 #(define-music-function (parser location dash-fraction dash-period)
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.")
599 \override Tie.dash-definition =
600 $(make-simple-dash-definition dash-fraction dash-period)
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)
606 tieHalfSolid = \override Tie.dash-definition = #'((0 0.5 1 1)
608 tieSolid = \revert Tie.dash-definition
613 tupletUp = \override TupletBracket.direction = #UP
614 tupletDown = \override TupletBracket.direction = #DOWN
615 tupletNeutral = \revert TupletBracket.direction
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)
631 \override NoteHead.style = #'diamond
632 \override NoteHead.color = #red
633 \override Stem.color = #red
634 \override Beam.color = #red
637 \override NoteHead.style = #'triangle
638 \override NoteHead.color = #blue
639 \override Stem.color = #blue
640 \override Beam.color = #blue
643 \override NoteHead.style = #'xcircle
644 \override NoteHead.color = #green
645 \override Stem.color = #green
646 \override Beam.color = #green
649 \override NoteHead.style = #'cross
650 \override NoteHead.color = #magenta
651 \override Stem.color = #magenta
652 \override Beam.color = #magenta
654 voiceNeutralStyle = {
655 \revert NoteHead.style
656 \revert NoteHead.color
665 #(define-void-function (parser location bar) (string?)
666 (allow-volta-hook bar))
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
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))
681 %% dead notes (these need to come after "x notes")
683 % Define aliases of cross-head notes for specific purposes
684 deadNotesOn = \xNotesOn
685 deadNotesOff = \xNotesOff