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