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
96 cadenzaOn
= \set Timing
.timing
= ##f
98 \set Timing
.timing
= ##t
99 \set Timing
.measurePosition
= #ZERO-MOMENT
106 \set chordRootNamer
= #(chord-name-
>italian-markup
#t
)
107 \set chordPrefixSpacer
= #0.4
110 \set chordRootNamer
= #(chord-name-
>german-markup
#t
)
111 \set chordNoteNamer
= #note-name-
>german-markup
114 \set chordRootNamer
= #(chord-name-
>german-markup
#f)
115 \set chordNoteNamer
= #note-name-
>german-markup
118 \set chordRootNamer
= #(chord-name-
>italian-markup
#f)
119 \set chordPrefixSpacer
= #0.4
123 %% compressFullBarRests
125 compressFullBarRests
= \set Score
.skipBars
= ##t
126 expandFullBarRests
= \set Score
.skipBars
= ##f
131 dotsUp
= \override Dots
#'direction
= #UP
132 dotsDown
= \override Dots
#'direction
= #DOWN
133 dotsNeutral
= \revert Dots
#'direction
139 \override DynamicText
#'direction
= #UP
140 \override DynamicLineSpanner
#'direction
= #UP
143 \override DynamicText
#'direction
= #DOWN
144 \override DynamicLineSpanner
#'direction
= #DOWN
147 \revert DynamicText
#'direction
148 \revert DynamicLineSpanner
#'direction
155 \override NoteHead
#'stencil
= #note-head
::brew-ez-stencil
156 \override NoteHead
#'font-size
= #-
8
157 \override NoteHead
#'font-family
= #'sans
158 \override NoteHead
#'font-series
= #'bold
161 \revert NoteHead
#'stencil
162 \revert NoteHead
#'font-size
163 \revert NoteHead
#'font-family
164 \revert NoteHead
#'font-series
170 %% End the incipit and print a ``normal line start''.
171 endincipit
= \context Staff
{
172 \partial 16 s16 % Hack to handle e.g. \bar ".|" \endincipit
173 \once \override Staff
.Clef
#'full-size-change
= ##t
174 \once \override Staff
.Clef
#'non-default
= ##t
182 #(make-music
'MultiMeasureTextEvent
184 ;; Set the
'text based on the
'direction
185 (cons
'text
(lambda
(grob
)
186 (if
(eq?
(ly
:grob-property grob
'direction
) DOWN
)
187 (markup
#:musicglyph
"scripts.dfermata")
188 (markup
#:musicglyph
"scripts.ufermata"))))
189 (cons
'outside-staff-priority
40)
190 (cons
'outside-staff-padding
0)))
194 teeny
= \set fontSize
= #-
3
195 tiny
= \set fontSize
= #-
2
196 small
= \set fontSize
= #-
1
197 normalsize
= \set fontSize
= #0
198 large
= \set fontSize
= #1
199 huge
= \set fontSize
= #2
204 glissando
= #(make-music
'GlissandoEvent
)
210 #(define-music-function
(parser location
) ()
211 (_i
"Set the default note head style to a diamond-shaped style.")
212 (override-head-style
'NoteHead
'harmonic
))
213 harmonicsOff
= \defaultNoteHeads
215 #(define-music-function
(parser location note
) (ly
:music?
)
216 (_i
"Print @var{note} with a diamond-shaped note head.")
217 (style-note-heads
'NoteHead
'harmonic note
))
223 % hide notes, accidentals, etc.
224 \override Dots
#'transparent
= ##t
225 \override NoteHead
#'transparent
= ##t
226 \override NoteHead
#'no-ledgers
= ##t
227 \override Stem
#'transparent
= ##t
228 \override Beam
#'transparent
= ##t
229 \override Accidental
#'transparent
= ##t
232 \revert Accidental
#'transparent
233 \revert Beam
#'transparent
234 \revert Stem
#'transparent
235 \revert NoteHead
#'transparent
236 \revert NoteHead
#'no-ledgers
237 \revert Dots
#'transparent
244 \set squashedPosition
= #0
245 \override NoteHead
#'style
= #'slash
246 \override Accidental
#'stencil
= ##f
249 \unset squashedPosition
250 \revert NoteHead
#'style
251 \revert Accidental
#'stencil
257 mergeDifferentlyDottedOn
=
258 \override Staff
.NoteCollision
#'merge-differently-dotted
= ##t
259 mergeDifferentlyDottedOff
=
260 \revert Staff
.NoteCollision
#'merge-differently-dotted
261 mergeDifferentlyHeadedOn
=
262 \override Staff
.NoteCollision
#'merge-differently-headed
= ##t
263 mergeDifferentlyHeadedOff
=
264 \revert Staff
.NoteCollision
#'merge-differently-headed
267 %% numeric time signature
269 numericTimeSignature
= \override Staff
.TimeSignature
#'style
= #'numbered
270 defaultTimeSignature
= \revert Staff
.TimeSignature
#'style
276 #(define-music-function
(parser location
) ()
277 (_i
"Set the default note head style to a triangle-shaped style.")
278 (override-head-style
'NoteHead
'do
))
279 palmMuteOff
= \defaultNoteHeads
281 #(define-music-function
(parser location note
) (ly
:music?
)
282 (_i
"Print @var{note} with a triangle-shaped note head.")
283 (style-note-heads
'NoteHead
'do note
))
289 phrasingSlurUp
= \override PhrasingSlur
#'direction
= #UP
290 phrasingSlurDown
= \override PhrasingSlur
#'direction
= #DOWN
291 phrasingSlurNeutral
= \revert PhrasingSlur
#'direction
293 % dash-patterns (make-simple-dash-definition defined at top of file)
294 phrasingSlurDashPattern
=
295 #(define-music-function
(parser location dash-fraction dash-period
)
297 (_i
"Set up a custom style of dash pattern for @var{dash-fraction} ratio of
298 line to space repeated at @var{dash-period} interval.")
300 \override PhrasingSlur
#'dash-definition
=
301 $
(make-simple-dash-definition dash-fraction dash-period
)
304 \override PhrasingSlur
#'dash-definition
= #'((0 1 0.4 0.75))
306 \override PhrasingSlur
#'dash-definition
= #'((0 1 0.1 0.75))
307 phrasingSlurHalfDashed
=
308 \override PhrasingSlur
#'dash-definition
= #'((0 0.5 0.4 0.75)
310 phrasingSlurHalfSolid
=
311 \override PhrasingSlur
#'dash-definition
= #'((0 0.5 1 1)
314 \revert PhrasingSlur
#'dash-definition
320 #(define-music-function
(parser location
) ()
321 (_i
"Enable generation of code in final-format (e.g. pdf) files to reference the
322 originating lilypond source statement;
323 this is helpful when developing a score but generates bigger final-format files.")
324 (ly
:set-option
'point-and-click
#t
)
325 (make-music
'SequentialMusic
'void
#t
))
328 #(define-music-function
(parser location
) ()
329 (_i
"Suppress generating extra code in final-format (e.g. pdf) files to point
330 back to the lilypond source statement.")
331 (ly
:set-option
'point-and-click
#f)
332 (make-music
'SequentialMusic
'void
#t
))
335 %% predefined fretboards
337 predefinedFretboardsOff
=
338 \set predefinedDiagramTable
= ##f
339 predefinedFretboardsOn
=
340 \set predefinedDiagramTable
= #fretboard-table
345 aikenHeads
= \set shapeNoteStyles
= #'#(do re mi fa
#f la ti
)
346 sacredHarpHeads
= \set shapeNoteStyles
= #'#(fa
#f la fa
#f la mi
)
351 shiftOn
= \override NoteColumn
#'horizontal-shift
= #1
352 shiftOnn
= \override NoteColumn
#'horizontal-shift
= #2
353 shiftOnnn
= \override NoteColumn
#'horizontal-shift
= #3
354 shiftOff
= \revert NoteColumn
#'horizontal-shift
360 slurUp
= \override Slur
#'direction
= #UP
361 slurDown
= \override Slur
#'direction
= #DOWN
362 slurNeutral
= \revert Slur
#'direction
364 % dash-patterns (make-simple-dash-definition defined at top of file)
366 #(define-music-function
(parser location dash-fraction dash-period
)
369 \override Slur
#'dash-definition
=
370 $
(make-simple-dash-definition dash-fraction dash-period
)
372 slurDashed
= \override Slur
#'dash-definition
= #'((0 1 0.4 0.75))
373 slurDotted
= \override Slur
#'dash-definition
= #'((0 1 0.1 0.75))
374 slurHalfDashed
= \override Slur
#'dash-definition
= #'((0 0.5 0.4 0.75)
376 slurHalfSolid
= \override Slur
#'dash-definition
= #'((0 0.5 1 1)
378 slurSolid
= \revert Slur
#'dash-definition
383 showStaffSwitch
= \set followVoice
= ##t
384 hideStaffSwitch
= \set followVoice
= ##f
389 stemUp
= \override Stem
#'direction
= #UP
390 stemDown
= \override Stem
#'direction
= #DOWN
391 stemNeutral
= \revert Stem
#'direction
396 % switch to full notation
399 \revert TabStaff
.TimeSignature
#'stencil
400 % stems (the half note gets a double stem)
401 \revert TabVoice
.Stem
#'length
402 \revert TabVoice
.Stem
#'no-stem-extend
403 \revert TabVoice
.Stem
#'flag-style
404 \revert TabVoice
.Stem
#'details
405 \revert TabVoice
.Stem
#'transparent
406 \override TabVoice
.Stem
#'stencil
= #tabvoice
::draw-double-stem-for-half-notes
407 \set autoBeaming
= ##t
408 \revert NoteColumn
#'ignore-collision
410 \revert TabVoice
.Beam
#'stencil
411 \revert TabVoice
.Dots
#'stencil
412 \revert TabVoice
.Tie
#'stencil
413 \revert TabVoice
.Tie
#'after-line-breaking
414 \revert TabVoice
.RepeatTie
#'stencil
415 \revert TabVoice
.RepeatTie
#'after-line-breaking
416 \revert TabVoice
.LaissezVibrerTie
#'stencil
417 \revert TabVoice
.Slur
#'stencil
418 \revert TabVoice
.PhrasingSlur
#'stencil
420 \revert TabVoice
.TupletBracket
#'stencil
421 \revert TabVoice
.TupletNumber
#'stencil
423 \revert TabVoice
.DynamicText
#'transparent
424 \revert TabVoice
.DynamicTextSpanner
#'stencil
425 \revert TabVoice
.DynamicTextSpanner
#'stencil
426 \revert TabVoice
.Hairpin
#'transparent
428 \revert TabVoice
.Rest
#'stencil
429 \revert TabVoice
.MultiMeasureRest
#'stencil
430 \revert TabVoice
.MultiMeasureRestNumber
#'transparent
432 \revert TabVoice
.Script
#'stencil
433 \revert TabVoice
.TextScript
#'stencil
434 \revert TabStaff
.Arpeggio
#'stencil
435 \revert TabStaff
.NoteColumn
#'ignore-collision
438 %tie/repeat tie behaviour
439 hideSplitTiedTabNotes
= {
440 \override TabVoice
.TabNoteHead
#'(details tied-properties break-visibility
) = #all-invisible
441 \override TabVoice
.TabNoteHead
#'(details tied-properties parenthesize
) = ##f
442 \override TabVoice
.TabNoteHead
#'(details repeat-tied-properties note-head-visible
) = ##f
443 \override TabVoice
.TabNoteHead
#'(details repeat-tied-properties parenthesize
) = ##f
446 showSplitTiedTabNotes
= {
447 \override TabVoice
.TabNoteHead
#'(details tied-properties break-visibility
) = #begin-of-line-visible
448 \override TabVoice
.TabNoteHead
#'(details tied-properties parenthesize
) = ##t
449 \override TabVoice
.TabNoteHead
#'(details repeat-tied-properties note-head-visible
) = ##t
450 \override TabVoice
.TabNoteHead
#'(details repeat-tied-properties parenthesize
) = ##t
456 \override TextScript
#'extra-spacing-width
= #'(0 . 0)
457 \override TextScript
#'extra-spacing-height
= #'(-inf
.0 . +inf
.0)
460 \override TextScript
#'extra-spacing-width
= #'(+inf
.0 . -inf
.0)
461 \override TextScript
#'extra-spacing-height
= #'(0 . 0)
467 textSpannerUp
= \override TextSpanner
#'direction
= #UP
468 textSpannerDown
= \override TextSpanner
#'direction
= #DOWN
469 textSpannerNeutral
= \revert TextSpanner
#'direction
475 tieUp
= \override Tie
#'direction
= #UP
476 tieDown
= \override Tie
#'direction
= #DOWN
477 tieNeutral
= \revert Tie
#'direction
479 % dash-patterns (make-simple-dash-definition defined at top of file)
481 #(define-music-function
(parser location dash-fraction dash-period
)
484 \override Tie
#'dash-definition
=
485 $
(make-simple-dash-definition dash-fraction dash-period
)
487 tieDashed
= \override Tie
#'dash-definition
= #'((0 1 0.4 0.75))
488 tieDotted
= \override Tie
#'dash-definition
= #'((0 1 0.1 0.75))
489 tieHalfDashed
= \override Tie
#'dash-definition
= #'((0 0.5 0.4 0.75)
491 tieHalfSolid
= \override Tie
#'dash-definition
= #'((0 0.5 1 1)
493 tieSolid
= \revert Tie
#'dash-definition
498 tupletUp
= \override TupletBracket
#'direction
= #UP
499 tupletDown
= \override TupletBracket
#'direction
= #DOWN
500 tupletNeutral
= \revert TupletBracket
#'direction
505 % dynamic ly:dir? text script, articulation script ly:dir?
506 voiceOne
= #(context-spec-music
(make-voice-props-set
0) 'Voice
)
507 voiceTwo
= #(context-spec-music
(make-voice-props-set
1) 'Voice
)
508 voiceThree
= #(context-spec-music
(make-voice-props-set
2) 'Voice
)
509 voiceFour
= #(context-spec-music
(make-voice-props-set
3) 'Voice
)
510 oneVoice
= #(context-spec-music
(make-voice-props-revert
) 'Voice
)
516 \override NoteHead
#'style
= #'diamond
517 \override NoteHead
#'color
= #red
518 \override Stem
#'color
= #red
519 \override Beam
#'color
= #red
522 \override NoteHead
#'style
= #'triangle
523 \override NoteHead
#'color
= #blue
524 \override Stem
#'color
= #blue
525 \override Beam
#'color
= #blue
528 \override NoteHead
#'style
= #'xcircle
529 \override NoteHead
#'color
= #green
530 \override Stem
#'color
= #green
531 \override Beam
#'color
= #green
534 \override NoteHead
#'style
= #'cross
535 \override NoteHead
#'color
= #magenta
536 \override Stem
#'color
= #magenta
537 \override Beam
#'color
= #magenta
539 voiceNeutralStyle
= {
540 \revert NoteHead
#'style
541 \revert NoteHead
#'color
550 #(define-music-function
(parser location
) ()
551 (_i
"Set the default note head style to a cross-shaped style.")
552 (override-head-style
'(TabNoteHead NoteHead
) 'cross
))
553 xNotesOff
= \defaultNoteHeads
555 #(define-music-function
(parser location note
) (ly
:music?
)
556 (_i
"Print @var{note} with a cross-shaped note head.")
557 (style-note-heads
'(TabNoteHead NoteHead
) 'cross note
))
560 %% dead notes (these need to come after "x notes")
562 % Define aliases of cross-head notes for specific purposes
563 deadNotesOn
= \xNotesOn
564 deadNotesOff
= \xNotesOff