[gsharp-cvs] CVS gsharp/Mxml
dlewis
dlewis at common-lisp.net
Fri Feb 8 16:47:58 UTC 2008
Update of /project/gsharp/cvsroot/gsharp/Mxml
In directory clnet:/tmp/cvs-serv12683/Mxml
Modified Files:
mxml.lisp
Log Message:
Added octave treble support in musicxml import/export
--- /project/gsharp/cvsroot/gsharp/Mxml/mxml.lisp 2007/10/18 15:02:47 1.1
+++ /project/gsharp/cvsroot/gsharp/Mxml/mxml.lisp 2008/02/08 16:47:55 1.2
@@ -494,7 +494,10 @@
;; clefs
(for-named-elements ("clef" clef attributes)
(let ((name (stringcase (named-pcdata clef "sign")
- ("G" :treble)
+ ("G" (if (string= (named-pcdata clef "clef-octave-change")
+ "-1")
+ :treble8
+ :treble))
("F" :bass)
("C" :c)
("percussion" :percussion)
@@ -861,7 +864,10 @@
(cxml:with-element "sign"
(cxml:text clef-sign))
(cxml:with-element "line"
- (cxml:text (write-to-string clef-line))))))))
+ (cxml:text (write-to-string clef-line)))
+ (when (eq (name clef) :treble8)
+ (cxml:with-element "clef-octave-change"
+ (cxml:text "-1"))))))))
;; process each bar, backing up only if there's a "next" bar
(loop for voice from 1
More information about the Gsharp-cvs
mailing list