lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MusicXML


From: Urs Liska
Subject: Re: MusicXML
Date: Thu, 25 Apr 2013 09:22:18 +0200

Am Donnerstag, den 25.04.2013, 03:14 -0400 schrieb Paul Morris:
> 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.  
That looks quite promising.
I had intended to say earlier that the music stream wouldn't have to be
the only source of input.
Any export script (be it Python or Scheme) should take the music stream
as its base material and add anything it can get from parsing the input
itself.
I had asked if the reference to the source location (the point-and-click
information) is available in the music stream. This could be handy to
perform any additional checks, i.e. get the music stream and parse the
corresponding input.

Urs

> 
> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]