]> git.donarmstrong.com Git - lilypond.git/blob - input/test/time-signature-double.ly
3843ee2e97155cc258b6539d534045aa37e552f4
[lilypond.git] / input / test / time-signature-double.ly
1
2 \version "1.9.4"
3
4 \header { texidoc= "@cindex Time Signature Double
5 Double time signatures are not supported
6 explicitly, but can be faked by overriding formatting routines. "
7 }
8
9
10 #(define (brew-double-time-sig grob)
11   (define (frac-to-mol font frac)
12     (let*
13         (
14          (d (fontify-text font (number->string (cdr frac))))
15          (n (fontify-text font (number->string (car frac))))
16          (c (ly:molecule-combine-at-edge d Y UP n 0.0))
17          )
18       (ly:molecule-align-to! c Y CENTER)
19       c
20     ))
21   
22   (let*
23       
24     (
25      (chain (Font_interface::get_property_alist_chain grob))
26      (font (ly:get-font grob chain))
27      (f1 '(6 . 4))
28      (musfont (ly:get-font grob (cons (list '(font-relative-size . 2) '(font-family . music)) chain)))
29      (plus (ly:molecule-translate-axis (ly:find-glyph-by-name musfont "scripts-stopped") 0.1 Y))
30      (f2 '(3 . 2))
31      (m1 (frac-to-mol font f1))
32      (m2 (frac-to-mol font f2))
33      )
34      
35     
36     (ly:molecule-combine-at-edge
37      (ly:molecule-combine-at-edge m1 X RIGHT plus 0.2)
38      X RIGHT m2  0.2)
39     
40     )
41 )
42
43
44 \score  { \notes \relative c'
45           {
46            \property Staff.TimeSignature \override #'molecule-callback = #brew-double-time-sig
47            \time 3/2
48            c2 c c 
49            
50    }
51         \paper{ raggedright = ##t}
52 }