MusicXML文件没有播放 - 缺少什么?

时间:2014-01-21 14:40:15

标签: xml musicxml

我用自己的C ++代码生成了这个musicXML文件。它在musescore等显示确定,但它没有播放。我猜测文件中缺少一些重要信息?

以下是文件:https://dl.dropboxusercontent.com/u/13564139/cf.xml

这是开始:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE score-partwise PUBLIC
"-//Recordare//DTD MusicXML 2.0 Partwise//EN"
"http://www.musicxml.org/dtds/partwise.dtd">
<score-partwise version="2.0"><work>
<work-title>Generated Music</work-title></work><identification>
<creator type="composer">Optimuse</creator></identification><part-list>
<score-part id="P2">
<part-name>Part 1</part-name>
</score-part>
<score-part id="P1">
<part-name>Part 2</part-name>
</score-part>
</part-list>
<part id="P2">
<score-instrument id="P2">
<instrument-name>Violin</instrument-name></score-instrument>
<midi-instrument id="P1">
<midi-channel>1</midi-channel>
<midi-program>1</midi-program>
<volume>80</volume>
<pan>0</pan></midi-instrument> <measure number="1"><attributes><divisions>4</divisions><key><fifths>-4</fifths><mode>minor</mode></key><time><beats>4</beats><beat-type>4</beat-type></time><clef><sign>G</sign><line>2</line></clef></attributes>
<note>
<rest/><duration>8</duration>
<type>half</type><stem>up</stem>
</note>

<note>
<pitch>
<step>D</step><alter>-1</alter>
<octave>5</octave>
</pitch>
<duration>8</duration>
<type>half</type><stem>down</stem>
<accidental>flat</accidental>
</note>
</measure>
<measure>
<note>
<pitch>
<step>E</step><alter>-1</alter>
<octave>5</octave>
</pitch>
<duration>4</duration>
<type>quarter</type><stem>down</stem>
<accidental>flat</accidental>
</note>

1 个答案:

答案 0 :(得分:1)

通过删除修复:

<score-instrument id="P1">
<instrument-name>Violin</instrument-name></score-instrument>
<midi-instrument id="P1">
<midi-channel>1</midi-channel>
<midi-program>1</midi-program>
<volume>80</volume>
<pan>0</pan></midi-instrument> 

我想我必须再次阅读相关文档。 http://www.musicxml.com/tutorial/percussion/multiple-instruments/