Skip to content

Commit

Permalink
fix #64696: MusicXML MIDI port export for Instrument Change element
Browse files Browse the repository at this point in the history
  • Loading branch information
Igevorse committed Jun 11, 2015
1 parent d8321d9 commit 71fc221
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions mscore/exportxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4430,8 +4430,13 @@ void ExportMusicXml::write(QIODevice* dev)
foreach(int instNr, rim.keys()) {
scoreInstrument(xml, idx + 1, instNr + 1, MScoreTextToMXML::toPlainText(rim.value(instNr)->trackName()));
}
foreach(int instNr, rim.keys()) {
xml.tag(QString("midi-device %1 port=\"%2\"").arg(instrId(idx+1, instNr + 1)).arg(part->midiPort() + 1), "");
for (MxmlReverseInstrumentMap::const_iterator ii = rim.constBegin(); ii != rim.constEnd(); ii++) {
int instNr = ii.key();
int midiPort = part->midiPort() + 1;
if (ii.value()->channel().size() > 0)
midiPort = score()->midiMapping(ii.value()->channel(0)->channel)->port + 1;

xml.tag(QString("midi-device %1 port=\"%2\"").arg(instrId(idx+1, instNr + 1)).arg(midiPort), "");
midiInstrument(xml, idx + 1, instNr + 1, rim.value(instNr), _score);
}
}
Expand Down

0 comments on commit 71fc221

Please sign in to comment.