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 () ()
13 (_i "Revert to the default note head style.")
15 (revert-head-style '(NoteHead TabNoteHead)) 'Bottom))
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." )
26 ((1) (set-accidental-style (car style)))
27 ((2) (set-accidental-style (cadr style) (car style)))
29 (ly:parser-error (_ "not an accidental style")
31 (make-music 'Music))))
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.
40 arpeggio = #(make-music 'ArpeggioEvent)
42 \revert Arpeggio.stencil
43 \revert Arpeggio.X-extent
44 \override Arpeggio.arpeggio-direction = #UP
47 \revert Arpeggio.stencil
48 \revert Arpeggio.X-extent
49 \override Arpeggio.arpeggio-direction = #DOWN
52 \revert Arpeggio.stencil
53 \revert Arpeggio.X-extent
54 \revert Arpeggio.arpeggio-direction
55 \revert Arpeggio.dash-definition
58 \revert Arpeggio.X-extent
59 \override Arpeggio.stencil = #ly:arpeggio::brew-chord-bracket
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
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))
75 autoBeamOn = \set autoBeaming = ##t
76 autoBeamOff = \set autoBeaming = ##f
82 \override BalloonTextItem.extra-spacing-width = #'(0 . 0)
83 \override BalloonTextItem.extra-spacing-height = #'(-inf.0 . +inf.0)
86 \override BalloonTextItem.extra-spacing-width = #'(+inf.0 . -inf.0)
87 \override BalloonTextItem.extra-spacing-height = #'(0 . 0)
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)
105 (caddr glyph-list))))
110 bassFigureExtendersOn = {
111 \set useBassFigureExtenders = ##t
112 \set Staff.useBassFigureExtenders = ##t
114 bassFigureExtendersOff = {
115 \set useBassFigureExtenders = ##f
116 \set Staff.useBassFigureExtenders = ##f
118 bassFigureStaffAlignmentDown =
119 \override Staff.BassFigureAlignmentPositioning.direction = #DOWN
120 bassFigureStaffAlignmentUp =
121 \override Staff.BassFigureAlignmentPositioning.direction = #UP
122 bassFigureStaffAlignmentNeutral =
123 \revert Staff.BassFigureAlignmentPositioning.direction
128 cadenzaOn = \set Timing.timing = ##f
130 cadenzaOff = \set Timing.timing = ##t
135 \set chordRootNamer = #(chord-name->italian-markup #t)
136 \set chordPrefixSpacer = #0.4
139 \set chordRootNamer = #(chord-name->german-markup #t)
140 \set chordNoteNamer = #note-name->german-markup
143 \set chordRootNamer = #(chord-name->german-markup #f)
144 \set chordNoteNamer = #note-name->german-markup
147 \set chordRootNamer = #(chord-name->italian-markup #f)
148 \set chordPrefixSpacer = #0.4
151 \set chordNameExceptions = #powerChordExceptions
155 %% compressFullBarRests
157 compressFullBarRests = \set Score.skipBars = ##t
158 expandFullBarRests = \set Score.skipBars = ##f
163 dotsUp = \override Dots.direction = #UP
164 dotsDown = \override Dots.direction = #DOWN
165 dotsNeutral = \revert Dots.direction
171 \override DynamicText.direction = #UP
172 \override DynamicLineSpanner.direction = #UP
175 \override DynamicText.direction = #DOWN
176 \override DynamicLineSpanner.direction = #DOWN
179 \revert DynamicText.direction
180 \revert DynamicLineSpanner.direction
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
193 \revert NoteHead.stencil
194 \revert NoteHead.font-size
195 \revert NoteHead.font-family
196 \revert NoteHead.font-series
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)))
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
221 glissando = #(make-music 'GlissandoEvent)
227 #(define-music-function () ()
228 (_i "Set the default note head style to a diamond-shaped style.")
230 (override-head-style '(NoteHead TabNoteHead) 'harmonic) 'Bottom))
231 harmonicsOff = \defaultNoteHeads
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))
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
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
265 \set squashedPosition = #0
266 \override NoteHead.style = #'slash
267 \override TabNoteHead.style = #'slash
268 \override Accidental.stencil = ##f
269 \override AccidentalCautionary.stencil = ##f
272 \unset squashedPosition
273 \revert NoteHead.style
274 \revert TabNoteHead.style
275 \revert Accidental.stencil
276 \revert AccidentalCautionary.stencil
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.")
286 \once \override Staff.InstrumentName.stencil =
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)
295 \new MensuralStaff \with {
296 \override InstrumentName.self-alignment-X = #align-x
297 \override InstrumentName.self-alignment-Y = #align-y
298 instrumentName = #instrument-name
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))
317 \remove "Default_bar_line_engraver"
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)))
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
345 \revert NoteHead.style
346 \revert Stem.X-offset
349 \revert Accidental.glyph-name-alist
354 \revert Beam.positions
355 \revert Beam.quantized-positions
356 \revert NoteHead.duration-log
359 %% line and page breaking controls
361 autoLineBreaksOff = {
362 \overrideProperty Score.NonMusicalPaperColumn.line-break-permission ##f
363 \override Score.NonMusicalPaperColumn.line-break-permission = ##f
366 \overrideProperty Score.NonMusicalPaperColumn.line-break-permission #'allow
367 \override Score.NonMusicalPaperColumn.line-break-permission = #'allow
370 \override Score.NonMusicalPaperColumn.page-break-permission = ##f
372 \override Score.NonMusicalPaperColumn.page-break-permission = #'allow
373 autoBreaksOff = { \autoLineBreaksOff \autoPageBreaksOff }
374 autoBreaksOn = { \autoLineBreaksOn \autoPageBreaksOn }
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
389 %% numeric time signature
391 numericTimeSignature = \override Staff.TimeSignature.style = #'numbered
392 defaultTimeSignature = \revert Staff.TimeSignature.style
398 #(define-music-function () ()
399 (_i "Set the default note head style to a triangle-shaped style.")
401 (override-head-style 'NoteHead 'do) 'Bottom))
402 palmMuteOff = \defaultNoteHeads
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))
411 #(define-music-function (type) ((symbol?))
412 (_i "Override the part-combiner.")
413 (if type (propertySet 'partCombineForced type)
414 (propertyUnset 'partCombineForced)))
416 partcombineApart = \partcombineForce #'apart
417 partcombineChords = \partcombineForce #'chords
418 partcombineUnisono = \partcombineForce #'unisono
419 partcombineSoloI = \partcombineForce #'solo1
420 partcombineSoloII = \partcombineForce #'solo2
421 partcombineAutomatic = \partcombineForce \default
427 phrasingSlurUp = \override PhrasingSlur.direction = #UP
428 phrasingSlurDown = \override PhrasingSlur.direction = #DOWN
429 phrasingSlurNeutral = \revert PhrasingSlur.direction
431 % dash-patterns (make-simple-dash-definition defined at top of file)
432 phrasingSlurDashPattern =
433 #(define-music-function (dash-fraction dash-period)
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.")
438 \override PhrasingSlur.dash-definition =
439 $(make-simple-dash-definition dash-fraction dash-period)
442 \override PhrasingSlur.dash-definition = #'((0 1 0.4 0.75))
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)
448 phrasingSlurHalfSolid =
449 \override PhrasingSlur.dash-definition = #'((0 0.5 1 1)
452 \revert PhrasingSlur.dash-definition
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))
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))
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))
475 %% predefined fretboards
477 predefinedFretboardsOff =
478 \set predefinedDiagramTable = ##f
479 predefinedFretboardsOn =
480 \set predefinedDiagramTable = #default-fret-table
485 aikenHeads = \set shapeNoteStyles = ##(do re miMirror fa sol la ti)
486 aikenHeadsMinor = \set shapeNoteStyles = ##(la ti do re miMirror fa sol)
488 \set shapeNoteStyles = ##(doFunk reFunk miFunk faFunk solFunk laFunk tiFunk)
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)
498 \set shapeNoteStyles = ##(doWalker reWalker miWalker faWalker solFunk laWalker tiWalker)
500 \set shapeNoteStyles = ##(laWalker tiWalker doWalker reWalker miWalker faWalker solFunk)
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
514 slurUp = \override Slur.direction = #UP
515 slurDown = \override Slur.direction = #DOWN
516 slurNeutral = \revert Slur.direction
518 % dash-patterns (make-simple-dash-definition defined at top of file)
520 #(define-music-function (dash-fraction dash-period)
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.")
525 \override Slur.dash-definition =
526 $(make-simple-dash-definition dash-fraction dash-period)
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)
532 slurHalfSolid = \override Slur.dash-definition = #'((0 0.5 1 1)
534 slurSolid = \revert Slur.dash-definition
539 showStaffSwitch = \set followVoice = ##t
540 hideStaffSwitch = \set followVoice = ##f
545 stemUp = \override Stem.direction = #UP
546 stemDown = \override Stem.direction = #DOWN
547 stemNeutral = \revert Stem.direction
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
558 arabicStringNumbers = {
559 \revert StringNumber.number-type
560 \revert StringNumber.stencil
561 \revert StringNumber.font-encoding
562 \revert StringNumber.font-shape
568 % switch to full notation
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
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
595 \revert TabStaff.TupletBracket.stencil
596 \revert TabStaff.TupletNumber.stencil
598 \revert TabStaff.DynamicText.stencil
599 \revert TabStaff.DynamicTextSpanner.stencil
600 \revert TabStaff.DynamicTextSpanner.stencil
601 \revert TabStaff.Hairpin.stencil
603 \revert TabStaff.Rest.stencil
604 \revert TabStaff.MultiMeasureRest.stencil
605 \revert TabStaff.MultiMeasureRestNumber.stencil
606 \revert TabStaff.MultiMeasureRestText.stencil
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
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
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
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)
640 \override TextScript.extra-spacing-width = #'(+inf.0 . -inf.0)
641 \override TextScript.extra-spacing-height = #'(0 . 0)
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)
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
661 textSpannerUp = \override TextSpanner.direction = #UP
662 textSpannerDown = \override TextSpanner.direction = #DOWN
663 textSpannerNeutral = \revert TextSpanner.direction
669 tieUp = \override Tie.direction = #UP
670 tieDown = \override Tie.direction = #DOWN
671 tieNeutral = \revert Tie.direction
673 % dash-patterns (make-simple-dash-definition defined at top of file)
675 #(define-music-function (dash-fraction dash-period)
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.")
680 \override Tie.dash-definition =
681 $(make-simple-dash-definition dash-fraction dash-period)
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)
687 tieHalfSolid = \override Tie.dash-definition = #'((0 0.5 1 1)
689 tieSolid = \revert Tie.dash-definition
694 tupletUp = \override TupletBracket.direction = #UP
695 tupletDown = \override TupletBracket.direction = #DOWN
696 tupletNeutral = \revert TupletBracket.direction
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)
712 \override NoteHead.style = #'diamond
713 \override NoteHead.color = #red
714 \override Stem.color = #red
715 \override Beam.color = #red
718 \override NoteHead.style = #'triangle
719 \override NoteHead.color = #blue
720 \override Stem.color = #blue
721 \override Beam.color = #blue
724 \override NoteHead.style = #'xcircle
725 \override NoteHead.color = #green
726 \override Stem.color = #green
727 \override Beam.color = #green
730 \override NoteHead.style = #'cross
731 \override NoteHead.color = #magenta
732 \override Stem.color = #magenta
733 \override Beam.color = #magenta
735 voiceNeutralStyle = {
736 \revert NoteHead.style
737 \revert NoteHead.color
746 #(define-void-function (bar) (string?)
747 (allow-volta-hook bar))
752 #(define-music-function () ()
753 (_i "Set the default note head style to a cross-shaped style.")
755 (override-head-style '(TabNoteHead NoteHead) 'cross) 'Bottom))
756 xNotesOff = \defaultNoteHeads
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))
763 %% dead notes (these need to come after "x notes")
765 % Define aliases of cross-head notes for specific purposes
766 deadNotesOn = \xNotesOn
767 deadNotesOff = \xNotesOff