X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fto-xml.scm;h=e65f48f0cb59cf2814607c51ae3525ba66528aad;hb=5b4b0d6e9a197e8f9eb085b7c2ad78b8be3e5cfc;hp=e3f3277c46c8f0e6f670941950519364b432e884;hpb=3b2376c6828136cdbc078015c0b9bee26bffb448;p=lilypond.git diff --git a/scm/to-xml.scm b/scm/to-xml.scm index e3f3277c46..e65f48f0cb 100644 --- a/scm/to-xml.scm +++ b/scm/to-xml.scm @@ -2,11 +2,14 @@ ;;;; ;;;; source file of the GNU LilyPond music typesetter ;;;; -;;;; (c) 2003--2004 Han-Wen Nienhuys +;;;; (c) 2003--2008 Han-Wen Nienhuys ;;;; Jan Nieuwenhuizen +(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 - #:name 'pitch - #:children - (list - (make - #:name 'step - #:value (list-ref '("C" "D" "E" "F" "G" "A" "B") - (ly:pitch-notename p))) - (make - #:name 'octave - #:value (number->string (ly:pitch-octave p)))))) - (define (pitch->xml-node p) (make #: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)