]> git.donarmstrong.com Git - lilypond.git/blob - ly/grace-init.ly
release: 1.5.9
[lilypond.git] / ly / grace-init.ly
1
2 #(define (grace-beam-space-function multiplicity)
3   (* (if (<= multiplicity 3) 0.816 0.844) 0.8))
4
5
6 startGraceMusic = {
7     \property Voice.Stem \override  #'direction = #1
8     \property Voice.Stem \override #'length = #6
9     \property Voice.Stem \override #'lengths = 
10         #(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0))
11     \property Voice.Stem \override #'beamed-lengths =
12         #(map (lambda (x) (* 0.8 x)) '(0.0 2.5 2.0 1.5))
13     \property Voice.Stem \override #'beamed-minimum-lengths =
14         #(map (lambda (x) (* 0.8 x)) '(0.0 1.5 1.25 1.0))
15     \property Voice.Stem \override #'no-stem-extend = ##t
16     \property Voice.Stem \override #'flag-style  = #"grace"
17
18     \property Voice.Beam \override #'space-function = #grace-beam-space-function
19     \property Voice.Beam \override #'thickness = #0.384
20     
21     % Can't use Staff.fontSize, since time sigs, keys sigs, etc. will
22     % be smaller as well.
23
24     \property Voice.fontSize = #-2
25     \property Staff.Accidentals \override #'font-relative-size = #-2
26 }
27
28 stopGraceMusic = {
29     \property Voice.Beam \revert #'space-function
30     \property Voice.Beam \revert #'thickness
31
32     \property Voice.Stem \revert #'flag-style
33     \property Voice.Stem \revert #'no-stem-extend
34     \property Voice.Stem \revert #'beamed-lengths
35     \property Voice.Stem \revert #'beamed-minimum-lengths
36     \property Voice.Stem \revert #'lengths    
37     \property Voice.Stem \revert #'length
38     \property Voice.Stem \revert #'direction    
39     
40     % Can't use Staff.fontSize, since time sigs, keys sigs, etc. will
41     % be smaller as well.
42
43     \property Voice.fontSize \unset
44     \property Staff.LocalKeyItem \revert #'font-relative-size
45 }