如何在FLASH CS4/AS3中读取MusicXML文件以便可视化展示数据

5

我希望能够通过读取musicXML文件在flash中创建音乐可视化效果。

是否有一种类可以读取它?或者有帮助指南来理解musicXML结构以及如何将其用于可视化音乐?

谢谢, Alon

2个回答

1

您可以使用E4X(ECMAscript for XML)来读取和解析MusicXML文件,就像使用它来读取和解析其他XML文件一样。据我所知,没有额外的类库可用。像Noteflight和Legato这样在Flash中进行MusicXML开发的开发人员发现销售服务比销售ActionScript库更好。

http://www.recordare.com/musicxml上有大量的MusicXML信息,包括http://www.recordare.com/musicxml/tutorial上的教程。通过计算机创建音乐符号是复杂的,因此如果您想要这样做,需要做很多工作。如果您有其他类型的可视化想法,那可能会容易得多。能够阅读音乐符号将会是一个很大的帮助;即使在MusicXML教程中也假定具有这种知识水平。

祝你好运!


0

只有几种方法可以涵盖你 XML 工作的 80%:

attributes      An object containing attribute variables assigned to this element.
childNodes      An array containing all child nodes belonging to this node.
parentNode      This node's parent node.
firstChild      The first child in this element's childNodes,
                or childNodes[0]
lastChild       The last child in this elements childNodes,
                or childNodes[childNodes.length-1]
nextSibling     The node after this node in the parent's childNodes array.
previousSibling The node before this node in the parent's childNodes array.

这里有简单的文档:http://www.republicofcode.com/tutorials/flash/as3xml/


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接