Merge pull request #1756 from MarcSabatella/46986-atonal-musicxml
fix #46986: musicxml support for open key signature
This commit is contained in:
commit
2998a6435f
5 changed files with 130 additions and 2 deletions
|
@ -1569,6 +1569,8 @@ void ExportMusicXml::keysig(const KeySigEvent kse, ClefType ct, int staff, bool
|
|||
else {
|
||||
// traditional key signature
|
||||
xml.tag("fifths", static_cast<int>(kse.key()));
|
||||
if (kse.custom())
|
||||
xml.tag("mode", "none");
|
||||
}
|
||||
|
||||
xml.etag();
|
||||
|
|
|
@ -3873,8 +3873,12 @@ void MusicXml::xmlAttributes(Measure* measure, int staff, QDomElement e, KeySig*
|
|||
for (QDomElement ee = e.firstChildElement(); !ee.isNull(); ee = ee.nextSiblingElement()) {
|
||||
if (ee.tagName() == "fifths")
|
||||
key.setKey(Key(ee.text().toInt()));
|
||||
else if (ee.tagName() == "mode")
|
||||
domNotImplemented(ee);
|
||||
else if (ee.tagName() == "mode") {
|
||||
if (ee.text() == "none")
|
||||
key.setCustom(true);
|
||||
else
|
||||
domNotImplemented(ee);
|
||||
}
|
||||
else if (ee.tagName() == "cancel")
|
||||
domNotImplemented(ee); // TODO
|
||||
else if (ee.tagName() == "key-step") {
|
||||
|
|
BIN
mtest/musicxml/io/testKeysig2.pdf
Normal file
BIN
mtest/musicxml/io/testKeysig2.pdf
Normal file
Binary file not shown.
121
mtest/musicxml/io/testKeysig2.xml
Normal file
121
mtest/musicxml/io/testKeysig2.xml
Normal file
|
@ -0,0 +1,121 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
|
||||
<score-partwise>
|
||||
<work>
|
||||
<work-number>MuseScore testfile</work-number>
|
||||
<work-title>Key Signature 1</work-title>
|
||||
</work>
|
||||
<identification>
|
||||
<creator type="composer">Leon Vinken</creator>
|
||||
<encoding>
|
||||
<software>MuseScore 0.7.0</software>
|
||||
<encoding-date>2007-09-10</encoding-date>
|
||||
<supports element="accidental" type="yes"/>
|
||||
<supports element="beam" type="yes"/>
|
||||
<supports element="print" attribute="new-page" type="no"/>
|
||||
<supports element="print" attribute="new-system" type="no"/>
|
||||
<supports element="stem" type="yes"/>
|
||||
</encoding>
|
||||
</identification>
|
||||
<part-list>
|
||||
<score-part id="P1">
|
||||
<part-name>B♭ Clarinet</part-name>
|
||||
<part-abbreviation>B♭ Cl.</part-abbreviation>
|
||||
<score-instrument id="P1-I1">
|
||||
<instrument-name>B♭ Clarinet</instrument-name>
|
||||
</score-instrument>
|
||||
<midi-device id="P1-I1" port="1"></midi-device>
|
||||
<midi-instrument id="P1-I1">
|
||||
<midi-channel>1</midi-channel>
|
||||
<midi-program>72</midi-program>
|
||||
<volume>78.7402</volume>
|
||||
<pan>0</pan>
|
||||
</midi-instrument>
|
||||
</score-part>
|
||||
</part-list>
|
||||
<part id="P1">
|
||||
<measure number="1">
|
||||
<attributes>
|
||||
<divisions>1</divisions>
|
||||
<key>
|
||||
<fifths>0</fifths>
|
||||
<mode>none</mode>
|
||||
</key>
|
||||
<time>
|
||||
<beats>3</beats>
|
||||
<beat-type>4</beat-type>
|
||||
</time>
|
||||
<clef>
|
||||
<sign>G</sign>
|
||||
<line>2</line>
|
||||
</clef>
|
||||
<transpose>
|
||||
<diatonic>-1</diatonic>
|
||||
<chromatic>-2</chromatic>
|
||||
</transpose>
|
||||
</attributes>
|
||||
<note>
|
||||
<pitch>
|
||||
<step>D</step>
|
||||
<octave>4</octave>
|
||||
</pitch>
|
||||
<duration>1</duration>
|
||||
<voice>1</voice>
|
||||
<type>quarter</type>
|
||||
<stem>up</stem>
|
||||
</note>
|
||||
<note>
|
||||
<pitch>
|
||||
<step>E</step>
|
||||
<octave>4</octave>
|
||||
</pitch>
|
||||
<duration>1</duration>
|
||||
<voice>1</voice>
|
||||
<type>quarter</type>
|
||||
<stem>up</stem>
|
||||
</note>
|
||||
<note>
|
||||
<pitch>
|
||||
<step>F</step>
|
||||
<octave>4</octave>
|
||||
</pitch>
|
||||
<duration>1</duration>
|
||||
<voice>1</voice>
|
||||
<type>quarter</type>
|
||||
<stem>up</stem>
|
||||
</note>
|
||||
</measure>
|
||||
<measure number="2">
|
||||
<note>
|
||||
<pitch>
|
||||
<step>D</step>
|
||||
<octave>4</octave>
|
||||
</pitch>
|
||||
<duration>1</duration>
|
||||
<voice>1</voice>
|
||||
<type>quarter</type>
|
||||
<stem>up</stem>
|
||||
</note>
|
||||
<note>
|
||||
<pitch>
|
||||
<step>E</step>
|
||||
<octave>4</octave>
|
||||
</pitch>
|
||||
<duration>1</duration>
|
||||
<voice>1</voice>
|
||||
<type>quarter</type>
|
||||
<stem>up</stem>
|
||||
</note>
|
||||
<note>
|
||||
<pitch>
|
||||
<step>F</step>
|
||||
<octave>4</octave>
|
||||
</pitch>
|
||||
<duration>1</duration>
|
||||
<voice>1</voice>
|
||||
<type>quarter</type>
|
||||
<stem>up</stem>
|
||||
</note>
|
||||
</measure>
|
||||
</part>
|
||||
</score-partwise>
|
|
@ -92,6 +92,7 @@ private slots:
|
|||
void incorrectStaffNumber() { mxmlIoTestRef("testIncorrectStaffNumber"); }
|
||||
void invisibleElements() { mxmlIoTest("testInvisibleElements"); }
|
||||
void keysig1() { mxmlIoTest("testKeysig1"); }
|
||||
void keysig2() { mxmlIoTest("testKeysig2"); }
|
||||
void lines1() { mxmlIoTest("testLines1"); }
|
||||
void lines2() { mxmlIoTest("testLines2"); }
|
||||
void lyricsVoice2a() { mxmlIoTest("testLyricsVoice2a"); }
|
||||
|
|
Loading…
Reference in a new issue