I have generated this musicXML file with my own C++ code. It displays ok in musescore etc, but it is not playing. I am guessing some important info is missing in the file?

Here is the file: https://dl.dropboxusercontent.com/u/13564139/cf.xml

This is the beginning:

<?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>
有帮助吗?

解决方案

Fixed by removing:

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

I guess I have to read the documentation for that again. http://www.musicxml.com/tutorial/percussion/multiple-instruments/

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top