On Apr 24, 2013, at 12:52 AM, m...@mikesolomon.org wrote: > Python is a great tool for XML creation. There is also > http://okmij.org/ftp/Scheme/xml.html. The advantage of doing it in Scheme is > that you are building it directly into LilyPond.
Doing it in scheme does seem to offer some nice advantages. I looked into it and found that there's SXML, a scheme version of XML: SXML: '(doc (title "Hello world")) XML: <doc> <title>Hello world</title> </doc> And there is existing scheme code that converts SXML to an XML file.[1] So if all went well (ha ha) it would "just" be a matter of rearranging the scheme data from the music stream into SXML format, following the MusicXML specification. Though I'm sure that's harder than it sounds. Having all the moving parts in scheme would be nice and having an internal scheme version of the XML file might make it easier to (eventually, maybe) add in additional data that is not part of the music stream. Is the music stream what you see when you use \displayMusic as described here? http://lilypond.org/doc/v2.16/Documentation/extending/displaying-music-expressions [1] http://modis.ispras.ru/Lizorkin/sxml-tutorial.html#hevea:serializ [2] https://en.wikipedia.org/wiki/SXML [3] http://www.ibm.com/developerworks/library/x-matters31.html Quoting: "XML is semantically almost identical to the nested list-oriented data structures native to Lisp-like languages. Anything you can represent in XML can be straightforwardly represented as SXML -- Scheme lists nesting the same data as the original XML. Moreover, Scheme comes with a rich library of list and tree manipulation functions, and a history of contemplating manipulation of those very structures. A natural fit, perhaps." Cheers, -Paul _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user