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)))
20 % For drawing vertical chord brackets with \arpeggio
21 % This is a shorthand for the value of the print-function property
22 % of either Staff.Arpeggio or PianoStaff.Arpeggio, depending whether
23 % cross-staff brackets are desired.
25 arpeggio = #(make-music 'ArpeggioEvent)
27 \revert Arpeggio #'stencil
28 \revert Arpeggio #'X-extent
29 \override Arpeggio #'arpeggio-direction = #UP
32 \revert Arpeggio #'stencil
33 \revert Arpeggio #'X-extent
34 \override Arpeggio #'arpeggio-direction = #DOWN
37 \revert Arpeggio #'stencil
38 \revert Arpeggio #'X-extent
39 \revert Arpeggio #'arpeggio-direction
40 \revert Arpeggio #'dash-definition
43 \revert Arpeggio #'X-extent
44 \override Arpeggio #'stencil = #ly:arpeggio::brew-chord-bracket
46 arpeggioParenthesis = {
47 \override Arpeggio #'stencil = #ly:arpeggio::brew-chord-slur
48 \override Arpeggio #'X-extent = #ly:grob::stencil-width
49 \revert Arpeggio #'dash-definition
51 arpeggioParenthesisDashed = {
52 \override Arpeggio #'stencil = #ly:arpeggio::brew-chord-slur
53 \override Arpeggio #'X-extent = #ly:grob::stencil-width
54 \override Arpeggio #'dash-definition = #'((0 1 0.4 0.75))
60 autoBeamOn = \set autoBeaming = ##t
61 autoBeamOff = \set autoBeaming = ##f
67 \override BalloonTextItem #'extra-spacing-width = #'(0 . 0)
68 \override BalloonTextItem #'extra-spacing-height = #'(-inf.0 . +inf.0)
71 \override BalloonTextItem #'extra-spacing-width = #'(+inf.0 . -inf.0)
72 \override BalloonTextItem #'extra-spacing-height = #'(0 . 0)
78 bassFigureExtendersOn = {
79 \set useBassFigureExtenders = ##t
80 \set Staff.useBassFigureExtenders = ##t
82 bassFigureExtendersOff = {
83 \set useBassFigureExtenders = ##f
84 \set Staff.useBassFigureExtenders = ##f
86 bassFigureStaffAlignmentDown =
87 \override Staff.BassFigureAlignmentPositioning #'direction = #DOWN
88 bassFigureStaffAlignmentUp =
89 \override Staff.BassFigureAlignmentPositioning #'direction = #UP
90 bassFigureStaffAlignmentNeutral =
91 \revert Staff.BassFigureAlignmentPositioning #'direction
97 \set Timing.timing = ##f
98 \set Timing.autoBeaming = ##f
102 \set Timing.timing = ##t
103 \set Timing.measurePosition = #ZERO-MOMENT
104 \set Timing.autoBeaming = ##t
111 \set chordRootNamer = #(chord-name->italian-markup #t)
112 \set chordPrefixSpacer = #0.4
115 \set chordRootNamer = #(chord-name->german-markup #t)
116 \set chordNoteNamer = #note-name->german-markup
119 \set chordRootNamer = #(chord-name->german-markup #f)
120 \set chordNoteNamer = #note-name->german-markup
123 \set chordRootNamer = #(chord-name->italian-markup #f)
124 \set chordPrefixSpacer = #0.4
127 \set chordNameExceptions = #powerChordExceptions
131 %% compressFullBarRests
133 compressFullBarRests = \set Score.skipBars = ##t
134 expandFullBarRests = \set Score.skipBars = ##f
139 dotsUp = \override Dots #'direction = #UP
140 dotsDown = \override Dots #'direction = #DOWN
141 dotsNeutral = \revert Dots #'direction
147 \override DynamicText #'direction = #UP
148 \override DynamicLineSpanner #'direction = #UP
151 \override DynamicText #'direction = #DOWN
152 \override DynamicLineSpanner #'direction = #DOWN
155 \revert DynamicText #'direction
156 \revert DynamicLineSpanner #'direction
163 \override NoteHead #'stencil = #note-head::brew-ez-stencil
164 \override NoteHead #'font-size = #-8
165 \override NoteHead #'font-family = #'sans
166 \override NoteHead #'font-series = #'bold
169 \revert NoteHead #'stencil
170 \revert NoteHead #'font-size
171 \revert NoteHead #'font-family
172 \revert NoteHead #'font-series
178 %% End the incipit and print a ``normal line start''.
179 endincipit = \context Staff {
180 \partial 16 s16 % Hack to handle e.g. \bar ".|" \endincipit
181 \once \override Staff.Clef #'full-size-change = ##t
182 \once \override Staff.Clef #'non-default = ##t
190 #(make-music 'MultiMeasureTextEvent
192 ;; Set the 'text based on the 'direction
193 (cons 'text (lambda (grob)
194 (if (eq? (ly:grob-property grob 'direction) DOWN)
195 (markup #:musicglyph "scripts.dfermata")
196 (markup #:musicglyph "scripts.ufermata"))))
197 (cons 'outside-staff-priority 40)
198 (cons 'outside-staff-padding 0)))
202 teeny = \set fontSize = #-3
203 tiny = \set fontSize = #-2
204 small = \set fontSize = #-1
205 normalsize = \set fontSize = #0
206 large = \set fontSize = #1
207 huge = \set fontSize = #2
212 glissando = #(make-music 'GlissandoEvent)
218 #(define-music-function (parser location) ()
219 (_i "Set the default note head style to a diamond-shaped style.")
220 (override-head-style '(NoteHead TabNoteHead) 'harmonic))
221 harmonicsOff = \defaultNoteHeads
223 #(define-music-function (parser location note) (ly:music?)
224 (_i "Print @var{note} with a diamond-shaped note head.")
225 (style-note-heads 'NoteHead 'harmonic note))
231 % hide notes, accidentals, etc.
232 \override Dots #'transparent = ##t
233 \override NoteHead #'transparent = ##t
234 \override NoteHead #'no-ledgers = ##t
235 \override Stem #'transparent = ##t
236 \override Flag #'transparent = ##t
237 \override Beam #'transparent = ##t
238 \override Accidental #'transparent = ##t
241 \revert Accidental #'transparent
242 \revert Beam #'transparent
243 \revert Stem #'transparent
244 \revert Flag #'transparent
245 \revert NoteHead #'transparent
246 \revert NoteHead #'no-ledgers
247 \revert Dots #'transparent
254 \set squashedPosition = #0
255 \override NoteHead #'style = #'slash
256 \override Accidental #'stencil = ##f
257 \override AccidentalCautionary #'stencil = ##f
260 \unset squashedPosition
261 \revert NoteHead #'style
262 \revert Accidental #'stencil
263 \revert AccidentalCautionary #'stencil
269 mergeDifferentlyDottedOn =
270 \override Staff.NoteCollision #'merge-differently-dotted = ##t
271 mergeDifferentlyDottedOff =
272 \revert Staff.NoteCollision #'merge-differently-dotted
273 mergeDifferentlyHeadedOn =
274 \override Staff.NoteCollision #'merge-differently-headed = ##t
275 mergeDifferentlyHeadedOff =
276 \revert Staff.NoteCollision #'merge-differently-headed
279 %% numeric time signature
281 numericTimeSignature = \override Staff.TimeSignature #'style = #'numbered
282 defaultTimeSignature = \revert Staff.TimeSignature #'style
288 #(define-music-function (parser location) ()
289 (_i "Set the default note head style to a triangle-shaped style.")
290 (override-head-style 'NoteHead 'do))
291 palmMuteOff = \defaultNoteHeads
293 #(define-music-function (parser location note) (ly:music?)
294 (_i "Print @var{note} with a triangle-shaped note head.")
295 (style-note-heads 'NoteHead 'do note))
301 phrasingSlurUp = \override PhrasingSlur #'direction = #UP
302 phrasingSlurDown = \override PhrasingSlur #'direction = #DOWN
303 phrasingSlurNeutral = \revert PhrasingSlur #'direction
305 % dash-patterns (make-simple-dash-definition defined at top of file)
306 phrasingSlurDashPattern =
307 #(define-music-function (parser location dash-fraction dash-period)
309 (_i "Set up a custom style of dash pattern for @var{dash-fraction} ratio of
310 line to space repeated at @var{dash-period} interval for phrasing slurs.")
312 \override PhrasingSlur #'dash-definition =
313 $(make-simple-dash-definition dash-fraction dash-period)
316 \override PhrasingSlur #'dash-definition = #'((0 1 0.4 0.75))
318 \override PhrasingSlur #'dash-definition = #'((0 1 0.1 0.75))
319 phrasingSlurHalfDashed =
320 \override PhrasingSlur #'dash-definition = #'((0 0.5 0.4 0.75)
322 phrasingSlurHalfSolid =
323 \override PhrasingSlur #'dash-definition = #'((0 0.5 1 1)
326 \revert PhrasingSlur #'dash-definition
332 #(define-music-function (parser location) ()
333 (_i "Enable generation of code in final-format (e.g. pdf) files to reference the
334 originating lilypond source statement;
335 this is helpful when developing a score but generates bigger final-format files.")
336 (ly:set-option 'point-and-click #t)
337 (make-music 'SequentialMusic 'void #t))
340 #(define-music-function (parser location) ()
341 (_i "Suppress generating extra code in final-format (e.g. pdf) files to point
342 back to the lilypond source statement.")
343 (ly:set-option 'point-and-click #f)
344 (make-music 'SequentialMusic 'void #t))
347 %% predefined fretboards
349 predefinedFretboardsOff =
350 \set predefinedDiagramTable = ##f
351 predefinedFretboardsOn =
352 \set predefinedDiagramTable = #default-fret-table
357 aikenHeads = \set shapeNoteStyles = #'#(do re miMirror fa sol la ti)
358 aikenHeadsMinor = \set shapeNoteStyles = #'#(la ti do re miMirror fa sol)
360 \set shapeNoteStyles = #'#(doFunk reFunk miFunk faFunk solFunk laFunk tiFunk)
362 \set shapeNoteStyles = #'#(laFunk tiFunk doFunk reFunk miFunk faFunk solFunk)
363 sacredHarpHeads = \set shapeNoteStyles = #'#(fa sol la fa sol la mi)
364 sacredHarpHeadsMinor = \set shapeNoteStyles = #'#(la mi fa sol la fa sol)
365 southernHarmonyHeads =
366 \set shapeNoteStyles = #'#(faThin sol laThin faThin sol laThin miThin)
367 southernHarmonyHeadsMinor =
368 \set shapeNoteStyles = #'#(laThin miThin faThin sol laThin faThin sol)
370 \set shapeNoteStyles = #'#(doWalker reWalker miWalker faWalker solFunk laWalker tiWalker)
372 \set shapeNoteStyles = #'#(laWalker tiWalker doWalker reWalker miWalker faWalker solFunk)
377 shiftOn = \override NoteColumn #'horizontal-shift = #1
378 shiftOnn = \override NoteColumn #'horizontal-shift = #2
379 shiftOnnn = \override NoteColumn #'horizontal-shift = #3
380 shiftOff = \revert NoteColumn #'horizontal-shift
386 slurUp = \override Slur #'direction = #UP
387 slurDown = \override Slur #'direction = #DOWN
388 slurNeutral = \revert Slur #'direction
390 % dash-patterns (make-simple-dash-definition defined at top of file)
392 #(define-music-function (parser location dash-fraction dash-period)
394 (_i "Set up a custom style of dash pattern for @var{dash-fraction}
395 ratio of line to space repeated at @var{dash-period} interval for slurs.")
397 \override Slur #'dash-definition =
398 $(make-simple-dash-definition dash-fraction dash-period)
400 slurDashed = \override Slur #'dash-definition = #'((0 1 0.4 0.75))
401 slurDotted = \override Slur #'dash-definition = #'((0 1 0.1 0.75))
402 slurHalfDashed = \override Slur #'dash-definition = #'((0 0.5 0.4 0.75)
404 slurHalfSolid = \override Slur #'dash-definition = #'((0 0.5 1 1)
406 slurSolid = \revert Slur #'dash-definition
411 showStaffSwitch = \set followVoice = ##t
412 hideStaffSwitch = \set followVoice = ##f
417 stemUp = \override Stem #'direction = #UP
418 stemDown = \override Stem #'direction = #DOWN
419 stemNeutral = \revert Stem #'direction
424 % switch to full notation
427 \revert TabStaff.TimeSignature #'stencil
428 % stems (the half note gets a double stem)
429 \revert TabVoice.Stem #'length
430 \revert TabVoice.Stem #'no-stem-extend
431 \revert TabVoice.Flag #'style
432 \revert TabVoice.Stem #'details
433 \revert TabVoice.Stem #'transparent
434 \override TabVoice.Stem #'stencil = #tabvoice::draw-double-stem-for-half-notes
435 \set autoBeaming = ##t
436 \revert NoteColumn #'ignore-collision
438 \revert TabVoice.Beam #'stencil
439 \revert TabVoice.StemTremolo #'stencil
440 \revert TabVoice.Dots #'stencil
441 \revert TabVoice.Tie #'stencil
442 \revert TabVoice.Tie #'after-line-breaking
443 \revert TabVoice.RepeatTie #'stencil
444 \revert TabVoice.RepeatTie #'after-line-breaking
445 \revert TabVoice.LaissezVibrerTie #'stencil
446 \revert TabVoice.Slur #'stencil
447 \revert TabVoice.PhrasingSlur #'stencil
449 \revert TabVoice.TupletBracket #'stencil
450 \revert TabVoice.TupletNumber #'stencil
452 \revert TabVoice.DynamicText #'transparent
453 \revert TabVoice.DynamicTextSpanner #'stencil
454 \revert TabVoice.DynamicTextSpanner #'stencil
455 \revert TabVoice.Hairpin #'transparent
457 \revert TabVoice.Rest #'stencil
458 \revert TabVoice.MultiMeasureRest #'stencil
459 \revert TabVoice.MultiMeasureRestNumber #'transparent
460 \revert TabVoice.MultiMeasureRestText #'transparent
462 \revert TabVoice.Glissando #'stencil
463 \revert TabVoice.Script #'stencil
464 \revert TabVoice.TextScript #'stencil
465 \revert TabVoice.TextSpanner #'stencil
466 \revert TabStaff.Arpeggio #'stencil
467 \revert TabStaff.NoteColumn #'ignore-collision
470 %tie/repeat tie behaviour
471 hideSplitTiedTabNotes = {
472 \override TabVoice.TabNoteHead #'(details tied-properties break-visibility) = #all-invisible
473 \override TabVoice.TabNoteHead #'(details tied-properties parenthesize) = ##f
474 \override TabVoice.TabNoteHead #'(details repeat-tied-properties note-head-visible) = ##f
475 \override TabVoice.TabNoteHead #'(details repeat-tied-properties parenthesize) = ##f
478 showSplitTiedTabNotes = {
479 \override TabVoice.TabNoteHead #'(details tied-properties break-visibility) = #begin-of-line-visible
480 \override TabVoice.TabNoteHead #'(details tied-properties parenthesize) = ##t
481 \override TabVoice.TabNoteHead #'(details repeat-tied-properties note-head-visible) = ##t
482 \override TabVoice.TabNoteHead #'(details repeat-tied-properties parenthesize) = ##t
488 \override TextScript #'extra-spacing-width = #'(0 . 0)
489 \override TextScript #'extra-spacing-height = #'(-inf.0 . +inf.0)
492 \override TextScript #'extra-spacing-width = #'(+inf.0 . -inf.0)
493 \override TextScript #'extra-spacing-height = #'(0 . 0)
499 textSpannerUp = \override TextSpanner #'direction = #UP
500 textSpannerDown = \override TextSpanner #'direction = #DOWN
501 textSpannerNeutral = \revert TextSpanner #'direction
507 tieUp = \override Tie #'direction = #UP
508 tieDown = \override Tie #'direction = #DOWN
509 tieNeutral = \revert Tie #'direction
511 % dash-patterns (make-simple-dash-definition defined at top of file)
513 #(define-music-function (parser location dash-fraction dash-period)
515 (_i "Set up a custom style of dash pattern for @var{dash-fraction}
516 ratio of line to space repeated at @var{dash-period} interval for ties.")
518 \override Tie #'dash-definition =
519 $(make-simple-dash-definition dash-fraction dash-period)
521 tieDashed = \override Tie #'dash-definition = #'((0 1 0.4 0.75))
522 tieDotted = \override Tie #'dash-definition = #'((0 1 0.1 0.75))
523 tieHalfDashed = \override Tie #'dash-definition = #'((0 0.5 0.4 0.75)
525 tieHalfSolid = \override Tie #'dash-definition = #'((0 0.5 1 1)
527 tieSolid = \revert Tie #'dash-definition
532 tupletUp = \override TupletBracket #'direction = #UP
533 tupletDown = \override TupletBracket #'direction = #DOWN
534 tupletNeutral = \revert TupletBracket #'direction
539 % dynamic ly:dir? text script, articulation script ly:dir?
540 voiceOne = #(context-spec-music (make-voice-props-set 0) 'Voice)
541 voiceTwo = #(context-spec-music (make-voice-props-set 1) 'Voice)
542 voiceThree = #(context-spec-music (make-voice-props-set 2) 'Voice)
543 voiceFour = #(context-spec-music (make-voice-props-set 3) 'Voice)
544 oneVoice = #(context-spec-music (make-voice-props-revert) 'Voice)
550 \override NoteHead #'style = #'diamond
551 \override NoteHead #'color = #red
552 \override Stem #'color = #red
553 \override Flag #'color = #red
554 \override Beam #'color = #red
557 \override NoteHead #'style = #'triangle
558 \override NoteHead #'color = #blue
559 \override Stem #'color = #blue
560 \override Flag #'color = #blue
561 \override Beam #'color = #blue
564 \override NoteHead #'style = #'xcircle
565 \override NoteHead #'color = #green
566 \override Stem #'color = #green
567 \override Flag #'color = #green
568 \override Beam #'color = #green
571 \override NoteHead #'style = #'cross
572 \override NoteHead #'color = #magenta
573 \override Stem #'color = #magenta
574 \override Flag #'color = #magenta
575 \override Beam #'color = #magenta
577 voiceNeutralStyle = {
578 \revert NoteHead #'style
579 \revert NoteHead #'color
589 #(define-music-function (parser location) ()
590 (_i "Set the default note head style to a cross-shaped style.")
591 (override-head-style '(TabNoteHead NoteHead) 'cross))
592 xNotesOff = \defaultNoteHeads
594 #(define-music-function (parser location note) (ly:music?)
595 (_i "Print @var{note} with a cross-shaped note head.")
596 (style-note-heads '(TabNoteHead NoteHead) 'cross note))
599 %% dead notes (these need to come after "x notes")
601 % Define aliases of cross-head notes for specific purposes
602 deadNotesOn = \xNotesOn
603 deadNotesOff = \xNotesOff