]> git.donarmstrong.com Git - lilypond.git/commitdiff
* input/test/time-signature-double.ly: use markups for double time
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 14 Sep 2003 14:38:20 +0000 (14:38 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 14 Sep 2003 14:38:20 +0000 (14:38 +0000)
sigs.

* scm/new-markup.scm (strut-markup): change calling interface for
markup. Pass paper-def, not grob. This would \markup to be used
separately from grobs.

ChangeLog
input/test/time-signature-double.ly
lily/grob-scheme.cc
scm/define-grobs.scm
scm/new-markup.scm

index 333324b91647fee0d7957304e05d91d7bdfbf3bf..cf91d267630e6eb1bbc4a94015d3eba4d4c2316e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2003-09-14  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
+       * input/test/time-signature-double.ly: use markups for double time
+       sigs.
+
        * scm/chord-name.scm: remove new-chord-name-brew-molecule ; use
        ChordNames.SeparationItem #'padding for adjusting space after chords.
        
index c2186c4cf296a12cc70f283ba0b6f4083bfebe8b..dd89d97dbd0355c532e26493a94ca0e7ef13c6a2 100644 (file)
@@ -1,45 +1,32 @@
 
 \version "1.9.4"
 
-\header { texidoc= "@cindex Time Signature Double
-Double time signatures are not supported
-explicitly, but can be faked by overriding formatting routines. "
-}
+\header { texidoc= "
 
+@cindex Double time signature
+@cindex markup
+@cindex Time signature, double.
 
-#(define (brew-double-time-sig grob)
-  (define (frac-to-mol font frac)
-    (let*
-       ((d (fontify-text font (number->string (cdr frac))))
-        (n (fontify-text font (number->string (car frac))))
-        (c (ly:molecule-combine-at-edge d Y UP n 0.0)) )
-      (ly:molecule-align-to! c Y CENTER)
-      c
-    ))
-  
-  (let*
-      
-    ((chain (Font_interface::get_property_alist_chain grob))
-     (font (ly:paper-get-font (ly:grob-get-paper grob) chain))
-     (f1 '(6 . 4))
-     (musfont (ly:paper-get-font (ly:grob-get-paper grob) (cons (list '(font-relative-size . 2) '(font-family . music)) chain)))
-     (plus (ly:molecule-translate-axis (ly:find-glyph-by-name musfont "scripts-stopped") 0.1 Y))
-     (f2 '(3 . 2))
-     (m1 (frac-to-mol font f1))
-     (m2 (frac-to-mol font f2)) )
-     
-    
-    (ly:molecule-combine-at-edge
-     (ly:molecule-combine-at-edge m1 X RIGHT plus 0.2)
-     X RIGHT m2  0.2)
-    
-    )
-)
 
+Double time
+signatures are not supported explicitly, but can be faked with markups
+and overriding formatting routines. " }
+
+tsMarkup =
+\markup  {
+    \number { 
+    \column < "6" "4" >
+    \musicglyph #"scripts-stopped" 
+    \bracket \column < "3" "2" >
+    }}
+       
 
 \score  { \notes \relative c'
          {
-          \property Staff.TimeSignature \override #'molecule-callback = #brew-double-time-sig
+          \property Staff.TimeSignature \override #'molecule-callback = #Text_item::brew_molecule
+          \property Staff.TimeSignature \override #'text = #tsMarkup
+          
+          
           \time 3/2
           c2 c c 
           
index a4cb06249c865433b5e6d701efd1b1463eb8d9b2..54015197ee2165d35989e4f2caa2c4294284e117 100644 (file)
@@ -118,8 +118,7 @@ LY_DEFINE (ly_get_parent, "ly:get-parent", 2, 0, 0, (SCM grob, SCM axis),
   return par ? par->self_scm () : SCM_EOL;
 }
 
-/* ly prefix? */
-LY_DEFINE (get_system,
+LY_DEFINE (ly_get_system,
           "ly:get-system",
           1, 0, 0, (SCM grob),
           "Return the System Grob of @var{grob}.")
@@ -133,8 +132,7 @@ LY_DEFINE (get_system,
   return SCM_EOL;
 }
 
-/* ly prefix? */
-LY_DEFINE (get_original,
+LY_DEFINE (ly_get_original,
           "ly:get-original",
           1, 0, 0, (SCM grob),
           "Return the original Grob of @var{grob}")
@@ -164,18 +162,3 @@ LY_DEFINE (get_broken_into,
 }
 
 
-
-LY_DEFINE(ly_property_alist_chain, "ly:grob-property-chain",
-         1,1,0,
-         (SCM grob, SCM defaults),
-         "Return all the properties of @code{grob}. Glue @var{defaults} at the end of the chain.")
-{
-  Grob * g = unsmob_grob (grob);
-  SCM_ASSERT_TYPE(g, grob, SCM_ARG1, __FUNCTION__, "grob");
-
-  if (defaults == SCM_UNDEFINED)
-    defaults = SCM_EOL;
-
-  SCM ch = g->get_property_alist_chain (defaults);  
-  return ch;
-}
index 10d9d597ed55880f09484e8713ce6733bc39269a..12887a80bdc854d2da8189e8bc8dada14fdaf684 100644 (file)
     (TimeSignature
      . (
        (molecule-callback . ,Time_signature::brew_molecule)
+;      (molecule-callback . ,Text_item::brew_molecule) 
        (break-align-symbol . time-signature)
        (break-visibility . ,all-visible)
        (space-alist . (
                        ))
        (breakable . #t)
        (style . C)
+;      (text . (,time-signature-glue-markup)) 
        (font-family . number)
        (meta . ((interfaces . (time-signature-interface break-aligned-interface font-interface item-interface ))))
        ))
index 1e585aa7ba40c39fc404ef4dd1637b57c5a0bc71..238dd8e05acda341637979cbe0e4f283094c0364 100644 (file)
@@ -450,7 +450,6 @@ for DIR, you can obtain longer or shorter stems."
     (ly:molecule-set-extent! m 0 '(1000 . -1000))
     m))
 
-
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;