]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/define-music-display-methods.scm
FIXME: Manually rename semichoirstaff; to semichoirstaff-. Fixes make dist.
[lilypond.git] / scm / define-music-display-methods.scm
index 0f957151f8e312f67954e067bf26786756338179..d5449925ece4f4138aac0d7aab2971f7fff6fda7 100644 (file)
@@ -1,7 +1,7 @@
 ;;; define-music-display-methods.scm -- data for displaying music
 ;;; expressions using LilyPond notation.
 ;;;
-;;; (c) 2005--2006 Nicolas Sceaux  <nicolas.sceaux@free.fr>
+;;; (c) 2005--2007 Nicolas Sceaux  <nicolas.sceaux@free.fr>
 ;;;
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                     'HarmonicEvent
                     'BeamForbidEvent
                     'AbsoluteDynamicEvent
+                    'TupletSpanEvent
                     'TrillSpanEvent
                     'GlissandoEvent
                     'ArpeggioEvent
@@ -598,6 +599,7 @@ Otherwise, return #f."
        (fig (ly:music-property figure 'figure))
        (bracket-start (ly:music-property figure 'bracket-start))
        (bracket-stop (ly:music-property figure 'bracket-stop)))
+
     (format #f "~a~a~a~a"
            (if (null? bracket-start) "" "[")
            (cond ((null? fig) "_")
@@ -605,12 +607,12 @@ Otherwise, return #f."
                  (else fig))
            (if (null? alteration)
                ""
-               (case alteration
-                 ((-4) "--")
-                 ((-2) "-")
-                 ((0) "!")
-                 ((2) "+")
-                 ((4) "++")
+               (cond 
+                 ((= alteration DOUBLE-FLAT) "--")
+                 ((= alteration FLAT) "-")
+                 ((= alteration NATURAL) "!")
+                 ((= alteration SHARP) "+")
+                 ((= alteration DOUBLE-SHARP) "++")
                  (else "")))
            (if (null? bracket-stop) "" "]"))))
 
@@ -687,9 +689,6 @@ Otherwise, return #f."
 (define-display-method UnfoldedRepeatedMusic (expr parser)
   (repeat->lily-string expr "unfold" parser))
 
-(define-display-method FoldedRepeatedMusic (expr parser)
-  (repeat->lily-string expr "fold" parser))
-
 (define-display-method PercentRepeatedMusic (expr parser)
   (repeat->lily-string expr "percent" parser))
 
@@ -899,10 +898,15 @@ Otherwise, return #f."
            ?unit-count)))
 
 ;;; \clef 
-(define clef-name-alist (map (lambda (name+vals)
-                              (cons (cdr name+vals)
-                                    (car name+vals)))
-                            supported-clefs))
+(define clef-name-alist #f)
+(define-public (memoize-clef-names clefs)
+  "Initialize `clef-name-alist', if not already set."
+  (if (not clef-name-alist)
+      (set! clef-name-alist
+            (map (lambda (name+vals)
+                   (cons (cdr name+vals)
+                         (car name+vals)))
+                 clefs))))
 
 (define-extra-display-method ContextSpeccedMusic (expr parser)
   "If `expr' is a clef change, return \"\\clef ...\"