4 %% TODO: these definitions should be read and executed out dynamically
5 %% using an applycontext.
9 \property Voice.Stem \override #'direction = #1
10 \property Voice.Stem \override #'lengths =
11 #(map (lambda (x) (* 0.8 x)) '(2.5 2.5 3.0 4.0 5.0))
12 \property Voice.Stem \override #'stem-shorten =
14 \property Voice.Stem \override #'beamed-lengths =
15 #(map (lambda (x) (* 0.8 x)) '(3.26))
16 \property Voice.Stem \override #'beamed-minimum-free-lengths =
17 #(map (lambda (x) (* 0.8 x)) '(2.5 2.0 1.5))
18 \property Voice.Stem \override #'beamed-extreme-minimum-free-lengths =
19 #(map (lambda (x) (* 0.8 x)) '(1.83 1.5))
21 \property Voice.Stem \override #'no-stem-extend = ##t
22 \property Voice.Stem \override #'stroke-style = #"grace"
23 \property Voice.Beam \override #'thickness = #0.384
25 %% Instead of calling Beam::space_function, we should invoke
26 %% the previously active beam function...
27 \property Voice.Beam \override #'space-function =
28 #(lambda (beam mult) (* 0.8 (Beam::space_function beam mult)))
30 \property Voice.Beam \override #'position-callbacks =
31 #`(,Beam::least_squares
35 % Can't use Staff.fontSize, since time sigs, keys sigs, etc. will
38 \property Voice.fontSize = #-2
39 \property Staff.Accidental \override #'font-relative-size = #-2
40 \property Voice.Slur \override #'direction = #-1
44 %% attention: order is significant: reversed from above
45 %% (consistent ordering reduces memory usage.)
47 \property Voice.Slur \revert #'direction
48 \property Staff.Accidental \revert #'font-relative-size
49 \property Voice.Beam \revert #'thickness
51 \property Voice.Stem \revert #'stroke-style
52 \property Voice.Stem \revert #'no-stem-extend
53 \property Voice.Stem \revert #'beamed-extreme-minimum-free-lengths
54 \property Voice.Stem \revert #'beamed-minimum-free-lengths
55 \property Voice.Stem \revert #'beamed-lengths
56 \property Voice.Stem \revert #'stem-shorten
57 \property Voice.Stem \revert #'lengths
58 \property Voice.Stem \revert #'direction
59 \property Voice.Beam \revert #'space-function
61 \property Voice.Beam \revert #'position-callbacks
63 % Can't use Staff.fontSize, since time sigs, keys sigs, etc. will
66 \property Voice.fontSize \unset
69 #(define (add-to-grace-init context object prop val)
70 " Override context.object #'property before entering grace context,
71 and restore afterwards. Use this to add settings to default grace notes.
74 (make-sequential-music
76 (context-spec-music (make-grob-property-revert object prop) context)
77 (ly:get-mus-property stopGraceMusic 'elements)
80 (make-sequential-music
82 (ly:get-mus-property startGraceMusic 'elements)
83 (list (context-spec-music (make-grob-property-set object prop val) context))