]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/translation-functions.scm
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / scm / translation-functions.scm
index 998d05e836226e00d69e945c120560c0692d06a5..f3bd6163828558557a9f30d5c581e28d98eaf690 100644 (file)
@@ -5,12 +5,23 @@
 ;;;; (c) 1998--2006 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 ;;;;                Jan Nieuwenhuizen <janneke@gnu.org>
 
+(define-public (denominator-tuplet-formatter mus)
+  (number->string (ly:music-property mus 'denominator)))
+
+(define-public (fraction-tuplet-formatter mus)
+  (string-append
+   (number->string (ly:music-property mus 'denominator))
+   ":"
+   (number->string (ly:music-property mus 'numerator))))
+
 ;; metronome marks
-(define-public (format-metronome-markup dur count context)
-  (let* ((note-mark (make-smaller-markup
-                    (make-note-by-number-markup (ly:duration-log dur)
-                                                (ly:duration-dot-count dur)
-                                                1))))  
+(define-public (format-metronome-markup event context)
+  (let* ((dur (ly:music-property event 'tempo-unit))
+       (count (ly:music-property event 'metronome-count))
+       (note-mark (make-smaller-markup
+                  (make-note-by-number-markup (ly:duration-log dur)
+                                              (ly:duration-dot-count dur)
+                                              1))))  
     (make-line-markup
      (list
       (make-general-align-markup Y DOWN note-mark)
@@ -60,9 +71,8 @@
 ;; Bass figures.
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(define-public (format-bass-figure figure stream-event context)
-  (let* ((event (ly:event-property stream-event 'music-cause ))
-        (fig (ly:music-property event 'figure))
+(define-public (format-bass-figure figure event context)
+  (let* ((fig (ly:music-property event 'figure))
         (fig-markup (if (number? figure)
 
                         ;; this is not very elegant, but center-aligning all digits