MusicXML export for percussion has the wrong midi numbers
I have created a Musecore file of a drum tune and I exported it as a MusicXML file. However, when I look at the MusicXML file, the midi numbers for the notes are wrong.
The tune should start with a crash cymbal following by ride cymbal.
The .mscx file contains:
<Chord> <durationType>eighth</durationType> <StemDirection>up</StemDirection> <Note> <pitch>49</pitch> <tpc>21</tpc> <head>cross</head> </Note> </Chord> <Chord> <durationType>eighth</durationType> <StemDirection>up</StemDirection> <Note> <pitch>51</pitch> <tpc>11</tpc> <head>cross</head> </Note> </Chord> <Chord> <durationType>eighth</durationType> <StemDirection>up</StemDirection> <Note> <pitch>51</pitch> <tpc>11</tpc> <head>cross</head> </Note> </Chord> <Chord> <durationType>eighth</durationType> <StemDirection>up</StemDirection> <Note> <pitch>51</pitch> <tpc>11</tpc> <head>cross</head> </Note> </Chord> <Chord> <durationType>eighth</durationType> <StemDirection>up</StemDirection> <Note> <pitch>51</pitch> <tpc>11</tpc> <head>cross</head> </Note> </Chord>
which is correct. However, the MusicXML file for the same notes contains:
<note default-x="69.21" default-y="10.00"> <unpitched> <display-step>A</display-step> <display-octave>5</display-octave> </unpitched> <duration>6</duration> <instrument id="P1-I50"/> <voice>1</voice> <type>eighth</type> <stem>up</stem> <notehead>x</notehead> <beam number="1">begin</beam> </note> <note default-x="100.67" default-y="0.00"> <unpitched> <display-step>F</display-step> <display-octave>5</display-octave> </unpitched> <duration>6</duration> <instrument id="P1-I52"/> <voice>1</voice> <type>eighth</type> <stem>up</stem> <notehead>x</notehead> <beam number="1">continue</beam> </note> <note default-x="132.13" default-y="0.00"> <unpitched> <display-step>F</display-step> <display-octave>5</display-octave> </unpitched> <duration>6</duration> <instrument id="P1-I52"/> <voice>1</voice> <type>eighth</type> <stem>up</stem> <notehead>x</notehead> <beam number="1">continue</beam> </note> <note default-x="163.59" default-y="0.00"> <unpitched> <display-step>F</display-step> <display-octave>5</display-octave> </unpitched> <duration>6</duration> <instrument id="P1-I52"/> <voice>1</voice> <type>eighth</type> <stem>up</stem> <notehead>x</notehead> <beam number="1">end</beam> </note>
Referencing back to the instruments section:
<midi-instrument id="P1-I50"> <midi-channel>10</midi-channel> <midi-program>1</midi-program> <midi-unpitched>50</midi-unpitched> <volume>78.7402</volume> <pan>0</pan> </midi-instrument> <midi-instrument id="P1-I52"> <midi-channel>10</midi-channel> <midi-program>1</midi-program> <midi-unpitched>52</midi-unpitched> <volume>78.7402</volume> <pan>0</pan> </midi-instrument>
which are Hi Tom and Chinese Cymbal
Comments
Looks like being off by one
The pitch given in the MSCx file (by the by the <pitch> element) is the pitch of the note to be sent via MIDI to hit the trap of interest in the "drum set" instrument.
But the "unpitch" in the MusicXML file (as given by the <display-step> and <display-octave> elements) for a note in unpitched percussion is the apparent ("notated") pitch of the note symbol as seen on a percussion staff (in the source score.
Is this perhaps the basis for your concern?
It does not seem that the drum map you are using is the same as the "default" drum map in MuseScore, so I can't really see how the various pitches seen in you file snippets relate.
I do note that in the standard GM drum map:
Crash cymbal 1 = note number (pitch) 49
Crash cymbal 2 = 57
Ride cymbal 1 = 51
Ride cymbal 2 = 59
Doug
In reply to The pitch given in the MSCx… by Doug Kerr
I am not looking that the display-step or display-octave elements, since these only control where in the stave the note should be displayed, which has nothing to do with the midi commands.
In the .mscx file, I see: 49 (Crash 1)
But in the musicxml file, I see:
50
So the musicxml file is instructing the midi to play note 50, whereas the .mscx file is instructing the midi to play note 49.
Elsewhere in the .mscx file: 36 (Bass drum 1)
musicxml file:
37
So, as the previous reply said, it looks like the musicxml file is generating the wrong instrument (out by one)
In reply to The pitch given in the MSCx… by Doug Kerr
I am not looking that the display-step or display-octave elements, since these only control where in the stave the note should be displayed, which has nothing to do with the midi commands.
In the .mscx file, I see:
<pitch>49</pitch>
(Crash 1)But in the musicxml file, I see:
So the musicxml file is instructing the midi to play note 50, whereas the .mscx file is instructing the midi to play note 49.
Elsewhere in the .mscx file:
<pitch>36</pitch>
(Bass drum 1)musicxml file:
So, as the previous reply said, it looks like the musicxml file is generating the wrong instrument (out by one)
In reply to I am not looking that the… by carbar1103
Please file this in the isssue tracker
In reply to I am not looking that the… by carbar1103
I gotcha now. I missed the relationship given in the instrument section of the file.
Doug