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 \override Stem #'transparent = ##t
267 \override Flag #'transparent = ##t
268 \override Beam #'transparent = ##t
269 \override Accidental #'transparent = ##t
270 \override Rest #'transparent = ##t
271 \override TabNoteHead #'transparent = ##t
274 \revert Accidental #'transparent
275 \revert Beam #'transparent
276 \revert Stem #'transparent
277 \revert Flag #'transparent
278 \revert NoteHead #'transparent
279 \revert NoteHead #'no-ledgers
280 \revert Dots #'transparent
281 \revert Rest #'transparent
282 \revert TabNoteHead #'transparent
289 \set squashedPosition = #0
290 \override NoteHead #'style = #'slash
291 \override Accidental #'stencil = ##f
292 \override AccidentalCautionary #'stencil = ##f
295 \unset squashedPosition
296 \revert NoteHead #'style
297 \revert Accidental #'stencil
298 \revert AccidentalCautionary #'stencil
304 mergeDifferentlyDottedOn =
305 \override Staff.NoteCollision #'merge-differently-dotted = ##t
306 mergeDifferentlyDottedOff =
307 \revert Staff.NoteCollision #'merge-differently-dotted
308 mergeDifferentlyHeadedOn =
309 \override Staff.NoteCollision #'merge-differently-headed = ##t
310 mergeDifferentlyHeadedOff =
311 \revert Staff.NoteCollision #'merge-differently-headed
314 %% numeric time signature
316 numericTimeSignature = \override Staff.TimeSignature #'style = #'numbered
317 defaultTimeSignature = \revert Staff.TimeSignature #'style
323 #(define-music-function (parser location) ()
324 (_i "Set the default note head style to a triangle-shaped style.")
325 (override-head-style 'NoteHead 'do))
326 palmMuteOff = \defaultNoteHeads
328 #(define-music-function (parser location note) (ly:music?)
329 (_i "Print @var{note} with a triangle-shaped note head.")
330 (style-note-heads 'NoteHead 'do note))
336 phrasingSlurUp = \override PhrasingSlur #'direction = #UP
337 phrasingSlurDown = \override PhrasingSlur #'direction = #DOWN
338 phrasingSlurNeutral = \revert PhrasingSlur #'direction
340 % dash-patterns (make-simple-dash-definition defined at top of file)
341 phrasingSlurDashPattern =
342 #(define-music-function (parser location dash-fraction dash-period)
344 (_i "Set up a custom style of dash pattern for @var{dash-fraction} ratio of
345 line to space repeated at @var{dash-period} interval for phrasing slurs.")
347 \override PhrasingSlur #'dash-definition =
348 $(make-simple-dash-definition dash-fraction dash-period)
351 \override PhrasingSlur #'dash-definition = #'((0 1 0.4 0.75))
353 \override PhrasingSlur #'dash-definition = #'((0 1 0.1 0.75))
354 phrasingSlurHalfDashed =
355 \override PhrasingSlur #'dash-definition = #'((0 0.5 0.4 0.75)
357 phrasingSlurHalfSolid =
358 \override PhrasingSlur #'dash-definition = #'((0 0.5 1 1)
361 \revert PhrasingSlur #'dash-definition
367 #(define-music-function (parser location) ()
368 (_i "Enable generation of code in final-format (e.g. pdf) files to reference the
369 originating lilypond source statement;
370 this is helpful when developing a score but generates bigger final-format files.")
371 (ly:set-option 'point-and-click #t)
372 (make-music 'SequentialMusic 'void #t))
375 #(define-music-function (parser location) ()
376 (_i "Suppress generating extra code in final-format (e.g. pdf) files to point
377 back to the lilypond source statement.")
378 (ly:set-option 'point-and-click #f)
379 (make-music 'SequentialMusic 'void #t))
382 #(define-void-function (parser location types) (symbol-list-or-symbol?)
383 (_i "Set a type or list of types (such as @code{#'note-event}) for which point-and-click info is generated.")
384 (ly:set-option 'point-and-click types))
386 %% predefined fretboards
388 predefinedFretboardsOff =
389 \set predefinedDiagramTable = ##f
390 predefinedFretboardsOn =
391 \set predefinedDiagramTable = #default-fret-table
396 aikenHeads = \set shapeNoteStyles = #'#(do re miMirror fa sol la ti)
397 aikenHeadsMinor = \set shapeNoteStyles = #'#(la ti do re miMirror fa sol)
399 \set shapeNoteStyles = #'#(doFunk reFunk miFunk faFunk solFunk laFunk tiFunk)
401 \set shapeNoteStyles = #'#(laFunk tiFunk doFunk reFunk miFunk faFunk solFunk)
402 sacredHarpHeads = \set shapeNoteStyles = #'#(fa sol la fa sol la mi)
403 sacredHarpHeadsMinor = \set shapeNoteStyles = #'#(la mi fa sol la fa sol)
404 southernHarmonyHeads =
405 \set shapeNoteStyles = #'#(faThin sol laThin faThin sol laThin miThin)
406 southernHarmonyHeadsMinor =
407 \set shapeNoteStyles = #'#(laThin miThin faThin sol laThin faThin sol)
409 \set shapeNoteStyles = #'#(doWalker reWalker miWalker faWalker solFunk laWalker tiWalker)
411 \set shapeNoteStyles = #'#(laWalker tiWalker doWalker reWalker miWalker faWalker solFunk)
416 shiftOn = \override NoteColumn #'horizontal-shift = #1
417 shiftOnn = \override NoteColumn #'horizontal-shift = #2
418 shiftOnnn = \override NoteColumn #'horizontal-shift = #3
419 shiftOff = \revert NoteColumn #'horizontal-shift
425 slurUp = \override Slur #'direction = #UP
426 slurDown = \override Slur #'direction = #DOWN
427 slurNeutral = \revert Slur #'direction
429 % dash-patterns (make-simple-dash-definition defined at top of file)
431 #(define-music-function (parser location dash-fraction dash-period)
433 (_i "Set up a custom style of dash pattern for @var{dash-fraction}
434 ratio of line to space repeated at @var{dash-period} interval for slurs.")
436 \override Slur #'dash-definition =
437 $(make-simple-dash-definition dash-fraction dash-period)
439 slurDashed = \override Slur #'dash-definition = #'((0 1 0.4 0.75))
440 slurDotted = \override Slur #'dash-definition = #'((0 1 0.1 0.75))
441 slurHalfDashed = \override Slur #'dash-definition = #'((0 0.5 0.4 0.75)
443 slurHalfSolid = \override Slur #'dash-definition = #'((0 0.5 1 1)
445 slurSolid = \revert Slur #'dash-definition
450 showStaffSwitch = \set followVoice = ##t
451 hideStaffSwitch = \set followVoice = ##f
456 stemUp = \override Stem #'direction = #UP
457 stemDown = \override Stem #'direction = #DOWN
458 stemNeutral = \revert Stem #'direction
463 % switch to full notation
466 \revert TabStaff.TimeSignature #'stencil
467 % stems (the half note gets a double stem)
468 \revert TabVoice.Stem #'length
469 \revert TabVoice.Stem #'no-stem-extend
470 \revert TabVoice.Flag #'style
471 \revert TabVoice.Stem #'details
472 \revert TabVoice.Stem #'stencil
473 \revert TabVoice.Flag #'stencil
474 \override TabVoice.Stem #'stencil = #tabvoice::draw-double-stem-for-half-notes
475 \override TabVoice.Stem #'X-extent = #tabvoice::make-double-stem-width-for-half-notes
476 \set TabVoice.autoBeaming = ##t
477 \revert TabVoice.NoteColumn #'ignore-collision
479 \revert TabVoice.Beam #'stencil
480 \revert TabVoice.StemTremolo #'stencil
481 \revert TabVoice.Dots #'stencil
482 \revert TabVoice.Tie #'stencil
483 \revert TabVoice.Tie #'after-line-breaking
484 \revert TabVoice.RepeatTie #'stencil
485 \revert TabVoice.RepeatTie #'after-line-breaking
486 \revert TabVoice.LaissezVibrerTie #'stencil
487 \revert TabVoice.Slur #'stencil
488 \revert TabVoice.PhrasingSlur #'stencil
490 \revert TabVoice.TupletBracket #'stencil
491 \revert TabVoice.TupletNumber #'stencil
493 \revert TabVoice.DynamicText #'stencil
494 \revert TabVoice.DynamicTextSpanner #'stencil
495 \revert TabVoice.DynamicTextSpanner #'stencil
496 \revert TabVoice.Hairpin #'stencil
498 \revert TabVoice.Rest #'stencil
499 \revert TabVoice.MultiMeasureRest #'stencil
500 \revert TabVoice.MultiMeasureRestNumber #'stencil
501 \revert TabVoice.MultiMeasureRestText #'stencil
503 \revert TabVoice.Glissando #'stencil
504 \revert TabVoice.Script #'stencil
505 \revert TabVoice.TextScript #'stencil
506 \revert TabVoice.TextSpanner #'stencil
507 \revert TabStaff.Arpeggio #'stencil
508 \revert TabStaff.NoteColumn #'ignore-collision
511 %tie/repeat tie behaviour
512 hideSplitTiedTabNotes = {
513 \override TabVoice.TabNoteHead #'(details tied-properties break-visibility) = #all-invisible
514 \override TabVoice.TabNoteHead #'(details tied-properties parenthesize) = ##f
515 \override TabVoice.TabNoteHead #'(details repeat-tied-properties note-head-visible) = ##f
516 \override TabVoice.TabNoteHead #'(details repeat-tied-properties parenthesize) = ##f
519 showSplitTiedTabNotes = {
520 \override TabVoice.TabNoteHead #'(details tied-properties break-visibility) = #begin-of-line-visible
521 \override TabVoice.TabNoteHead #'(details tied-properties parenthesize) = ##t
522 \override TabVoice.TabNoteHead #'(details repeat-tied-properties note-head-visible) = ##t
523 \override TabVoice.TabNoteHead #'(details repeat-tied-properties parenthesize) = ##t
529 \override TextScript #'extra-spacing-width = #'(0 . 0)
530 \override TextScript #'extra-spacing-height = #'(-inf.0 . +inf.0)
533 \override TextScript #'extra-spacing-width = #'(+inf.0 . -inf.0)
534 \override TextScript #'extra-spacing-height = #'(0 . 0)
540 textSpannerUp = \override TextSpanner #'direction = #UP
541 textSpannerDown = \override TextSpanner #'direction = #DOWN
542 textSpannerNeutral = \revert TextSpanner #'direction
548 tieUp = \override Tie #'direction = #UP
549 tieDown = \override Tie #'direction = #DOWN
550 tieNeutral = \revert Tie #'direction
552 % dash-patterns (make-simple-dash-definition defined at top of file)
554 #(define-music-function (parser location dash-fraction dash-period)
556 (_i "Set up a custom style of dash pattern for @var{dash-fraction}
557 ratio of line to space repeated at @var{dash-period} interval for ties.")
559 \override Tie #'dash-definition =
560 $(make-simple-dash-definition dash-fraction dash-period)
562 tieDashed = \override Tie #'dash-definition = #'((0 1 0.4 0.75))
563 tieDotted = \override Tie #'dash-definition = #'((0 1 0.1 0.75))
564 tieHalfDashed = \override Tie #'dash-definition = #'((0 0.5 0.4 0.75)
566 tieHalfSolid = \override Tie #'dash-definition = #'((0 0.5 1 1)
568 tieSolid = \revert Tie #'dash-definition
573 tupletUp = \override TupletBracket #'direction = #UP
574 tupletDown = \override TupletBracket #'direction = #DOWN
575 tupletNeutral = \revert TupletBracket #'direction
580 % dynamic ly:dir? text script, articulation script ly:dir?
581 voiceOne = #(context-spec-music (make-voice-props-set 0) 'Voice)
582 voiceTwo = #(context-spec-music (make-voice-props-set 1) 'Voice)
583 voiceThree = #(context-spec-music (make-voice-props-set 2) 'Voice)
584 voiceFour = #(context-spec-music (make-voice-props-set 3) 'Voice)
585 oneVoice = #(context-spec-music (make-voice-props-revert) 'Voice)
591 \override NoteHead #'style = #'diamond
592 \override NoteHead #'color = #red
593 \override Stem #'color = #red
594 \override Flag #'color = #red
595 \override Beam #'color = #red
598 \override NoteHead #'style = #'triangle
599 \override NoteHead #'color = #blue
600 \override Stem #'color = #blue
601 \override Flag #'color = #blue
602 \override Beam #'color = #blue
605 \override NoteHead #'style = #'xcircle
606 \override NoteHead #'color = #green
607 \override Stem #'color = #green
608 \override Flag #'color = #green
609 \override Beam #'color = #green
612 \override NoteHead #'style = #'cross
613 \override NoteHead #'color = #magenta
614 \override Stem #'color = #magenta
615 \override Flag #'color = #magenta
616 \override Beam #'color = #magenta
618 voiceNeutralStyle = {
619 \revert NoteHead #'style
620 \revert NoteHead #'color
630 #(define-void-function (parser location bar) (string?)
631 (allow-volta-hook bar))
636 #(define-music-function (parser location) ()
637 (_i "Set the default note head style to a cross-shaped style.")
638 (override-head-style '(TabNoteHead NoteHead) 'cross))
639 xNotesOff = \defaultNoteHeads
641 #(define-music-function (parser location note) (ly:music?)
642 (_i "Print @var{note} with a cross-shaped note head.")
643 (style-note-heads '(TabNoteHead NoteHead) 'cross note))
646 %% dead notes (these need to come after "x notes")
648 % Define aliases of cross-head notes for specific purposes
649 deadNotesOn = \xNotesOn
650 deadNotesOff = \xNotesOff