[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MusicXML
From: |
Paul Morris |
Subject: |
Re: MusicXML |
Date: |
Thu, 25 Apr 2013 03:14:24 -0400 |
On Apr 24, 2013, at 12:52 AM, address@hidden 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
- MusicXML, Christopher R. Maden, 2013/04/23
- Re: MusicXML, address@hidden, 2013/04/23
- Re: MusicXML, Urs Liska, 2013/04/23
- Re: MusicXML, Urs Liska, 2013/04/23
- Re: MusicXML, Noeck, 2013/04/23
- Re: MusicXML, Vaughan McAlley, 2013/04/23
- Re: MusicXML, address@hidden, 2013/04/24
- Re: MusicXML,
Paul Morris <=
- Re: MusicXML, Urs Liska, 2013/04/25
- Re: MusicXML, David Kastrup, 2013/04/25
- Re: MusicXML, David Pirotte, 2013/04/25
Re: MusicXML, Paul Morris, 2013/04/23