]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/to-xml.scm
Run `make grand-replace'.
[lilypond.git] / scm / to-xml.scm
index e3f3277c46c8f0e6f670941950519364b432e884..e65f48f0cb59cf2814607c51ae3525ba66528aad 100644 (file)
@@ -2,11 +2,14 @@
 ;;;;
 ;;;;  source file of the GNU LilyPond music typesetter
 ;;;; 
-;;;; (c)  2003--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;;; (c) 2003--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
 ;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
 
+(define-module (scm to-xml))
+
 (use-modules (ice-9 regex)
             (srfi srfi-1)
+            (lily)
             (oop goops))
 
 "
@@ -86,19 +89,6 @@ is then separated.
                   (numer . ,(car (ly:duration-factor d)))
                   (denom . ,(cdr (ly:duration-factor d))))))
 
-(define (musicxml-pitch->xml-node p)
-  (make <xml-node>
-    #:name 'pitch
-    #:children
-    (list
-     (make <xml-node>
-       #:name 'step
-       #:value (list-ref  '("C" "D" "E" "F" "G" "A" "B")
-                         (ly:pitch-notename p)))
-     (make <xml-node>
-       #:name 'octave
-       #:value (number->string (ly:pitch-octave p))))))
-
 (define (pitch->xml-node p)
   (make <xml-node>
     #:name 'pitch
@@ -187,7 +177,7 @@ is then separated.
 (define (assert x)
   (if x
       #t
-      (error "assertion failed")))
+      (ly:error (_ "assertion failed: ~S") x)))
 
 (define (re-sub re to string)
   (regexp-substitute/global #f re string 'pre to 'post))
@@ -247,7 +237,6 @@ is then separated.
   ;;
   ;;  (display (dtd-header) port)
 
-  (define pitch->xml-node musicxml-pitch->xml-node)
   (define duration->xml-node musicxml-duration->xml-node)
   
   (display (open-tag 'music '((type . score)) '()) port)